~ubuntu-branches/ubuntu/trusty/erlang/trusty

« back to all changes in this revision

Viewing changes to erts/configure

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2011-05-05 15:48:43 UTC
  • mfrom: (3.5.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110505154843-0om6ekzg6m7ugj27
Tags: 1:14.b.2-dfsg-3ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to.
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
  - debian/patches/series: Do what I meant, and enable build-options.patch
    instead.
* Additional changes:
  - Drop erlang-wx from -et
* Dropped Changes:
  - patches/pcre-crash.patch: CVE-2008-2371: outer level option with
    alternatives caused crash. (Applied Upstream)
  - fix for ssl certificate verification in newSSL: 
    ssl_cacertfile_fix.patch (Applied Upstream)
  - debian/patches/series: Enable native.patch again, to get stripped beam
    files and reduce the package size again. (build-options is what
    actually accomplished this)
  - Remove build-options.patch on advice from upstream and because it caused
    odd build failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
309
309
# include <unistd.h>
310
310
#endif"
311
311
 
312
 
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT ENABLE_ALLOC_TYPE_VARS PERFCTR_PATH OTP_RELEASE MIXED_CYGWIN_VC MIXED_CYGWIN_MINGW MIXED_CYGWIN DEBUG_FLAGS DEBUG_CFLAGS WFLAGS CFLAG_RUNTIME_LIBRARY_PATH CPP EGREP OPSYS ARCH LIBCARBON RANLIB ac_ct_RANLIB YACC PERL LN_S AR RM MKDIR XSLTPROC FOP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA INSTALL_DIR HCC HCFLAGS vxworks_reclaim LD ERLANG_OSTYPE DEXPORT ETHR_X_LIBS ETHR_LIBS ETHR_LIB_NAME ETHR_DEFS ETHR_THR_LIB_BASE ETHR_THR_LIB_BASE_NAME ERTS_BUILD_SMP_EMU EMU_THR_LIB_NAME EMU_THR_X_LIBS EMU_THR_LIBS EMU_THR_DEFS EMU_LOCK_CHECKING ERTS_INTERNAL_X_LIBS THR_LIBS THR_DEFS TERMCAP_LIB Z_LIB LIBSCTP HAVE_VALGRIND BITS64 LIBRT M4 TSP_APP ERTS_BUILD_HYBRID_EMU HIPE_HELPERS HIPE_ENABLED NATIVE_LIBS_ENABLED USE_PERFCTR ERTS_ENABLE_KERNEL_POLL DED_CFLAGS DED_LD DED_LDFLAGS DED_LD_FLAG_RUNTIME_LIBRARY_PATH STATIC_CFLAGS EMU_CC SSL_INCLUDE SSL_ROOT SSL_LIBDIR SSL_DYNAMIC_ONLY SSL_LINK_WITH_KERBEROS STATIC_KERBEROS_LIBS SSL_LINK_WITH_ZLIB STATIC_ZLIB_LIBS OPENSSL_CMD REGTOOL os_mon_programs CPU_SUP_LIBS JAVAC CXXFLAGS CXX CC32 CFLAGS32 LIBOBJS LTLIBOBJS'
 
312
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS ERL_TOP CC CFLAGS STATIC_CFLAGS CFLAG_RUNTIME_LIBRARY_PATH CPP CPPFLAGS CXX CXXFLAGS LD LDFLAGS DED_LD DED_LDFLAGS DED_LD_FLAG_RUNTIME_LIBRARY_PATH LFS_CFLAGS LFS_LDFLAGS LFS_LIBS RANLIB AR GETCONF erl_xcomp_sysroot erl_xcomp_isysroot erl_xcomp_bigendian erl_xcomp_linux_clock_gettime_correction erl_xcomp_linux_nptl erl_xcomp_linux_usable_sigusrx erl_xcomp_linux_usable_sigaltstack erl_xcomp_poll erl_xcomp_kqueue erl_xcomp_putenv_copy erl_xcomp_reliable_fpe erl_xcomp_getaddrinfo erl_xcomp_gethrvtime_procfs_ioctl erl_xcomp_clock_gettime_cpu_time erl_xcomp_after_morecore_hook erl_xcomp_dlsym_brk_wrappers build build_cpu build_vendor build_os host host_cpu host_vendor host_os CROSS_COMPILING ac_ct_CC EXEEXT OBJEXT ENABLE_ALLOC_TYPE_VARS PERFCTR_PATH OTP_RELEASE GCC MIXED_CYGWIN_VC MIXED_CYGWIN_MINGW MIXED_CYGWIN ac_pt_GETCONF DEBUG_FLAGS DEBUG_CFLAGS WFLAGS EGREP EXTERNAL_WORD_SIZE OPSYS ARCH LIBCARBON ac_ct_RANLIB YACC PERL LN_S ac_ct_AR RM MKDIR XSLTPROC FOP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA INSTALL_DIR HCC HCFLAGS vxworks_reclaim LDFLAG_RUNTIME_LIBRARY_PATH ERLANG_OSTYPE DEXPORT ERTS_INTERNAL_X_LIBS ETHR_X_LIBS ETHR_LIBS ETHR_LIB_NAME ETHR_DEFS ETHR_THR_LIB_BASE ETHR_THR_LIB_BASE_DIR ERTS_BUILD_SMP_EMU EMU_THR_LIB_NAME EMU_THR_X_LIBS EMU_THR_LIBS EMU_THR_DEFS EMU_LOCK_CHECKING THR_LIBS THR_DEFS TERMCAP_LIB Z_LIB LIBSCTP HAVE_VALGRIND BITS64 LIBRT M4 TSP_APP ERTS_BUILD_HYBRID_EMU HIPE_HELPERS HIPE_ENABLED NATIVE_LIBS_ENABLED USE_PERFCTR ERTS_ENABLE_KERNEL_POLL ac_ct_DED_LD DED_EXT DED_SYS_INCLUDE DED_CFLAGS DED_THR_DEFS DED_EMU_THR_DEFS EMU_CC SSL_INCLUDE SSL_ROOT SSL_LIBDIR SSL_CC_RUNTIME_LIBRARY_PATH SSL_LD_RUNTIME_LIBRARY_PATH SSL_DED_LD_RUNTIME_LIBRARY_PATH SSL_DYNAMIC_ONLY SSL_LINK_WITH_KERBEROS STATIC_KERBEROS_LIBS SSL_LINK_WITH_ZLIB STATIC_ZLIB_LIBS REGTOOL os_mon_programs CPU_SUP_LIBS JAVAC ac_ct_CXX CC32 CFLAGS32 LIBOBJS LTLIBOBJS'
313
313
ac_subst_files=''
314
314
 
315
315
# Initialize some variables set by options.
750
750
ac_env_target_alias_value=$target_alias
751
751
ac_cv_env_target_alias_set=${target_alias+set}
752
752
ac_cv_env_target_alias_value=$target_alias
 
753
ac_env_ERL_TOP_set=${ERL_TOP+set}
 
754
ac_env_ERL_TOP_value=$ERL_TOP
 
755
ac_cv_env_ERL_TOP_set=${ERL_TOP+set}
 
756
ac_cv_env_ERL_TOP_value=$ERL_TOP
753
757
ac_env_CC_set=${CC+set}
754
758
ac_env_CC_value=$CC
755
759
ac_cv_env_CC_set=${CC+set}
758
762
ac_env_CFLAGS_value=$CFLAGS
759
763
ac_cv_env_CFLAGS_set=${CFLAGS+set}
760
764
ac_cv_env_CFLAGS_value=$CFLAGS
 
765
ac_env_STATIC_CFLAGS_set=${STATIC_CFLAGS+set}
 
766
ac_env_STATIC_CFLAGS_value=$STATIC_CFLAGS
 
767
ac_cv_env_STATIC_CFLAGS_set=${STATIC_CFLAGS+set}
 
768
ac_cv_env_STATIC_CFLAGS_value=$STATIC_CFLAGS
 
769
ac_env_CFLAG_RUNTIME_LIBRARY_PATH_set=${CFLAG_RUNTIME_LIBRARY_PATH+set}
 
770
ac_env_CFLAG_RUNTIME_LIBRARY_PATH_value=$CFLAG_RUNTIME_LIBRARY_PATH
 
771
ac_cv_env_CFLAG_RUNTIME_LIBRARY_PATH_set=${CFLAG_RUNTIME_LIBRARY_PATH+set}
 
772
ac_cv_env_CFLAG_RUNTIME_LIBRARY_PATH_value=$CFLAG_RUNTIME_LIBRARY_PATH
 
773
ac_env_CPP_set=${CPP+set}
 
774
ac_env_CPP_value=$CPP
 
775
ac_cv_env_CPP_set=${CPP+set}
 
776
ac_cv_env_CPP_value=$CPP
 
777
ac_env_CPPFLAGS_set=${CPPFLAGS+set}
 
778
ac_env_CPPFLAGS_value=$CPPFLAGS
 
779
ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
 
780
ac_cv_env_CPPFLAGS_value=$CPPFLAGS
 
781
ac_env_CXX_set=${CXX+set}
 
782
ac_env_CXX_value=$CXX
 
783
ac_cv_env_CXX_set=${CXX+set}
 
784
ac_cv_env_CXX_value=$CXX
 
785
ac_env_CXXFLAGS_set=${CXXFLAGS+set}
 
786
ac_env_CXXFLAGS_value=$CXXFLAGS
 
787
ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
 
788
ac_cv_env_CXXFLAGS_value=$CXXFLAGS
 
789
ac_env_LD_set=${LD+set}
 
790
ac_env_LD_value=$LD
 
791
ac_cv_env_LD_set=${LD+set}
 
792
ac_cv_env_LD_value=$LD
761
793
ac_env_LDFLAGS_set=${LDFLAGS+set}
762
794
ac_env_LDFLAGS_value=$LDFLAGS
763
795
ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764
796
ac_cv_env_LDFLAGS_value=$LDFLAGS
765
 
ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766
 
ac_env_CPPFLAGS_value=$CPPFLAGS
767
 
ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768
 
ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769
 
ac_env_CPP_set=${CPP+set}
770
 
ac_env_CPP_value=$CPP
771
 
ac_cv_env_CPP_set=${CPP+set}
772
 
ac_cv_env_CPP_value=$CPP
 
797
ac_env_LIBS_set=${LIBS+set}
 
798
ac_env_LIBS_value=$LIBS
 
799
ac_cv_env_LIBS_set=${LIBS+set}
 
800
ac_cv_env_LIBS_value=$LIBS
 
801
ac_env_DED_LD_set=${DED_LD+set}
 
802
ac_env_DED_LD_value=$DED_LD
 
803
ac_cv_env_DED_LD_set=${DED_LD+set}
 
804
ac_cv_env_DED_LD_value=$DED_LD
 
805
ac_env_DED_LDFLAGS_set=${DED_LDFLAGS+set}
 
806
ac_env_DED_LDFLAGS_value=$DED_LDFLAGS
 
807
ac_cv_env_DED_LDFLAGS_set=${DED_LDFLAGS+set}
 
808
ac_cv_env_DED_LDFLAGS_value=$DED_LDFLAGS
 
809
ac_env_DED_LD_FLAG_RUNTIME_LIBRARY_PATH_set=${DED_LD_FLAG_RUNTIME_LIBRARY_PATH+set}
 
810
ac_env_DED_LD_FLAG_RUNTIME_LIBRARY_PATH_value=$DED_LD_FLAG_RUNTIME_LIBRARY_PATH
 
811
ac_cv_env_DED_LD_FLAG_RUNTIME_LIBRARY_PATH_set=${DED_LD_FLAG_RUNTIME_LIBRARY_PATH+set}
 
812
ac_cv_env_DED_LD_FLAG_RUNTIME_LIBRARY_PATH_value=$DED_LD_FLAG_RUNTIME_LIBRARY_PATH
 
813
ac_env_LFS_CFLAGS_set=${LFS_CFLAGS+set}
 
814
ac_env_LFS_CFLAGS_value=$LFS_CFLAGS
 
815
ac_cv_env_LFS_CFLAGS_set=${LFS_CFLAGS+set}
 
816
ac_cv_env_LFS_CFLAGS_value=$LFS_CFLAGS
 
817
ac_env_LFS_LDFLAGS_set=${LFS_LDFLAGS+set}
 
818
ac_env_LFS_LDFLAGS_value=$LFS_LDFLAGS
 
819
ac_cv_env_LFS_LDFLAGS_set=${LFS_LDFLAGS+set}
 
820
ac_cv_env_LFS_LDFLAGS_value=$LFS_LDFLAGS
 
821
ac_env_LFS_LIBS_set=${LFS_LIBS+set}
 
822
ac_env_LFS_LIBS_value=$LFS_LIBS
 
823
ac_cv_env_LFS_LIBS_set=${LFS_LIBS+set}
 
824
ac_cv_env_LFS_LIBS_value=$LFS_LIBS
 
825
ac_env_RANLIB_set=${RANLIB+set}
 
826
ac_env_RANLIB_value=$RANLIB
 
827
ac_cv_env_RANLIB_set=${RANLIB+set}
 
828
ac_cv_env_RANLIB_value=$RANLIB
 
829
ac_env_AR_set=${AR+set}
 
830
ac_env_AR_value=$AR
 
831
ac_cv_env_AR_set=${AR+set}
 
832
ac_cv_env_AR_value=$AR
 
833
ac_env_GETCONF_set=${GETCONF+set}
 
834
ac_env_GETCONF_value=$GETCONF
 
835
ac_cv_env_GETCONF_set=${GETCONF+set}
 
836
ac_cv_env_GETCONF_value=$GETCONF
 
837
ac_env_erl_xcomp_sysroot_set=${erl_xcomp_sysroot+set}
 
838
ac_env_erl_xcomp_sysroot_value=$erl_xcomp_sysroot
 
839
ac_cv_env_erl_xcomp_sysroot_set=${erl_xcomp_sysroot+set}
 
840
ac_cv_env_erl_xcomp_sysroot_value=$erl_xcomp_sysroot
 
841
ac_env_erl_xcomp_isysroot_set=${erl_xcomp_isysroot+set}
 
842
ac_env_erl_xcomp_isysroot_value=$erl_xcomp_isysroot
 
843
ac_cv_env_erl_xcomp_isysroot_set=${erl_xcomp_isysroot+set}
 
844
ac_cv_env_erl_xcomp_isysroot_value=$erl_xcomp_isysroot
 
845
ac_env_erl_xcomp_bigendian_set=${erl_xcomp_bigendian+set}
 
846
ac_env_erl_xcomp_bigendian_value=$erl_xcomp_bigendian
 
847
ac_cv_env_erl_xcomp_bigendian_set=${erl_xcomp_bigendian+set}
 
848
ac_cv_env_erl_xcomp_bigendian_value=$erl_xcomp_bigendian
 
849
ac_env_erl_xcomp_linux_clock_gettime_correction_set=${erl_xcomp_linux_clock_gettime_correction+set}
 
850
ac_env_erl_xcomp_linux_clock_gettime_correction_value=$erl_xcomp_linux_clock_gettime_correction
 
851
ac_cv_env_erl_xcomp_linux_clock_gettime_correction_set=${erl_xcomp_linux_clock_gettime_correction+set}
 
852
ac_cv_env_erl_xcomp_linux_clock_gettime_correction_value=$erl_xcomp_linux_clock_gettime_correction
 
853
ac_env_erl_xcomp_linux_nptl_set=${erl_xcomp_linux_nptl+set}
 
854
ac_env_erl_xcomp_linux_nptl_value=$erl_xcomp_linux_nptl
 
855
ac_cv_env_erl_xcomp_linux_nptl_set=${erl_xcomp_linux_nptl+set}
 
856
ac_cv_env_erl_xcomp_linux_nptl_value=$erl_xcomp_linux_nptl
 
857
ac_env_erl_xcomp_linux_usable_sigusrx_set=${erl_xcomp_linux_usable_sigusrx+set}
 
858
ac_env_erl_xcomp_linux_usable_sigusrx_value=$erl_xcomp_linux_usable_sigusrx
 
859
ac_cv_env_erl_xcomp_linux_usable_sigusrx_set=${erl_xcomp_linux_usable_sigusrx+set}
 
860
ac_cv_env_erl_xcomp_linux_usable_sigusrx_value=$erl_xcomp_linux_usable_sigusrx
 
861
ac_env_erl_xcomp_linux_usable_sigaltstack_set=${erl_xcomp_linux_usable_sigaltstack+set}
 
862
ac_env_erl_xcomp_linux_usable_sigaltstack_value=$erl_xcomp_linux_usable_sigaltstack
 
863
ac_cv_env_erl_xcomp_linux_usable_sigaltstack_set=${erl_xcomp_linux_usable_sigaltstack+set}
 
864
ac_cv_env_erl_xcomp_linux_usable_sigaltstack_value=$erl_xcomp_linux_usable_sigaltstack
 
865
ac_env_erl_xcomp_poll_set=${erl_xcomp_poll+set}
 
866
ac_env_erl_xcomp_poll_value=$erl_xcomp_poll
 
867
ac_cv_env_erl_xcomp_poll_set=${erl_xcomp_poll+set}
 
868
ac_cv_env_erl_xcomp_poll_value=$erl_xcomp_poll
 
869
ac_env_erl_xcomp_kqueue_set=${erl_xcomp_kqueue+set}
 
870
ac_env_erl_xcomp_kqueue_value=$erl_xcomp_kqueue
 
871
ac_cv_env_erl_xcomp_kqueue_set=${erl_xcomp_kqueue+set}
 
872
ac_cv_env_erl_xcomp_kqueue_value=$erl_xcomp_kqueue
 
873
ac_env_erl_xcomp_putenv_copy_set=${erl_xcomp_putenv_copy+set}
 
874
ac_env_erl_xcomp_putenv_copy_value=$erl_xcomp_putenv_copy
 
875
ac_cv_env_erl_xcomp_putenv_copy_set=${erl_xcomp_putenv_copy+set}
 
876
ac_cv_env_erl_xcomp_putenv_copy_value=$erl_xcomp_putenv_copy
 
877
ac_env_erl_xcomp_reliable_fpe_set=${erl_xcomp_reliable_fpe+set}
 
878
ac_env_erl_xcomp_reliable_fpe_value=$erl_xcomp_reliable_fpe
 
879
ac_cv_env_erl_xcomp_reliable_fpe_set=${erl_xcomp_reliable_fpe+set}
 
880
ac_cv_env_erl_xcomp_reliable_fpe_value=$erl_xcomp_reliable_fpe
 
881
ac_env_erl_xcomp_getaddrinfo_set=${erl_xcomp_getaddrinfo+set}
 
882
ac_env_erl_xcomp_getaddrinfo_value=$erl_xcomp_getaddrinfo
 
883
ac_cv_env_erl_xcomp_getaddrinfo_set=${erl_xcomp_getaddrinfo+set}
 
884
ac_cv_env_erl_xcomp_getaddrinfo_value=$erl_xcomp_getaddrinfo
 
885
ac_env_erl_xcomp_gethrvtime_procfs_ioctl_set=${erl_xcomp_gethrvtime_procfs_ioctl+set}
 
886
ac_env_erl_xcomp_gethrvtime_procfs_ioctl_value=$erl_xcomp_gethrvtime_procfs_ioctl
 
887
ac_cv_env_erl_xcomp_gethrvtime_procfs_ioctl_set=${erl_xcomp_gethrvtime_procfs_ioctl+set}
 
888
ac_cv_env_erl_xcomp_gethrvtime_procfs_ioctl_value=$erl_xcomp_gethrvtime_procfs_ioctl
 
889
ac_env_erl_xcomp_clock_gettime_cpu_time_set=${erl_xcomp_clock_gettime_cpu_time+set}
 
890
ac_env_erl_xcomp_clock_gettime_cpu_time_value=$erl_xcomp_clock_gettime_cpu_time
 
891
ac_cv_env_erl_xcomp_clock_gettime_cpu_time_set=${erl_xcomp_clock_gettime_cpu_time+set}
 
892
ac_cv_env_erl_xcomp_clock_gettime_cpu_time_value=$erl_xcomp_clock_gettime_cpu_time
 
893
ac_env_erl_xcomp_after_morecore_hook_set=${erl_xcomp_after_morecore_hook+set}
 
894
ac_env_erl_xcomp_after_morecore_hook_value=$erl_xcomp_after_morecore_hook
 
895
ac_cv_env_erl_xcomp_after_morecore_hook_set=${erl_xcomp_after_morecore_hook+set}
 
896
ac_cv_env_erl_xcomp_after_morecore_hook_value=$erl_xcomp_after_morecore_hook
 
897
ac_env_erl_xcomp_dlsym_brk_wrappers_set=${erl_xcomp_dlsym_brk_wrappers+set}
 
898
ac_env_erl_xcomp_dlsym_brk_wrappers_value=$erl_xcomp_dlsym_brk_wrappers
 
899
ac_cv_env_erl_xcomp_dlsym_brk_wrappers_set=${erl_xcomp_dlsym_brk_wrappers+set}
 
900
ac_cv_env_erl_xcomp_dlsym_brk_wrappers_value=$erl_xcomp_dlsym_brk_wrappers
773
901
 
774
902
#
775
903
# Report the --help message.
844
972
Optional Features:
845
973
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
846
974
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
 
975
  --enable-bootstrap-only enable bootstrap only configuration
847
976
  --enable-threads        enable async thread support
848
977
  --disable-threads       disable async thread support
 
978
  --enable-halfword-emulator
 
979
                          enable halfword emulator (only for 64bit builds)
849
980
  --enable-smp-support    enable smp support
850
981
  --disable-smp-support   disable smp support
851
982
  --enable-hybrid-heap    enable hybrid heap
852
 
  --disable-hybrid-heap   disable hybrid heap
853
983
  --enable-lock-checking  enable lock checking
854
 
  --enable-lock-counter    enable lock counters
855
 
  --disable-lock-counter   disable lock counters
 
984
  --enable-lock-counter   enable lock counters
856
985
  --enable-kernel-poll    enable kernel poll support
857
986
  --disable-kernel-poll   disable kernel poll support
858
987
  --enable-sctp           enable sctp support
861
990
  --disable-hipe          disable hipe support
862
991
  --enable-native-libs    compile Erlang libraries to native code
863
992
  --enable-tsp            compile tsp app
864
 
  --enable-elib-malloc    use elib_malloc instead of normal malloc
865
 
  --enable-fp-exceptions    Use hardware floating point exceptions (default if hipe enabled)
866
 
  --enable-darwin-universal    build universal binaries on darwin i386
867
 
  --enable-darwin-64bit    build 64bit binaries on darwin
868
 
  --enable-m64-build    build 64bit binaries using the -m64 flag to (g)cc
 
993
  --enable-fp-exceptions  use hardware floating point exceptions (default if
 
994
                          hipe enabled)
 
995
  --enable-darwin-universal
 
996
                          build universal binaries on darwin i386
 
997
  --enable-darwin-64bit   build 64bit binaries on darwin
 
998
  --enable-m64-build      build 64bit binaries using the -m64 flag to (g)cc
 
999
  --enable-m32-build      build 32bit binaries using the -m32 flag to (g)cc
869
1000
  --disable-fixalloc      disable the use of fix_alloc
870
 
  --enable-clock-gettime  Use clock-gettime for time correction
871
 
  --enable-native-ethr-impls enable native ethread implementations
872
 
  --disable-native-ethr-impls disable native ethread implementations
873
 
  --disable-megaco-flex-scanner-lineno disable megaco flex scanner lineno
874
 
  --enable-shared-zlib        enable using shared zlib library
875
 
  --disable-shared-zlib       disable shared zlib, compile own zlib source (default)
876
 
  --enable-dynamic-ssl-lib        enable using dynamic openssl libraries
877
 
  --disable-dynamic-ssl-lib       disable using dynamic openssl libraries
 
1001
  --enable-clock-gettime  use clock-gettime for time correction
 
1002
  --disable-native-ethr-impls
 
1003
                          disable native ethread implementations
 
1004
  --enable-prefer-gcc-native-ethr-impls
 
1005
                          prefer gcc native ethread implementations
 
1006
  --enable-ethread-pre-pentium4-compatibility
 
1007
                          enable compatibility with x86 processors before
 
1008
                          pentium 4 (back to 486) in the ethread library
 
1009
  --enable-shared-zlib    enable using shared zlib library
 
1010
  --disable-dynamic-ssl-lib
 
1011
                          disable using dynamic openssl libraries
878
1012
 
879
1013
Optional Packages:
880
1014
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
881
1015
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
882
 
  --with-xcompconf=PATH     path to cross compilation configuration
883
1016
  --with-termcap          use termcap (default)
884
 
  --without-termcap       do not use any termcap libraries (ncurses,curses,termcap,termlib)
 
1017
  --without-termcap       do not use any termcap libraries
 
1018
                          (ncurses,curses,termcap,termlib)
885
1019
  --with-perfctr=PATH     specify location of perfctr include and lib
886
1020
  --without-perfctr       don't use perfctr (default)
 
1021
  --with-libatomic_ops=PATH
 
1022
                          specify and prefer usage of libatomic_ops in the
 
1023
                          ethread library
887
1024
  --with-ssl-zlib=PATH    specify location of ZLib to be used by OpenSSL
888
 
  --with-ssl-zlib         link SSL with  Zlib (default if found)
 
1025
  --with-ssl-zlib         link SSL with Zlib (default if found)
889
1026
  --without-ssl-zlib      don't link SSL with ZLib
890
1027
  --with-ssl=PATH         specify location of OpenSSL include and lib
891
1028
  --with-ssl              use SSL (default)
892
1029
  --without-ssl           don't use SSL
 
1030
  --with-javac=JAVAC      specify Java compiler to use
 
1031
  --with-javac            use a Java compiler if found (default)
 
1032
  --without-javac         don't use any Java compiler
893
1033
 
894
1034
Some influential environment variables:
895
 
  CC          C compiler command
 
1035
  ERL_TOP     Erlang/OTP top source directory
 
1036
  CC          C compiler
896
1037
  CFLAGS      C compiler flags
897
 
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
898
 
              nonstandard directory <lib dir>
899
 
  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
900
 
              headers in a nonstandard directory <include dir>
901
 
  CPP         C preprocessor
 
1038
  STATIC_CFLAGS
 
1039
              C compiler static flags
 
1040
  CFLAG_RUNTIME_LIBRARY_PATH
 
1041
              runtime library path linker flag passed via C compiler
 
1042
  CPP         C/C++ preprocessor
 
1043
  CPPFLAGS    C/C++ preprocessor flags
 
1044
  CXX         C++ compiler
 
1045
  CXXFLAGS    C++ compiler flags
 
1046
  LD          linker (is often overridden by configure)
 
1047
  LDFLAGS     linker flags (can be risky to set since LD may be overriden by
 
1048
              configure)
 
1049
  LIBS        libraries
 
1050
  DED_LD      linker for Dynamic Erlang Drivers (set all DED_LD* variables or
 
1051
              none)
 
1052
  DED_LDFLAGS linker flags for Dynamic Erlang Drivers (set all DED_LD*
 
1053
              variables or none)
 
1054
  DED_LD_FLAG_RUNTIME_LIBRARY_PATH
 
1055
              runtime library path linker flag for Dynamic Erlang Drivers (set
 
1056
              all DED_LD* variables or none)
 
1057
  LFS_CFLAGS  large file support C compiler flags (set all LFS_* variables or
 
1058
              none)
 
1059
  LFS_LDFLAGS large file support linker flags (set all LFS_* variables or
 
1060
              none)
 
1061
  LFS_LIBS    large file support libraries (set all LFS_* variables or none)
 
1062
  RANLIB      ranlib
 
1063
  AR          ar
 
1064
  GETCONF     getconf
 
1065
  erl_xcomp_sysroot
 
1066
              Absolute cross system root path (only used when cross compiling)
 
1067
  erl_xcomp_isysroot
 
1068
              Absolute cross system root include path (only used when cross
 
1069
              compiling)
 
1070
  erl_xcomp_bigendian
 
1071
              big endian system: yes|no (only used when cross compiling)
 
1072
  erl_xcomp_linux_clock_gettime_correction
 
1073
              clock_gettime() can be used for time correction: yes|no (only
 
1074
              used when cross compiling)
 
1075
  erl_xcomp_linux_nptl
 
1076
              have Native POSIX Thread Library: yes|no (only used when cross
 
1077
              compiling)
 
1078
  erl_xcomp_linux_usable_sigusrx
 
1079
              SIGUSR1 and SIGUSR2 can be used: yes|no (only used when cross
 
1080
              compiling)
 
1081
  erl_xcomp_linux_usable_sigaltstack
 
1082
              have working sigaltstack(): yes|no (only used when cross
 
1083
              compiling)
 
1084
  erl_xcomp_poll
 
1085
              have working poll(): yes|no (only used when cross compiling)
 
1086
  erl_xcomp_kqueue
 
1087
              have working kqueue(): yes|no (only used when cross compiling)
 
1088
  erl_xcomp_putenv_copy
 
1089
              putenv() stores key-value copy: yes|no (only used when cross
 
1090
              compiling)
 
1091
  erl_xcomp_reliable_fpe
 
1092
              have reliable floating point exceptions: yes|no (only used when
 
1093
              cross compiling)
 
1094
  erl_xcomp_getaddrinfo
 
1095
              have working getaddrinfo() for both IPv4 and IPv6: yes|no (only
 
1096
              used when cross compiling)
 
1097
  erl_xcomp_gethrvtime_procfs_ioctl
 
1098
              have working gethrvtime() which can be used with procfs ioctl():
 
1099
              yes|no (only used when cross compiling)
 
1100
  erl_xcomp_clock_gettime_cpu_time
 
1101
              clock_gettime() can be used for retrieving process CPU time:
 
1102
              yes|no (only used when cross compiling)
 
1103
  erl_xcomp_after_morecore_hook
 
1104
              __after_morecore_hook can track malloc()s core memory usage:
 
1105
              yes|no (only used when cross compiling)
 
1106
  erl_xcomp_dlsym_brk_wrappers
 
1107
              dlsym(RTLD_NEXT, _) brk wrappers can track malloc()s core memory
 
1108
              usage: yes|no (only used when cross compiling)
902
1109
 
903
1110
Use these variables to override the choices made by `configure' or to help
904
1111
it to find libraries and programs with nonstandard names/locations.
1340
1547
 
1341
1548
 
1342
1549
 
 
1550
 
 
1551
 
 
1552
 
 
1553
 
 
1554
 
 
1555
 
 
1556
 
 
1557
 
 
1558
 
 
1559
 
 
1560
 
 
1561
 
 
1562
 
 
1563
 
 
1564
 
 
1565
 
 
1566
 
 
1567
 
 
1568
 
 
1569
 
 
1570
 
 
1571
 
 
1572
 
 
1573
 
 
1574
 
 
1575
 
 
1576
 
 
1577
 
 
1578
 
 
1579
 
 
1580
 
 
1581
 
 
1582
 
 
1583
 
 
1584
 
 
1585
 
 
1586
 
 
1587
 
 
1588
 
 
1589
 
 
1590
 
 
1591
 
 
1592
 
 
1593
 
 
1594
 
1343
1595
if test "x$no_recursion" != "xyes" -a "x$OVERRIDE_CONFIG_CACHE" = "x"; then
1344
1596
    # We do not want to use a common cache!
1345
1597
    cache_file=/dev/null
1379
1631
fi
1380
1632
erl_top=${ERL_TOP}
1381
1633
 
 
1634
# Remove old configuration information
 
1635
/bin/rm -f "$ERL_TOP/erts/CONF_INFO"
 
1636
 
1382
1637
# echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1383
1638
# echo X
1384
1639
# echo "X srcdir  = $srcdir"
1474
1729
else
1475
1730
    host_os=$host
1476
1731
fi
 
1732
 
 
1733
if test "$cross_compiling" = "yes"; then
 
1734
    CROSS_COMPILING=yes
 
1735
else
 
1736
    CROSS_COMPILING=no
 
1737
fi
 
1738
 
 
1739
 
 
1740
 
 
1741
erl_xcomp_without_sysroot=no
 
1742
if test "$cross_compiling" = "yes"; then
 
1743
    test "$erl_xcomp_sysroot" != "" || erl_xcomp_without_sysroot=yes
 
1744
    test "$erl_xcomp_isysroot" != "" || erl_xcomp_isysroot="$erl_xcomp_sysroot"
 
1745
else
 
1746
    erl_xcomp_sysroot=
 
1747
    erl_xcomp_isysroot=
 
1748
fi
 
1749
 
 
1750
 
1477
1751
ac_ext=c
1478
1752
ac_cpp='$CPP $CPPFLAGS'
1479
1753
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2538
2812
ENABLE_ALLOC_TYPE_VARS=
2539
2813
 
2540
2814
 
2541
 
 
2542
 
# Check whether --with-xcomp-conf or --without-xcomp-conf was given.
2543
 
if test "${with_xcomp_conf+set}" = set; then
2544
 
  withval="$with_xcomp_conf"
 
2815
# Check whether --enable-bootstrap-only or --disable-bootstrap-only was given.
 
2816
if test "${enable_bootstrap_only+set}" = set; then
 
2817
  enableval="$enable_bootstrap_only"
 
2818
   if test "X$enableval" = "Xyes"; then
 
2819
        # Disable stuff not necessary in a bootstrap only system in order
 
2820
        # to speed up things by reducing the amount of stuff needing to be
 
2821
        # built...
 
2822
        enable_threads=no
 
2823
        enable_smp_support=no
 
2824
        with_termcap=no
 
2825
        with_ssl=no
 
2826
        with_ssl_zlib=no
 
2827
        enable_hipe=no
 
2828
        enable_sctp=no
 
2829
  fi
2545
2830
 
2546
2831
fi;
2547
 
if test "x$with_xcompconf" != "xno" -a "x$with_xcompconf" != "x" ; then
2548
 
    . $with_xcompconf
2549
 
fi
2550
 
 
2551
2832
 
2552
2833
# Check whether --enable-threads or --disable-threads was given.
2553
2834
if test "${enable_threads+set}" = set; then
2560
2841
  enable_threads=unknown
2561
2842
fi;
2562
2843
 
 
2844
# Check whether --enable-halfword-emulator or --disable-halfword-emulator was given.
 
2845
if test "${enable_halfword_emulator+set}" = set; then
 
2846
  enableval="$enable_halfword_emulator"
 
2847
   case "$enableval" in
 
2848
    no) enable_halfword_emualtor=no ;;
 
2849
    *)  enable_halfword_emulator=yes ;;
 
2850
  esac
 
2851
else
 
2852
  enable_halfword_emulator=unknown
 
2853
fi;
 
2854
 
2563
2855
# Check whether --enable-smp-support or --disable-smp-support was given.
2564
2856
if test "${enable_smp_support+set}" = set; then
2565
2857
  enableval="$enable_smp_support"
2656
2948
 
2657
2949
fi;
2658
2950
 
2659
 
# Check whether --enable-elib-malloc or --disable-elib-malloc was given.
2660
 
if test "${enable_elib_malloc+set}" = set; then
2661
 
  enableval="$enable_elib_malloc"
2662
 
 
2663
 
fi;
2664
 
 
2665
2951
# Check whether --enable-fp-exceptions or --disable-fp-exceptions was given.
2666
2952
if test "${enable_fp_exceptions+set}" = set; then
2667
2953
  enableval="$enable_fp_exceptions"
2711
2997
  enable_m64_build=no
2712
2998
fi;
2713
2999
 
 
3000
# Check whether --enable-m32-build or --disable-m32-build was given.
 
3001
if test "${enable_m32_build+set}" = set; then
 
3002
  enableval="$enable_m32_build"
 
3003
   case "$enableval" in
 
3004
    no) enable_m32_build=no ;;
 
3005
    *)
 
3006
        if test X${enable_darwin_64bit} = Xyes -o  X${enable_m64_build} = Xyes;
 
3007
        then
 
3008
                { { echo "$as_me:$LINENO: error: (--enable-darwin-64bit or --enable-m64-build) and --enable-m32-build are mutually exclusive" >&5
 
3009
echo "$as_me: error: (--enable-darwin-64bit or --enable-m64-build) and --enable-m32-build are mutually exclusive" >&2;}
 
3010
   { (exit 1); exit 1; }; } ;
 
3011
        fi ;
 
3012
        enable_m32_build=yes ;;
 
3013
  esac
 
3014
 
 
3015
else
 
3016
  enable_m32_build=no
 
3017
fi;
 
3018
 
2714
3019
# Check whether --enable-fixalloc or --disable-fixalloc was given.
2715
3020
if test "${enable_fixalloc+set}" = set; then
2716
3021
  enableval="$enable_fixalloc"
2759
3064
  clock_gettime_correction=unknown
2760
3065
fi;
2761
3066
 
2762
 
# Check whether --enable-native-ethr-impls or --disable-native-ethr-impls was given.
2763
 
if test "${enable_native_ethr_impls+set}" = set; then
2764
 
  enableval="$enable_native_ethr_impls"
2765
 
   case "$enableval" in
2766
 
    no) disable_native_ethr_impls=yes ;;
2767
 
    *)  disable_native_ethr_impls=no ;;
2768
 
  esac
2769
 
else
2770
 
  disable_native_ethr_impls=no
2771
 
fi;
2772
 
 
2773
 
 
2774
 
# Check whether --enable-megaco_flex_scanner_lineno or --disable-megaco_flex_scanner_lineno was given.
2775
 
if test "${enable_megaco_flex_scanner_lineno+set}" = set; then
2776
 
  enableval="$enable_megaco_flex_scanner_lineno"
2777
 
 
2778
 
fi;
2779
 
 
2780
3067
OTP_RELEASE=
2781
3068
if test "${ERLANG_COMMERCIAL_BUILD}" != ""; then
2782
3069
        OTP_EXTRA_FLAGS=-DOTP_RELEASE
2826
3113
        esac
2827
3114
fi
2828
3115
if test X${enable_darwin_64bit} = Xyes -o X${enable_m64_build} = Xyes; then
2829
 
        enable_hipe=no
2830
3116
        case $CFLAGS in
2831
3117
                *-m64*)
2832
3118
                        ;;
2846
3132
                        esac
2847
3133
                        ;;
2848
3134
                *)
 
3135
                        if test X${enable_m32_build} = Xyes;
 
3136
                        then
 
3137
                                enable_hipe=no;
 
3138
                                case $CFLAGS in
 
3139
                                *-m32*)
 
3140
                                        ;;
 
3141
                                *)
 
3142
                                        CFLAGS="-m32 $CFLAGS"
 
3143
                                ;;
 
3144
                                esac ;
 
3145
                        fi
2849
3146
                        ;;
2850
3147
        esac
2851
3148
fi
3583
3880
 
3584
3881
 
3585
3882
 
 
3883
 
3586
3884
case $host_os in
3587
3885
    linux*) CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE";;
3588
3886
    win32)
3597
3895
echo "$as_me: WARNING: Reverting to 32-bit time_t" >&2;}
3598
3896
        CPPFLAGS="$CPPFLAGS -D_USE_32BIT_TIME_T"
3599
3897
        ;;
 
3898
    darwin*)
 
3899
        CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE"
 
3900
        ;;
3600
3901
    *)
3601
3902
        ;;
3602
3903
esac
3671
3972
DEBUG_CFLAGS="-g $CPPFLAGS $extra_flags"
3672
3973
DEBUG_FLAGS=-g
3673
3974
 
 
3975
 
 
3976
case $CFLAGS in
 
3977
        *-m64*)
 
3978
                case $DEBUG_CFLAGS in
 
3979
                        *-m64*)
 
3980
                                ;;
 
3981
                        *)
 
3982
                                DEBUG_CFLAGS="-m64 $DEBUG_CFLAGS"
 
3983
                                ;;
 
3984
                esac
 
3985
                ;;
 
3986
        *-m32*)
 
3987
                case $DEBUG_CFLAGS in
 
3988
                        *-m32*)
 
3989
                                ;;
 
3990
                        *)
 
3991
                                DEBUG_CFLAGS="-m32 $DEBUG_CFLAGS"
 
3992
                                ;;
 
3993
                esac
 
3994
                ;;
 
3995
        *)
 
3996
                ;;
 
3997
esac
 
3998
 
 
3999
 
 
4000
 
3674
4001
CFLAG_RUNTIME_LIBRARY_PATH="-Wl,-R"
3675
4002
case $host_os in
3676
4003
  darwin*)
3687
4014
        ;;
3688
4015
esac
3689
4016
 
3690
 
 
3691
 
if type getconf >/dev/null 2>&1; then
3692
 
        CFLAGS="$CFLAGS `getconf LFS_CFLAGS 2>/dev/null`"
3693
 
        DEBUG_CFLAGS="$DEBUG_CFLAGS `getconf LFS_CFLAGS 2>/dev/null`"
3694
 
        LDFLAGS="$LDFLAGS `getconf LFS_LDFLAGS 2>/dev/null`"
3695
 
        LIBS="$LIBS `getconf LFS_LIBS 2>/dev/null`"
 
4017
lfs_conf=ok
 
4018
lfs_source=none
 
4019
if test "${LFS_CFLAGS+set}" = "set" || \
 
4020
   test "${LFS_LDFLAGS+set}" = "set" || \
 
4021
   test "${LFS_LIBS+set}" = "set"; then
 
4022
    lfs_source=user
 
4023
else
 
4024
 
 
4025
if test "$cross_compiling" != "yes"; then
 
4026
    # Extract the first word of "getconf", so it can be a program name with args.
 
4027
set dummy getconf; ac_word=$2
 
4028
echo "$as_me:$LINENO: checking for $ac_word" >&5
 
4029
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 
4030
if test "${ac_cv_prog_GETCONF+set}" = set; then
 
4031
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
4032
else
 
4033
  if test -n "$GETCONF"; then
 
4034
  ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test.
 
4035
else
 
4036
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
4037
for as_dir in $PATH
 
4038
do
 
4039
  IFS=$as_save_IFS
 
4040
  test -z "$as_dir" && as_dir=.
 
4041
  for ac_exec_ext in '' $ac_executable_extensions; do
 
4042
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
 
4043
    ac_cv_prog_GETCONF="getconf"
 
4044
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
 
4045
    break 2
 
4046
  fi
 
4047
done
 
4048
done
 
4049
 
 
4050
  test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="false"
 
4051
fi
 
4052
fi
 
4053
GETCONF=$ac_cv_prog_GETCONF
 
4054
if test -n "$GETCONF"; then
 
4055
  echo "$as_me:$LINENO: result: $GETCONF" >&5
 
4056
echo "${ECHO_T}$GETCONF" >&6
 
4057
else
 
4058
  echo "$as_me:$LINENO: result: no" >&5
 
4059
echo "${ECHO_T}no" >&6
 
4060
fi
 
4061
 
 
4062
else
 
4063
        host_getconf="$host_alias-getconf"
 
4064
    # Extract the first word of "$host_getconf", so it can be a program name with args.
 
4065
set dummy $host_getconf; ac_word=$2
 
4066
echo "$as_me:$LINENO: checking for $ac_word" >&5
 
4067
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 
4068
if test "${ac_cv_prog_GETCONF+set}" = set; then
 
4069
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
4070
else
 
4071
  if test -n "$GETCONF"; then
 
4072
  ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test.
 
4073
else
 
4074
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
4075
for as_dir in $PATH
 
4076
do
 
4077
  IFS=$as_save_IFS
 
4078
  test -z "$as_dir" && as_dir=.
 
4079
  for ac_exec_ext in '' $ac_executable_extensions; do
 
4080
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
 
4081
    ac_cv_prog_GETCONF="$host_getconf"
 
4082
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
 
4083
    break 2
 
4084
  fi
 
4085
done
 
4086
done
 
4087
 
 
4088
  test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="false"
 
4089
fi
 
4090
fi
 
4091
GETCONF=$ac_cv_prog_GETCONF
 
4092
if test -n "$GETCONF"; then
 
4093
  echo "$as_me:$LINENO: result: $GETCONF" >&5
 
4094
echo "${ECHO_T}$GETCONF" >&6
 
4095
else
 
4096
  echo "$as_me:$LINENO: result: no" >&5
 
4097
echo "${ECHO_T}no" >&6
 
4098
fi
 
4099
 
 
4100
    if test "$GETCONF" = "false" && test "$erl_xcomp_sysroot" != ""; then
 
4101
                                                        GETCONF=
 
4102
        prfx="$erl_xcomp_sysroot"
 
4103
        if test -n "$ac_tool_prefix"; then
 
4104
  # Extract the first word of "${ac_tool_prefix}getconf", so it can be a program name with args.
 
4105
set dummy ${ac_tool_prefix}getconf; ac_word=$2
 
4106
echo "$as_me:$LINENO: checking for $ac_word" >&5
 
4107
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 
4108
if test "${ac_cv_path_GETCONF+set}" = set; then
 
4109
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
4110
else
 
4111
  case $GETCONF in
 
4112
  [\\/]* | ?:[\\/]*)
 
4113
  ac_cv_path_GETCONF="$GETCONF" # Let the user override the test with a path.
 
4114
  ;;
 
4115
  *)
 
4116
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
4117
as_dummy=""$prfx/usr/bin:$prfx/bin:$prfx/usr/local/bin""
 
4118
for as_dir in $as_dummy
 
4119
do
 
4120
  IFS=$as_save_IFS
 
4121
  test -z "$as_dir" && as_dir=.
 
4122
  for ac_exec_ext in '' $ac_executable_extensions; do
 
4123
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
 
4124
    ac_cv_path_GETCONF="$as_dir/$ac_word$ac_exec_ext"
 
4125
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
 
4126
    break 2
 
4127
  fi
 
4128
done
 
4129
done
 
4130
 
 
4131
  ;;
 
4132
esac
 
4133
fi
 
4134
GETCONF=$ac_cv_path_GETCONF
 
4135
 
 
4136
if test -n "$GETCONF"; then
 
4137
  echo "$as_me:$LINENO: result: $GETCONF" >&5
 
4138
echo "${ECHO_T}$GETCONF" >&6
 
4139
else
 
4140
  echo "$as_me:$LINENO: result: no" >&5
 
4141
echo "${ECHO_T}no" >&6
 
4142
fi
 
4143
 
 
4144
fi
 
4145
if test -z "$ac_cv_path_GETCONF"; then
 
4146
  ac_pt_GETCONF=$GETCONF
 
4147
  # Extract the first word of "getconf", so it can be a program name with args.
 
4148
set dummy getconf; ac_word=$2
 
4149
echo "$as_me:$LINENO: checking for $ac_word" >&5
 
4150
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 
4151
if test "${ac_cv_path_ac_pt_GETCONF+set}" = set; then
 
4152
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
4153
else
 
4154
  case $ac_pt_GETCONF in
 
4155
  [\\/]* | ?:[\\/]*)
 
4156
  ac_cv_path_ac_pt_GETCONF="$ac_pt_GETCONF" # Let the user override the test with a path.
 
4157
  ;;
 
4158
  *)
 
4159
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
4160
as_dummy=""$prfx/usr/bin:$prfx/bin:$prfx/usr/local/bin""
 
4161
for as_dir in $as_dummy
 
4162
do
 
4163
  IFS=$as_save_IFS
 
4164
  test -z "$as_dir" && as_dir=.
 
4165
  for ac_exec_ext in '' $ac_executable_extensions; do
 
4166
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
 
4167
    ac_cv_path_ac_pt_GETCONF="$as_dir/$ac_word$ac_exec_ext"
 
4168
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
 
4169
    break 2
 
4170
  fi
 
4171
done
 
4172
done
 
4173
 
 
4174
  test -z "$ac_cv_path_ac_pt_GETCONF" && ac_cv_path_ac_pt_GETCONF="false"
 
4175
  ;;
 
4176
esac
 
4177
fi
 
4178
ac_pt_GETCONF=$ac_cv_path_ac_pt_GETCONF
 
4179
 
 
4180
if test -n "$ac_pt_GETCONF"; then
 
4181
  echo "$as_me:$LINENO: result: $ac_pt_GETCONF" >&5
 
4182
echo "${ECHO_T}$ac_pt_GETCONF" >&6
 
4183
else
 
4184
  echo "$as_me:$LINENO: result: no" >&5
 
4185
echo "${ECHO_T}no" >&6
 
4186
fi
 
4187
 
 
4188
  GETCONF=$ac_pt_GETCONF
 
4189
else
 
4190
  GETCONF="$ac_cv_path_GETCONF"
 
4191
fi
 
4192
 
 
4193
    fi
 
4194
fi
 
4195
 
 
4196
   test "$GETCONF" = "false" || lfs_source=getconf
 
4197
fi
 
4198
 
 
4199
if test "$lfs_source" = "none"; then
 
4200
    { echo "$as_me:$LINENO: WARNING: Do not know how to check for large file support flags; no getconf is available" >&5
 
4201
echo "$as_me: WARNING: Do not know how to check for large file support flags; no getconf is available" >&2;}
 
4202
else
 
4203
    for var in CFLAGS LDFLAGS LIBS; do
 
4204
        echo "$as_me:$LINENO: checking for large file support $var" >&5
 
4205
echo $ECHO_N "checking for large file support $var... $ECHO_C" >&6
 
4206
        if test $lfs_source = user; then
 
4207
            eval "lfs_val=\"\$LFS_$var\""
 
4208
        else
 
4209
            eval "lfs_var=LFS_$var"
 
4210
            lfs_val=`$GETCONF $lfs_var 2>/dev/null` || lfs_conf=failed
 
4211
            if test $lfs_conf = failed; then
 
4212
                echo "$as_me:$LINENO: result: failed" >&5
 
4213
echo "${ECHO_T}failed" >&6
 
4214
                break
 
4215
            fi
 
4216
            eval "$lfs_var=\"$lfs_val\""
 
4217
        fi
 
4218
        test "$lfs_val" != "" || lfs_val=none
 
4219
        echo "$as_me:$LINENO: result: $lfs_val" >&5
 
4220
echo "${ECHO_T}$lfs_val" >&6
 
4221
    done
 
4222
    if test $lfs_conf = failed; then
 
4223
        { echo "$as_me:$LINENO: WARNING: Check for large file support flags failed; $GETCONF failed" >&5
 
4224
echo "$as_me: WARNING: Check for large file support flags failed; $GETCONF failed" >&2;}
 
4225
    else
 
4226
        CFLAGS="$CFLAGS $LFS_CFLAGS"
 
4227
        DEBUG_CFLAGS="$DEBUG_CFLAGS $LFS_CFLAGS"
 
4228
        LDFLAGS="$LDFLAGS $LFS_LDFLAGS"
 
4229
        LIBS="$LIBS $LFS_LIBS"
 
4230
    fi
3696
4231
fi
3697
4232
 
3698
4233
if test "x$GCC" = xyes; then
3699
4234
  # until the emulator can handle this, I suggest we turn it off!
3700
4235
  #WFLAGS="-Wall -Wshadow -Wcast-qual -Wmissing-declarations"
3701
 
  WFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes"
 
4236
  WFLAGS="-Wall -Wstrict-prototypes"
 
4237
 
 
4238
  case "$host_cpu" in
 
4239
    tile*)
 
4240
      # tile-gcc is a bit stricter with -Wmissing-prototypes than other gccs,
 
4241
      # and too strict for our taste.
 
4242
      ;;
 
4243
    *)
 
4244
      WFLAGS="$WFLAGS -Wmissing-prototypes";;
 
4245
  esac
3702
4246
 
3703
4247
  saved_CFLAGS=$CFLAGS
3704
4248
  CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4661
5205
_ACEOF
4662
5206
 
4663
5207
 # Needed for ARCH and smp checks below
4664
 
 
4665
 
 
4666
 
if test "x$erl_xcomp_os" != "x"; then
4667
 
    chk_opsys_=$erl_xcomp_os
4668
 
else
4669
 
    if test "x$host_os" = "xwin32"; then
4670
 
        chk_opsys_=win32
4671
 
    else
4672
 
        chk_opsys_=`uname -s`
4673
 
        if test "x$chk_opsys_" = "xSunOS"; then
4674
 
            chk_opsys_=$chk_opsys_`uname -r`
4675
 
        fi
 
5208
if test "x$ac_cv_sizeof_void_p" = x8; then
 
5209
  EXTERNAL_WORD_SIZE=64
 
5210
 
 
5211
else
 
5212
  EXTERNAL_WORD_SIZE=32
 
5213
 
 
5214
fi
 
5215
 
 
5216
 
 
5217
if test "x$host_alias" != "x"; then
 
5218
    chk_opsys_=$host_os
 
5219
else
 
5220
    chk_opsys_=`uname -s`
 
5221
    if test "x$chk_opsys_" = "xSunOS"; then
 
5222
        chk_opsys_=$chk_opsys_`uname -r`
4676
5223
    fi
4677
5224
fi
4678
5225
case $chk_opsys_ in
4684
5231
    *)                          OPSYS=noopsys
4685
5232
esac
4686
5233
 
4687
 
if test "x$erl_xcomp_hw" != "x"; then
4688
 
    chk_arch_=$erl_xcomp_hw
 
5234
if test "x$host_alias" != "x" -a "x$host_cpu" != "x"; then
 
5235
    chk_arch_=$host_cpu
4689
5236
else
4690
5237
    chk_arch_=`uname -m`
4691
5238
fi
 
5239
 
4692
5240
case $chk_arch_ in
4693
5241
    sun4u)      ARCH=ultrasparc;;
4694
5242
    sparc64)    ARCH=sparc64;;
4808
5356
                                        LDFLAGS="-m64 $LDFLAGS"
4809
5357
                                ;;
4810
5358
                        esac
 
5359
                fi;
 
5360
                if test X${enable_m32_build} = Xyes; then
 
5361
                        { echo "$as_me:$LINENO: Adjusting LDFLAGS to use -m32" >&5
 
5362
echo "$as_me: Adjusting LDFLAGS to use -m32" >&6;} ;
 
5363
                        case $LDFLAGS in
 
5364
                                *-m32*)
 
5365
                                        ;;
 
5366
                                *)
 
5367
                                        LDFLAGS="-m32 $LDFLAGS"
 
5368
                                ;;
 
5369
                        esac ;
4811
5370
                fi
4812
5371
                ;;
4813
5372
esac
4834
5393
 
4835
5394
 
4836
5395
 
 
5396
 
 
5397
echo "$as_me:$LINENO: checking if we are building a halfword emulator (32bit heap on 64bit machine)" >&5
 
5398
echo $ECHO_N "checking if we are building a halfword emulator (32bit heap on 64bit machine)... $ECHO_C" >&6
 
5399
if test "$enable_halfword_emulator" = "yes"; then
 
5400
        if test "$ARCH" = "amd64"; then
 
5401
 
 
5402
cat >>confdefs.h <<\_ACEOF
 
5403
#define HALFWORD_HEAP_EMULATOR 1
 
5404
_ACEOF
 
5405
 
 
5406
                echo "$as_me:$LINENO: result: yes" >&5
 
5407
echo "${ECHO_T}yes" >&6
 
5408
        else
 
5409
                { { echo "$as_me:$LINENO: error: no; halfword emulator not supported on this architecture" >&5
 
5410
echo "$as_me: error: no; halfword emulator not supported on this architecture" >&2;}
 
5411
   { (exit 1); exit 1; }; }
 
5412
        fi
 
5413
else
 
5414
        echo "$as_me:$LINENO: result: no" >&5
 
5415
echo "${ECHO_T}no" >&6
 
5416
fi
 
5417
 
 
5418
 
 
5419
 
 
5420
 
 
5421
 
4837
5422
ac_ext=c
4838
5423
ac_cpp='$CPP $CPPFLAGS'
4839
5424
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5260
5845
 
5261
5846
 
5262
5847
 
5263
 
# Extract the first word of "ar", so it can be a program name with args.
5264
 
set dummy ar; ac_word=$2
 
5848
if test -n "$ac_tool_prefix"; then
 
5849
  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 
5850
set dummy ${ac_tool_prefix}ar; ac_word=$2
5265
5851
echo "$as_me:$LINENO: checking for $ac_word" >&5
5266
5852
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5267
5853
if test "${ac_cv_prog_AR+set}" = set; then
5277
5863
  test -z "$as_dir" && as_dir=.
5278
5864
  for ac_exec_ext in '' $ac_executable_extensions; do
5279
5865
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5280
 
    ac_cv_prog_AR="ar"
 
5866
    ac_cv_prog_AR="${ac_tool_prefix}ar"
5281
5867
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5282
5868
    break 2
5283
5869
  fi
5284
5870
done
5285
5871
done
5286
5872
 
5287
 
  test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="false"
5288
5873
fi
5289
5874
fi
5290
5875
AR=$ac_cv_prog_AR
5296
5881
echo "${ECHO_T}no" >&6
5297
5882
fi
5298
5883
 
 
5884
fi
 
5885
if test -z "$ac_cv_prog_AR"; then
 
5886
  ac_ct_AR=$AR
 
5887
  # Extract the first word of "ar", so it can be a program name with args.
 
5888
set dummy ar; ac_word=$2
 
5889
echo "$as_me:$LINENO: checking for $ac_word" >&5
 
5890
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 
5891
if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
 
5892
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
5893
else
 
5894
  if test -n "$ac_ct_AR"; then
 
5895
  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
 
5896
else
 
5897
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
5898
for as_dir in $PATH
 
5899
do
 
5900
  IFS=$as_save_IFS
 
5901
  test -z "$as_dir" && as_dir=.
 
5902
  for ac_exec_ext in '' $ac_executable_extensions; do
 
5903
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
 
5904
    ac_cv_prog_ac_ct_AR="ar"
 
5905
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
 
5906
    break 2
 
5907
  fi
 
5908
done
 
5909
done
 
5910
 
 
5911
  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
 
5912
fi
 
5913
fi
 
5914
ac_ct_AR=$ac_cv_prog_ac_ct_AR
 
5915
if test -n "$ac_ct_AR"; then
 
5916
  echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
 
5917
echo "${ECHO_T}$ac_ct_AR" >&6
 
5918
else
 
5919
  echo "$as_me:$LINENO: result: no" >&5
 
5920
echo "${ECHO_T}no" >&6
 
5921
fi
 
5922
 
 
5923
  AR=$ac_ct_AR
 
5924
else
 
5925
  AR="$ac_cv_prog_AR"
 
5926
fi
 
5927
 
5299
5928
if test "$ac_cv_prog_AR" = false; then
5300
5929
  { { echo "$as_me:$LINENO: error: No 'ar' command found in PATH" >&5
5301
5930
echo "$as_me: error: No 'ar' command found in PATH" >&2;}
5449
6078
 
5450
6079
if test -z "$XSLTPROC"; then
5451
6080
  echo "xsltproc" >> doc/CONF_INFO
5452
 
  { echo "$as_me:$LINENO: WARNING: No 'xsltproc' command found: the documentation can not be built" >&5
5453
 
echo "$as_me: WARNING: No 'xsltproc' command found: the documentation can not be built" >&2;}
 
6081
  { echo "$as_me:$LINENO: WARNING: No 'xsltproc' command found: the documentation cannot be built" >&5
 
6082
echo "$as_me: WARNING: No 'xsltproc' command found: the documentation cannot be built" >&2;}
5454
6083
fi
5455
6084
 
5456
6085
for ac_prog in fop
5494
6123
done
5495
6124
 
5496
6125
if test -z "$FOP"; then
 
6126
  FOP="$ERL_TOP/make/fakefop"
5497
6127
  echo "fop" >> doc/CONF_INFO
5498
 
  { echo "$as_me:$LINENO: WARNING: No 'fop' command found: the documentation can not be built" >&5
5499
 
echo "$as_me: WARNING: No 'fop' command found: the documentation can not be built" >&2;}
 
6128
  { echo "$as_me:$LINENO: WARNING: No 'fop' command found: going to generate placeholder PDF files" >&5
 
6129
echo "$as_me: WARNING: No 'fop' command found: going to generate placeholder PDF files" >&2;}
5500
6130
fi
5501
6131
 
5502
6132
case $host in
5641
6271
HCFLAGS=""
5642
6272
HCFLAGS="$HCFLAGS -I${ERL_TOP}/erts/$host"
5643
6273
vxworks_reclaim=""
 
6274
 
 
6275
USER_LD=$LD
 
6276
USER_LDFLAGS="$LDFLAGS"
5644
6277
LD='$(CC)'
5645
6278
 
5646
6279
 
 
6280
LDFLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH"
 
6281
 
 
6282
 
5647
6283
 
5648
6284
 
5649
6285
 
6113
6749
 
6114
6750
 
6115
6751
 
6116
 
ethr_modified_default_stack_size=
6117
 
 
6118
 
ethr_lib_name=ethread
6119
 
 
6120
 
ETHR_THR_LIB_BASE=
6121
 
ETHR_THR_LIB_BASE_NAME=
6122
 
ETHR_X_LIBS=
6123
 
ETHR_LIBS=
6124
 
ETHR_LIB_NAME=
6125
 
ETHR_DEFS=
6126
 
 
 
6752
 
 
6753
 
 
6754
NEED_NPTL_PTHREAD_H=no
6127
6755
 
6128
6756
echo "$as_me:$LINENO: checking for native win32 threads" >&5
6129
6757
echo $ECHO_N "checking for native win32 threads... $ECHO_C" >&6
6130
6758
if test "X$host_os" = "Xwin32"; then
6131
6759
    echo "$as_me:$LINENO: result: yes" >&5
6132
6760
echo "${ECHO_T}yes" >&6
6133
 
    # * _WIN32_WINNT >= 0x0400 is needed for
6134
 
    #   TryEnterCriticalSection
6135
 
    # * _WIN32_WINNT >= 0x0403 is needed for
6136
 
    #   InitializeCriticalSectionAndSpinCount
6137
 
    # The ethread lib will refuse to build if _WIN32_WINNT < 0x0403.
6138
 
    #
6139
 
    # -D_WIN32_WINNT should have been defined in $CPPFLAGS; fetch it
6140
 
    # and save it in ETHR_DEFS.
6141
 
    found_win32_winnt=no
6142
 
    for cppflag in $CPPFLAGS; do
6143
 
        case $cppflag in
6144
 
            -DWINVER*)
6145
 
                ETHR_DEFS="$ETHR_DEFS $cppflag"
6146
 
                ;;
6147
 
            -D_WIN32_WINNT*)
6148
 
                ETHR_DEFS="$ETHR_DEFS $cppflag"
6149
 
                found_win32_winnt=yes
6150
 
                ;;
6151
 
            *)
6152
 
                ;;
6153
 
        esac
6154
 
    done
6155
 
    if test $found_win32_winnt = no; then
6156
 
        { { echo "$as_me:$LINENO: error: -D_WIN32_WINNT missing in CPPFLAGS" >&5
6157
 
echo "$as_me: error: -D_WIN32_WINNT missing in CPPFLAGS" >&2;}
6158
 
   { (exit 1); exit 1; }; }
6159
 
    fi
6160
 
    ETHR_X_LIBS=
6161
 
    ETHR_THR_LIB_BASE=win32_threads
6162
 
 
6163
 
cat >>confdefs.h <<\_ACEOF
6164
 
#define ETHR_WIN32_THREADS 1
6165
 
_ACEOF
6166
 
 
 
6761
    THR_DEFS="-DWIN32_THREADS"
 
6762
    THR_LIBS=
 
6763
    THR_LIB_NAME=win32_threads
 
6764
    THR_LIB_TYPE=win32_threads
6167
6765
else
6168
6766
    echo "$as_me:$LINENO: result: no" >&5
6169
6767
echo "${ECHO_T}no" >&6
 
6768
    THR_DEFS=
 
6769
    THR_LIBS=
 
6770
    THR_LIB_NAME=
 
6771
    THR_LIB_TYPE=posix_unknown
6170
6772
 
6171
6773
 
6172
6774
    echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
6234
6836
echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
6235
6837
echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
6236
6838
if test $ac_cv_lib_pthread_pthread_create = yes; then
6237
 
  ETHR_X_LIBS="-lpthread"
 
6839
  THR_LIBS="-lpthread"
6238
6840
fi
6239
6841
 
6240
6842
 
6241
 
    if test "x$ETHR_X_LIBS" = "x"; then
 
6843
    if test "x$THR_LIBS" = "x"; then
6242
6844
        echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
6243
6845
echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
6244
6846
if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
6304
6906
echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
6305
6907
echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
6306
6908
if test $ac_cv_lib_c_r_pthread_create = yes; then
6307
 
  ETHR_X_LIBS="-lc_r"
 
6909
  THR_LIBS="-lc_r"
6308
6910
fi
6309
6911
 
6310
6912
    fi
6311
6913
 
6312
 
    if test "x$ETHR_X_LIBS" = "x"; then
 
6914
    if test "x$THR_LIBS" = "x"; then
6313
6915
        echo "$as_me:$LINENO: checking if the '-pthread' switch can be used" >&5
6314
6916
echo $ECHO_N "checking if the '-pthread' switch can be used... $ECHO_C" >&6
6315
6917
        saved_cflags=$CFLAGS
6351
6953
  ac_status=$?
6352
6954
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6353
6955
  (exit $ac_status); }; }; then
6354
 
  ETHR_DEFS="-pthread"
6355
 
                     ETHR_X_LIBS="-pthread"
 
6956
  THR_DEFS="-pthread"
 
6957
                     THR_LIBS="-pthread"
6356
6958
else
6357
6959
  echo "$as_me: failed program was:" >&5
6358
6960
sed 's/^/| /' conftest.$ac_ext >&5
6361
6963
rm -f conftest.err conftest.$ac_objext \
6362
6964
      conftest$ac_exeext conftest.$ac_ext
6363
6965
        CFLAGS=$saved_cflags
6364
 
        if test "x$ETHR_X_LIBS" != "x"; then
 
6966
        if test "x$THR_LIBS" != "x"; then
6365
6967
            echo "$as_me:$LINENO: result: yes" >&5
6366
6968
echo "${ECHO_T}yes" >&6
6367
6969
        else
6370
6972
        fi
6371
6973
    fi
6372
6974
 
6373
 
    if test "x$ETHR_X_LIBS" != "x"; then
6374
 
        ETHR_DEFS="$ETHR_DEFS -D_THREAD_SAFE -D_REENTRANT"
6375
 
        ETHR_THR_LIB_BASE=pthread
6376
 
 
6377
 
cat >>confdefs.h <<\_ACEOF
6378
 
#define ETHR_PTHREADS 1
6379
 
_ACEOF
6380
 
 
 
6975
    if test "x$THR_LIBS" != "x"; then
 
6976
        THR_DEFS="$THR_DEFS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS"
 
6977
        THR_LIB_NAME=pthread
6381
6978
        case $host_os in
6382
 
            openbsd*)
6383
 
                # The default stack size is insufficient for our needs
6384
 
                # on OpenBSD. We increase it to 256 kilo words.
6385
 
                ethr_modified_default_stack_size=256;;
6386
6979
            solaris*)
6387
 
                ETHR_DEFS="$ETHR_DEFS -D_POSIX_PTHREAD_SEMANTICS" ;;
 
6980
                THR_DEFS="$THR_DEFS -D_POSIX_PTHREAD_SEMANTICS" ;;
6388
6981
            linux*)
6389
 
                ETHR_DEFS="$ETHR_DEFS -D_POSIX_THREAD_SAFE_FUNCTIONS -D_GNU_SOURCE"
6390
 
                if test "x$erl_xcomp_linux_kernel" != "x"; then
6391
 
                    linux_kernel_vsn_=$erl_xcomp_linux_kernel
6392
 
                else
6393
 
                    linux_kernel_vsn_=`uname -r`
6394
 
                fi
6395
 
                usable_sigusrx=no
6396
 
                usable_sigaltstack=no
6397
 
 
6398
 
                # FIXME: Test for actual problems instead of kernel versions.
6399
 
                case $linux_kernel_vsn_ in
6400
 
                    [0-1].*|2.[0-1]|2.[0-1].*)
6401
 
                        ;;
6402
 
                    2.[2-3]|2.[2-3].*)
6403
 
                        usable_sigusrx=yes
6404
 
                        ;;
6405
 
                    *)
6406
 
                        usable_sigusrx=yes
6407
 
                        usable_sigaltstack=yes
6408
 
                        ;;
6409
 
                esac
6410
 
 
6411
 
                echo "$as_me:$LINENO: checking if SIGUSR1 and SIGUSR2 can be used" >&5
6412
 
echo $ECHO_N "checking if SIGUSR1 and SIGUSR2 can be used... $ECHO_C" >&6
6413
 
                echo "$as_me:$LINENO: result: $usable_sigusrx" >&5
6414
 
echo "${ECHO_T}$usable_sigusrx" >&6
6415
 
                if test $usable_sigusrx = no; then
6416
 
                    ETHR_DEFS="$ETHR_DEFS -DETHR_UNUSABLE_SIGUSRX"
6417
 
                fi
6418
 
 
6419
 
                echo "$as_me:$LINENO: checking if sigaltstack can be used" >&5
6420
 
echo $ECHO_N "checking if sigaltstack can be used... $ECHO_C" >&6
6421
 
                echo "$as_me:$LINENO: result: $usable_sigaltstack" >&5
6422
 
echo "${ECHO_T}$usable_sigaltstack" >&6
6423
 
                if test $usable_sigaltstack = no; then
6424
 
                    ETHR_DEFS="$ETHR_DEFS -DETHR_UNUSABLE_SIGALTSTACK"
6425
 
                fi
 
6982
                THR_DEFS="$THR_DEFS -D_POSIX_THREAD_SAFE_FUNCTIONS"
 
6983
 
 
6984
 
 
6985
if test "$cross_compiling" != "yes"; then
 
6986
    # Extract the first word of "getconf", so it can be a program name with args.
 
6987
set dummy getconf; ac_word=$2
 
6988
echo "$as_me:$LINENO: checking for $ac_word" >&5
 
6989
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 
6990
if test "${ac_cv_prog_GETCONF+set}" = set; then
 
6991
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
6992
else
 
6993
  if test -n "$GETCONF"; then
 
6994
  ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test.
 
6995
else
 
6996
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
6997
for as_dir in $PATH
 
6998
do
 
6999
  IFS=$as_save_IFS
 
7000
  test -z "$as_dir" && as_dir=.
 
7001
  for ac_exec_ext in '' $ac_executable_extensions; do
 
7002
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
 
7003
    ac_cv_prog_GETCONF="getconf"
 
7004
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
 
7005
    break 2
 
7006
  fi
 
7007
done
 
7008
done
 
7009
 
 
7010
  test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="false"
 
7011
fi
 
7012
fi
 
7013
GETCONF=$ac_cv_prog_GETCONF
 
7014
if test -n "$GETCONF"; then
 
7015
  echo "$as_me:$LINENO: result: $GETCONF" >&5
 
7016
echo "${ECHO_T}$GETCONF" >&6
 
7017
else
 
7018
  echo "$as_me:$LINENO: result: no" >&5
 
7019
echo "${ECHO_T}no" >&6
 
7020
fi
 
7021
 
 
7022
else
 
7023
        host_getconf="$host_alias-getconf"
 
7024
    # Extract the first word of "$host_getconf", so it can be a program name with args.
 
7025
set dummy $host_getconf; ac_word=$2
 
7026
echo "$as_me:$LINENO: checking for $ac_word" >&5
 
7027
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 
7028
if test "${ac_cv_prog_GETCONF+set}" = set; then
 
7029
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7030
else
 
7031
  if test -n "$GETCONF"; then
 
7032
  ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test.
 
7033
else
 
7034
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
7035
for as_dir in $PATH
 
7036
do
 
7037
  IFS=$as_save_IFS
 
7038
  test -z "$as_dir" && as_dir=.
 
7039
  for ac_exec_ext in '' $ac_executable_extensions; do
 
7040
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
 
7041
    ac_cv_prog_GETCONF="$host_getconf"
 
7042
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
 
7043
    break 2
 
7044
  fi
 
7045
done
 
7046
done
 
7047
 
 
7048
  test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="false"
 
7049
fi
 
7050
fi
 
7051
GETCONF=$ac_cv_prog_GETCONF
 
7052
if test -n "$GETCONF"; then
 
7053
  echo "$as_me:$LINENO: result: $GETCONF" >&5
 
7054
echo "${ECHO_T}$GETCONF" >&6
 
7055
else
 
7056
  echo "$as_me:$LINENO: result: no" >&5
 
7057
echo "${ECHO_T}no" >&6
 
7058
fi
 
7059
 
 
7060
    if test "$GETCONF" = "false" && test "$erl_xcomp_sysroot" != ""; then
 
7061
                                                        GETCONF=
 
7062
        prfx="$erl_xcomp_sysroot"
 
7063
        if test -n "$ac_tool_prefix"; then
 
7064
  # Extract the first word of "${ac_tool_prefix}getconf", so it can be a program name with args.
 
7065
set dummy ${ac_tool_prefix}getconf; ac_word=$2
 
7066
echo "$as_me:$LINENO: checking for $ac_word" >&5
 
7067
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 
7068
if test "${ac_cv_path_GETCONF+set}" = set; then
 
7069
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7070
else
 
7071
  case $GETCONF in
 
7072
  [\\/]* | ?:[\\/]*)
 
7073
  ac_cv_path_GETCONF="$GETCONF" # Let the user override the test with a path.
 
7074
  ;;
 
7075
  *)
 
7076
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
7077
as_dummy=""$prfx/usr/bin:$prfx/bin:$prfx/usr/local/bin""
 
7078
for as_dir in $as_dummy
 
7079
do
 
7080
  IFS=$as_save_IFS
 
7081
  test -z "$as_dir" && as_dir=.
 
7082
  for ac_exec_ext in '' $ac_executable_extensions; do
 
7083
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
 
7084
    ac_cv_path_GETCONF="$as_dir/$ac_word$ac_exec_ext"
 
7085
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
 
7086
    break 2
 
7087
  fi
 
7088
done
 
7089
done
 
7090
 
 
7091
  ;;
 
7092
esac
 
7093
fi
 
7094
GETCONF=$ac_cv_path_GETCONF
 
7095
 
 
7096
if test -n "$GETCONF"; then
 
7097
  echo "$as_me:$LINENO: result: $GETCONF" >&5
 
7098
echo "${ECHO_T}$GETCONF" >&6
 
7099
else
 
7100
  echo "$as_me:$LINENO: result: no" >&5
 
7101
echo "${ECHO_T}no" >&6
 
7102
fi
 
7103
 
 
7104
fi
 
7105
if test -z "$ac_cv_path_GETCONF"; then
 
7106
  ac_pt_GETCONF=$GETCONF
 
7107
  # Extract the first word of "getconf", so it can be a program name with args.
 
7108
set dummy getconf; ac_word=$2
 
7109
echo "$as_me:$LINENO: checking for $ac_word" >&5
 
7110
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 
7111
if test "${ac_cv_path_ac_pt_GETCONF+set}" = set; then
 
7112
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7113
else
 
7114
  case $ac_pt_GETCONF in
 
7115
  [\\/]* | ?:[\\/]*)
 
7116
  ac_cv_path_ac_pt_GETCONF="$ac_pt_GETCONF" # Let the user override the test with a path.
 
7117
  ;;
 
7118
  *)
 
7119
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
7120
as_dummy=""$prfx/usr/bin:$prfx/bin:$prfx/usr/local/bin""
 
7121
for as_dir in $as_dummy
 
7122
do
 
7123
  IFS=$as_save_IFS
 
7124
  test -z "$as_dir" && as_dir=.
 
7125
  for ac_exec_ext in '' $ac_executable_extensions; do
 
7126
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
 
7127
    ac_cv_path_ac_pt_GETCONF="$as_dir/$ac_word$ac_exec_ext"
 
7128
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
 
7129
    break 2
 
7130
  fi
 
7131
done
 
7132
done
 
7133
 
 
7134
  test -z "$ac_cv_path_ac_pt_GETCONF" && ac_cv_path_ac_pt_GETCONF="false"
 
7135
  ;;
 
7136
esac
 
7137
fi
 
7138
ac_pt_GETCONF=$ac_cv_path_ac_pt_GETCONF
 
7139
 
 
7140
if test -n "$ac_pt_GETCONF"; then
 
7141
  echo "$as_me:$LINENO: result: $ac_pt_GETCONF" >&5
 
7142
echo "${ECHO_T}$ac_pt_GETCONF" >&6
 
7143
else
 
7144
  echo "$as_me:$LINENO: result: no" >&5
 
7145
echo "${ECHO_T}no" >&6
 
7146
fi
 
7147
 
 
7148
  GETCONF=$ac_pt_GETCONF
 
7149
else
 
7150
  GETCONF="$ac_cv_path_GETCONF"
 
7151
fi
 
7152
 
 
7153
    fi
 
7154
fi
6426
7155
 
6427
7156
                echo "$as_me:$LINENO: checking for Native POSIX Thread Library" >&5
6428
7157
echo $ECHO_N "checking for Native POSIX Thread Library... $ECHO_C" >&6
6429
 
                case `getconf GNU_LIBPTHREAD_VERSION 2>/dev/null` in
6430
 
                    nptl*) nptl=yes;;
6431
 
                    NPTL*) nptl=yes;;
6432
 
                    *)  nptl=no;;
6433
 
                esac
 
7158
                libpthr_vsn=`$GETCONF GNU_LIBPTHREAD_VERSION 2>/dev/null`
 
7159
                if test $? -eq 0; then
 
7160
                    case "$libpthr_vsn" in
 
7161
                        *nptl*|*NPTL*) nptl=yes;;
 
7162
                        *) nptl=no;;
 
7163
                    esac
 
7164
                elif test "$cross_compiling" = "yes"; then
 
7165
                    case "$erl_xcomp_linux_nptl" in
 
7166
                        "") nptl=cross;;
 
7167
                        yes|no) nptl=$erl_xcomp_linux_nptl;;
 
7168
                        *) { { echo "$as_me:$LINENO: error: Bad erl_xcomp_linux_nptl value: $erl_xcomp_linux_nptl" >&5
 
7169
echo "$as_me: error: Bad erl_xcomp_linux_nptl value: $erl_xcomp_linux_nptl" >&2;}
 
7170
   { (exit 1); exit 1; }; };;
 
7171
                    esac
 
7172
                else
 
7173
                    nptl=no
 
7174
                fi
6434
7175
                echo "$as_me:$LINENO: result: $nptl" >&5
6435
7176
echo "${ECHO_T}$nptl" >&6
6436
 
                if test $nptl = yes; then
6437
 
                    ETHR_THR_LIB_BASE_NAME=nptl
 
7177
                if test $nptl = cross; then
 
7178
                    nptl=yes
 
7179
                    { echo "$as_me:$LINENO: WARNING: result yes guessed because of cross compilation" >&5
 
7180
echo "$as_me: WARNING: result yes guessed because of cross compilation" >&2;}
6438
7181
                fi
6439
7182
                if test $nptl = yes; then
 
7183
                    THR_LIB_TYPE=posix_nptl
6440
7184
                    need_nptl_incldir=no
6441
7185
                    if test "${ac_cv_header_nptl_pthread_h+set}" = set; then
6442
7186
  echo "$as_me:$LINENO: checking for nptl/pthread.h" >&5
6577
7321
fi
6578
7322
if test $ac_cv_header_nptl_pthread_h = yes; then
6579
7323
  need_nptl_incldir=yes
 
7324
                                     NEED_NPTL_PTHREAD_H=yes
6580
7325
fi
6581
7326
 
6582
7327
 
6583
7328
                    if test $need_nptl_incldir = yes; then
6584
7329
                        # Ahh...
6585
 
                        nptl_path="$C_INCLUDE_PATH:$CPATH:/usr/local/include:/usr/include"
 
7330
                        nptl_path="$C_INCLUDE_PATH:$CPATH"
 
7331
                        if test X$cross_compiling != Xyes; then
 
7332
                            nptl_path="$nptl_path:/usr/local/include:/usr/include"
 
7333
                        else
 
7334
                            IROOT="$erl_xcomp_isysroot"
 
7335
                            test "$IROOT" != "" || IROOT="$erl_xcomp_sysroot"
 
7336
                            test "$IROOT" != "" || { { echo "$as_me:$LINENO: error: Don't know where to search for includes! Please set erl_xcomp_isysroot" >&5
 
7337
echo "$as_me: error: Don't know where to search for includes! Please set erl_xcomp_isysroot" >&2;}
 
7338
   { (exit 1); exit 1; }; }
 
7339
                            nptl_path="$nptl_path:$IROOT/usr/local/include:$IROOT/usr/include"
 
7340
                        fi
6586
7341
                        nptl_ws_path=
6587
7342
                        save_ifs="$IFS"; IFS=":"
6588
7343
                        for dir in $nptl_path; do
6737
7492
 
6738
7493
 
6739
7494
                            if test "x$nptl_incldir" != "x"; then
6740
 
                                ETHR_DEFS="$ETHR_DEFS -isystem $nptl_incldir"
 
7495
                                THR_DEFS="$THR_DEFS -isystem $nptl_incldir"
6741
7496
                                break
6742
7497
                            fi
6743
7498
                        done
6748
7503
                        fi
6749
7504
                    fi
6750
7505
                fi
6751
 
 
6752
 
 
6753
 
cat >>confdefs.h <<\_ACEOF
6754
 
#define ETHR_INIT_MUTEX_IN_CHILD_AT_FORK 1
6755
 
_ACEOF
6756
 
 ;;
 
7506
                ;;
6757
7507
            *) ;;
6758
7508
        esac
6759
7509
 
6760
7510
                        saved_cppflags=$CPPFLAGS
 
7511
        CPPFLAGS="$CPPFLAGS $THR_DEFS"
 
7512
 
 
7513
 
 
7514
        if test "${ac_cv_header_pthread_h+set}" = set; then
 
7515
  echo "$as_me:$LINENO: checking for pthread.h" >&5
 
7516
echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
 
7517
if test "${ac_cv_header_pthread_h+set}" = set; then
 
7518
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7519
fi
 
7520
echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
 
7521
echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
 
7522
else
 
7523
  # Is the header compilable?
 
7524
echo "$as_me:$LINENO: checking pthread.h usability" >&5
 
7525
echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
 
7526
cat >conftest.$ac_ext <<_ACEOF
 
7527
/* confdefs.h.  */
 
7528
_ACEOF
 
7529
cat confdefs.h >>conftest.$ac_ext
 
7530
cat >>conftest.$ac_ext <<_ACEOF
 
7531
/* end confdefs.h.  */
 
7532
$ac_includes_default
 
7533
#include <pthread.h>
 
7534
_ACEOF
 
7535
rm -f conftest.$ac_objext
 
7536
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
7537
  (eval $ac_compile) 2>conftest.er1
 
7538
  ac_status=$?
 
7539
  grep -v '^ *+' conftest.er1 >conftest.err
 
7540
  rm -f conftest.er1
 
7541
  cat conftest.err >&5
 
7542
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7543
  (exit $ac_status); } &&
 
7544
         { ac_try='test -z "$ac_c_werror_flag"
 
7545
                         || test ! -s conftest.err'
 
7546
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7547
  (eval $ac_try) 2>&5
 
7548
  ac_status=$?
 
7549
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7550
  (exit $ac_status); }; } &&
 
7551
         { ac_try='test -s conftest.$ac_objext'
 
7552
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7553
  (eval $ac_try) 2>&5
 
7554
  ac_status=$?
 
7555
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7556
  (exit $ac_status); }; }; then
 
7557
  ac_header_compiler=yes
 
7558
else
 
7559
  echo "$as_me: failed program was:" >&5
 
7560
sed 's/^/| /' conftest.$ac_ext >&5
 
7561
 
 
7562
ac_header_compiler=no
 
7563
fi
 
7564
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
7565
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
7566
echo "${ECHO_T}$ac_header_compiler" >&6
 
7567
 
 
7568
# Is the header present?
 
7569
echo "$as_me:$LINENO: checking pthread.h presence" >&5
 
7570
echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
 
7571
cat >conftest.$ac_ext <<_ACEOF
 
7572
/* confdefs.h.  */
 
7573
_ACEOF
 
7574
cat confdefs.h >>conftest.$ac_ext
 
7575
cat >>conftest.$ac_ext <<_ACEOF
 
7576
/* end confdefs.h.  */
 
7577
#include <pthread.h>
 
7578
_ACEOF
 
7579
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
7580
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
7581
  ac_status=$?
 
7582
  grep -v '^ *+' conftest.er1 >conftest.err
 
7583
  rm -f conftest.er1
 
7584
  cat conftest.err >&5
 
7585
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7586
  (exit $ac_status); } >/dev/null; then
 
7587
  if test -s conftest.err; then
 
7588
    ac_cpp_err=$ac_c_preproc_warn_flag
 
7589
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
7590
  else
 
7591
    ac_cpp_err=
 
7592
  fi
 
7593
else
 
7594
  ac_cpp_err=yes
 
7595
fi
 
7596
if test -z "$ac_cpp_err"; then
 
7597
  ac_header_preproc=yes
 
7598
else
 
7599
  echo "$as_me: failed program was:" >&5
 
7600
sed 's/^/| /' conftest.$ac_ext >&5
 
7601
 
 
7602
  ac_header_preproc=no
 
7603
fi
 
7604
rm -f conftest.err conftest.$ac_ext
 
7605
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
7606
echo "${ECHO_T}$ac_header_preproc" >&6
 
7607
 
 
7608
# So?  What about this header?
 
7609
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
7610
  yes:no: )
 
7611
    { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
7612
echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
7613
    { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
 
7614
echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
 
7615
    ac_header_preproc=yes
 
7616
    ;;
 
7617
  no:yes:* )
 
7618
    { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
 
7619
echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
 
7620
    { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
 
7621
echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
 
7622
    { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
 
7623
echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
 
7624
    { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
 
7625
echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
7626
    { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
 
7627
echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
 
7628
    { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
 
7629
echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
 
7630
    (
 
7631
      cat <<\_ASBOX
 
7632
## ------------------------------------------ ##
 
7633
## Report this to the AC_PACKAGE_NAME lists.  ##
 
7634
## ------------------------------------------ ##
 
7635
_ASBOX
 
7636
    ) |
 
7637
      sed "s/^/$as_me: WARNING:     /" >&2
 
7638
    ;;
 
7639
esac
 
7640
echo "$as_me:$LINENO: checking for pthread.h" >&5
 
7641
echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
 
7642
if test "${ac_cv_header_pthread_h+set}" = set; then
 
7643
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7644
else
 
7645
  ac_cv_header_pthread_h=$ac_header_preproc
 
7646
fi
 
7647
echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
 
7648
echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
 
7649
 
 
7650
fi
 
7651
if test $ac_cv_header_pthread_h = yes; then
 
7652
 
 
7653
cat >>confdefs.h <<\_ACEOF
 
7654
#define HAVE_PTHREAD_H 1
 
7655
_ACEOF
 
7656
 
 
7657
fi
 
7658
 
 
7659
 
 
7660
 
 
7661
                if test "${ac_cv_header_pthread_mit_pthread_h+set}" = set; then
 
7662
  echo "$as_me:$LINENO: checking for pthread/mit/pthread.h" >&5
 
7663
echo $ECHO_N "checking for pthread/mit/pthread.h... $ECHO_C" >&6
 
7664
if test "${ac_cv_header_pthread_mit_pthread_h+set}" = set; then
 
7665
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7666
fi
 
7667
echo "$as_me:$LINENO: result: $ac_cv_header_pthread_mit_pthread_h" >&5
 
7668
echo "${ECHO_T}$ac_cv_header_pthread_mit_pthread_h" >&6
 
7669
else
 
7670
  # Is the header compilable?
 
7671
echo "$as_me:$LINENO: checking pthread/mit/pthread.h usability" >&5
 
7672
echo $ECHO_N "checking pthread/mit/pthread.h usability... $ECHO_C" >&6
 
7673
cat >conftest.$ac_ext <<_ACEOF
 
7674
/* confdefs.h.  */
 
7675
_ACEOF
 
7676
cat confdefs.h >>conftest.$ac_ext
 
7677
cat >>conftest.$ac_ext <<_ACEOF
 
7678
/* end confdefs.h.  */
 
7679
$ac_includes_default
 
7680
#include <pthread/mit/pthread.h>
 
7681
_ACEOF
 
7682
rm -f conftest.$ac_objext
 
7683
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
7684
  (eval $ac_compile) 2>conftest.er1
 
7685
  ac_status=$?
 
7686
  grep -v '^ *+' conftest.er1 >conftest.err
 
7687
  rm -f conftest.er1
 
7688
  cat conftest.err >&5
 
7689
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7690
  (exit $ac_status); } &&
 
7691
         { ac_try='test -z "$ac_c_werror_flag"
 
7692
                         || test ! -s conftest.err'
 
7693
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7694
  (eval $ac_try) 2>&5
 
7695
  ac_status=$?
 
7696
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7697
  (exit $ac_status); }; } &&
 
7698
         { ac_try='test -s conftest.$ac_objext'
 
7699
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7700
  (eval $ac_try) 2>&5
 
7701
  ac_status=$?
 
7702
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7703
  (exit $ac_status); }; }; then
 
7704
  ac_header_compiler=yes
 
7705
else
 
7706
  echo "$as_me: failed program was:" >&5
 
7707
sed 's/^/| /' conftest.$ac_ext >&5
 
7708
 
 
7709
ac_header_compiler=no
 
7710
fi
 
7711
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
7712
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
7713
echo "${ECHO_T}$ac_header_compiler" >&6
 
7714
 
 
7715
# Is the header present?
 
7716
echo "$as_me:$LINENO: checking pthread/mit/pthread.h presence" >&5
 
7717
echo $ECHO_N "checking pthread/mit/pthread.h presence... $ECHO_C" >&6
 
7718
cat >conftest.$ac_ext <<_ACEOF
 
7719
/* confdefs.h.  */
 
7720
_ACEOF
 
7721
cat confdefs.h >>conftest.$ac_ext
 
7722
cat >>conftest.$ac_ext <<_ACEOF
 
7723
/* end confdefs.h.  */
 
7724
#include <pthread/mit/pthread.h>
 
7725
_ACEOF
 
7726
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
7727
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
7728
  ac_status=$?
 
7729
  grep -v '^ *+' conftest.er1 >conftest.err
 
7730
  rm -f conftest.er1
 
7731
  cat conftest.err >&5
 
7732
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7733
  (exit $ac_status); } >/dev/null; then
 
7734
  if test -s conftest.err; then
 
7735
    ac_cpp_err=$ac_c_preproc_warn_flag
 
7736
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
7737
  else
 
7738
    ac_cpp_err=
 
7739
  fi
 
7740
else
 
7741
  ac_cpp_err=yes
 
7742
fi
 
7743
if test -z "$ac_cpp_err"; then
 
7744
  ac_header_preproc=yes
 
7745
else
 
7746
  echo "$as_me: failed program was:" >&5
 
7747
sed 's/^/| /' conftest.$ac_ext >&5
 
7748
 
 
7749
  ac_header_preproc=no
 
7750
fi
 
7751
rm -f conftest.err conftest.$ac_ext
 
7752
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
7753
echo "${ECHO_T}$ac_header_preproc" >&6
 
7754
 
 
7755
# So?  What about this header?
 
7756
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
7757
  yes:no: )
 
7758
    { echo "$as_me:$LINENO: WARNING: pthread/mit/pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
7759
echo "$as_me: WARNING: pthread/mit/pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
7760
    { echo "$as_me:$LINENO: WARNING: pthread/mit/pthread.h: proceeding with the compiler's result" >&5
 
7761
echo "$as_me: WARNING: pthread/mit/pthread.h: proceeding with the compiler's result" >&2;}
 
7762
    ac_header_preproc=yes
 
7763
    ;;
 
7764
  no:yes:* )
 
7765
    { echo "$as_me:$LINENO: WARNING: pthread/mit/pthread.h: present but cannot be compiled" >&5
 
7766
echo "$as_me: WARNING: pthread/mit/pthread.h: present but cannot be compiled" >&2;}
 
7767
    { echo "$as_me:$LINENO: WARNING: pthread/mit/pthread.h:     check for missing prerequisite headers?" >&5
 
7768
echo "$as_me: WARNING: pthread/mit/pthread.h:     check for missing prerequisite headers?" >&2;}
 
7769
    { echo "$as_me:$LINENO: WARNING: pthread/mit/pthread.h: see the Autoconf documentation" >&5
 
7770
echo "$as_me: WARNING: pthread/mit/pthread.h: see the Autoconf documentation" >&2;}
 
7771
    { echo "$as_me:$LINENO: WARNING: pthread/mit/pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
 
7772
echo "$as_me: WARNING: pthread/mit/pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
7773
    { echo "$as_me:$LINENO: WARNING: pthread/mit/pthread.h: proceeding with the preprocessor's result" >&5
 
7774
echo "$as_me: WARNING: pthread/mit/pthread.h: proceeding with the preprocessor's result" >&2;}
 
7775
    { echo "$as_me:$LINENO: WARNING: pthread/mit/pthread.h: in the future, the compiler will take precedence" >&5
 
7776
echo "$as_me: WARNING: pthread/mit/pthread.h: in the future, the compiler will take precedence" >&2;}
 
7777
    (
 
7778
      cat <<\_ASBOX
 
7779
## ------------------------------------------ ##
 
7780
## Report this to the AC_PACKAGE_NAME lists.  ##
 
7781
## ------------------------------------------ ##
 
7782
_ASBOX
 
7783
    ) |
 
7784
      sed "s/^/$as_me: WARNING:     /" >&2
 
7785
    ;;
 
7786
esac
 
7787
echo "$as_me:$LINENO: checking for pthread/mit/pthread.h" >&5
 
7788
echo $ECHO_N "checking for pthread/mit/pthread.h... $ECHO_C" >&6
 
7789
if test "${ac_cv_header_pthread_mit_pthread_h+set}" = set; then
 
7790
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7791
else
 
7792
  ac_cv_header_pthread_mit_pthread_h=$ac_header_preproc
 
7793
fi
 
7794
echo "$as_me:$LINENO: result: $ac_cv_header_pthread_mit_pthread_h" >&5
 
7795
echo "${ECHO_T}$ac_cv_header_pthread_mit_pthread_h" >&6
 
7796
 
 
7797
fi
 
7798
if test $ac_cv_header_pthread_mit_pthread_h = yes; then
 
7799
  \
 
7800
 
 
7801
cat >>confdefs.h <<\_ACEOF
 
7802
#define HAVE_MIT_PTHREAD_H 1
 
7803
_ACEOF
 
7804
 
 
7805
fi
 
7806
 
 
7807
 
 
7808
 
 
7809
                CPPFLAGS=$saved_cppflags
 
7810
 
 
7811
    fi
 
7812
fi
 
7813
 
 
7814
 
 
7815
 
 
7816
 
 
7817
ERTS_INTERNAL_X_LIBS=
 
7818
 
 
7819
echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
 
7820
echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
 
7821
if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
 
7822
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
7823
else
 
7824
  ac_check_lib_save_LIBS=$LIBS
 
7825
LIBS="-lkstat  $LIBS"
 
7826
cat >conftest.$ac_ext <<_ACEOF
 
7827
/* confdefs.h.  */
 
7828
_ACEOF
 
7829
cat confdefs.h >>conftest.$ac_ext
 
7830
cat >>conftest.$ac_ext <<_ACEOF
 
7831
/* end confdefs.h.  */
 
7832
 
 
7833
/* Override any gcc2 internal prototype to avoid an error.  */
 
7834
#ifdef __cplusplus
 
7835
extern "C"
 
7836
#endif
 
7837
/* We use char because int might match the return type of a gcc2
 
7838
   builtin and then its argument prototype would still apply.  */
 
7839
char kstat_open ();
 
7840
int
 
7841
main ()
 
7842
{
 
7843
kstat_open ();
 
7844
  ;
 
7845
  return 0;
 
7846
}
 
7847
_ACEOF
 
7848
rm -f conftest.$ac_objext conftest$ac_exeext
 
7849
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
7850
  (eval $ac_link) 2>conftest.er1
 
7851
  ac_status=$?
 
7852
  grep -v '^ *+' conftest.er1 >conftest.err
 
7853
  rm -f conftest.er1
 
7854
  cat conftest.err >&5
 
7855
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7856
  (exit $ac_status); } &&
 
7857
         { ac_try='test -z "$ac_c_werror_flag"
 
7858
                         || test ! -s conftest.err'
 
7859
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7860
  (eval $ac_try) 2>&5
 
7861
  ac_status=$?
 
7862
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7863
  (exit $ac_status); }; } &&
 
7864
         { ac_try='test -s conftest$ac_exeext'
 
7865
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7866
  (eval $ac_try) 2>&5
 
7867
  ac_status=$?
 
7868
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7869
  (exit $ac_status); }; }; then
 
7870
  ac_cv_lib_kstat_kstat_open=yes
 
7871
else
 
7872
  echo "$as_me: failed program was:" >&5
 
7873
sed 's/^/| /' conftest.$ac_ext >&5
 
7874
 
 
7875
ac_cv_lib_kstat_kstat_open=no
 
7876
fi
 
7877
rm -f conftest.err conftest.$ac_objext \
 
7878
      conftest$ac_exeext conftest.$ac_ext
 
7879
LIBS=$ac_check_lib_save_LIBS
 
7880
fi
 
7881
echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
 
7882
echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6
 
7883
if test $ac_cv_lib_kstat_kstat_open = yes; then
 
7884
 
 
7885
cat >>confdefs.h <<\_ACEOF
 
7886
#define HAVE_KSTAT 1
 
7887
_ACEOF
 
7888
 
 
7889
ERTS_INTERNAL_X_LIBS="$ERTS_INTERNAL_X_LIBS -lkstat"
 
7890
fi
 
7891
 
 
7892
 
 
7893
 
 
7894
 
 
7895
 
 
7896
 
 
7897
ethr_have_native_atomics=no
 
7898
ethr_have_native_spinlock=no
 
7899
ETHR_THR_LIB_BASE="$THR_LIB_NAME"
 
7900
ETHR_THR_LIB_BASE_TYPE="$THR_LIB_TYPE"
 
7901
ETHR_DEFS="$THR_DEFS"
 
7902
ETHR_X_LIBS="$THR_LIBS $ERTS_INTERNAL_X_LIBS"
 
7903
ETHR_LIBS=
 
7904
ETHR_LIB_NAME=
 
7905
 
 
7906
ethr_modified_default_stack_size=
 
7907
 
 
7908
ethr_lib_name=ethread
 
7909
 
 
7910
case "$THR_LIB_NAME" in
 
7911
 
 
7912
    win32_threads)
 
7913
        ETHR_THR_LIB_BASE_DIR=win
 
7914
        # * _WIN32_WINNT >= 0x0400 is needed for
 
7915
        #   TryEnterCriticalSection
 
7916
        # * _WIN32_WINNT >= 0x0403 is needed for
 
7917
        #   InitializeCriticalSectionAndSpinCount
 
7918
        # The ethread lib will refuse to build if _WIN32_WINNT < 0x0403.
 
7919
        #
 
7920
        # -D_WIN32_WINNT should have been defined in $CPPFLAGS; fetch it
 
7921
        # and save it in ETHR_DEFS.
 
7922
        found_win32_winnt=no
 
7923
        for cppflag in $CPPFLAGS; do
 
7924
            case $cppflag in
 
7925
                -DWINVER*)
 
7926
                    ETHR_DEFS="$ETHR_DEFS $cppflag"
 
7927
                    ;;
 
7928
                -D_WIN32_WINNT*)
 
7929
                    ETHR_DEFS="$ETHR_DEFS $cppflag"
 
7930
                    found_win32_winnt=yes
 
7931
                    ;;
 
7932
                *)
 
7933
                    ;;
 
7934
            esac
 
7935
        done
 
7936
        if test $found_win32_winnt = no; then
 
7937
            { { echo "$as_me:$LINENO: error: -D_WIN32_WINNT missing in CPPFLAGS" >&5
 
7938
echo "$as_me: error: -D_WIN32_WINNT missing in CPPFLAGS" >&2;}
 
7939
   { (exit 1); exit 1; }; }
 
7940
        fi
 
7941
 
 
7942
 
 
7943
cat >>confdefs.h <<\_ACEOF
 
7944
#define ETHR_WIN32_THREADS 1
 
7945
_ACEOF
 
7946
 
 
7947
 
 
7948
        have_ilckd=no
 
7949
        echo "$as_me:$LINENO: checking for _InterlockedCompareExchange64()" >&5
 
7950
echo $ECHO_N "checking for _InterlockedCompareExchange64()... $ECHO_C" >&6
 
7951
        cat >conftest.$ac_ext <<_ACEOF
 
7952
/* confdefs.h.  */
 
7953
_ACEOF
 
7954
cat confdefs.h >>conftest.$ac_ext
 
7955
cat >>conftest.$ac_ext <<_ACEOF
 
7956
/* end confdefs.h.  */
 
7957
 
 
7958
                        #define WIN32_LEAN_AND_MEAN
 
7959
                        #include <windows.h>
 
7960
 
 
7961
int
 
7962
main ()
 
7963
{
 
7964
 
 
7965
                        volatile __int64 *var;
 
7966
                        _InterlockedCompareExchange64(var, (__int64) 1, (__int64) 0);
 
7967
                        return 0;
 
7968
 
 
7969
  ;
 
7970
  return 0;
 
7971
}
 
7972
_ACEOF
 
7973
rm -f conftest.$ac_objext conftest$ac_exeext
 
7974
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
7975
  (eval $ac_link) 2>conftest.er1
 
7976
  ac_status=$?
 
7977
  grep -v '^ *+' conftest.er1 >conftest.err
 
7978
  rm -f conftest.er1
 
7979
  cat conftest.err >&5
 
7980
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7981
  (exit $ac_status); } &&
 
7982
         { ac_try='test -z "$ac_c_werror_flag"
 
7983
                         || test ! -s conftest.err'
 
7984
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7985
  (eval $ac_try) 2>&5
 
7986
  ac_status=$?
 
7987
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7988
  (exit $ac_status); }; } &&
 
7989
         { ac_try='test -s conftest$ac_exeext'
 
7990
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
7991
  (eval $ac_try) 2>&5
 
7992
  ac_status=$?
 
7993
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
7994
  (exit $ac_status); }; }; then
 
7995
  have_ilckd=yes
 
7996
else
 
7997
  echo "$as_me: failed program was:" >&5
 
7998
sed 's/^/| /' conftest.$ac_ext >&5
 
7999
 
 
8000
fi
 
8001
rm -f conftest.err conftest.$ac_objext \
 
8002
      conftest$ac_exeext conftest.$ac_ext
 
8003
        echo "$as_me:$LINENO: result: $have_ilckd" >&5
 
8004
echo "${ECHO_T}$have_ilckd" >&6
 
8005
        test $have_ilckd = yes &&
 
8006
cat >>confdefs.h <<\_ACEOF
 
8007
#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64 1
 
8008
_ACEOF
 
8009
 
 
8010
 
 
8011
        echo "$as_me:$LINENO: checking for void *" >&5
 
8012
echo $ECHO_N "checking for void *... $ECHO_C" >&6
 
8013
if test "${ac_cv_type_void_p+set}" = set; then
 
8014
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
8015
else
 
8016
  cat >conftest.$ac_ext <<_ACEOF
 
8017
/* confdefs.h.  */
 
8018
_ACEOF
 
8019
cat confdefs.h >>conftest.$ac_ext
 
8020
cat >>conftest.$ac_ext <<_ACEOF
 
8021
/* end confdefs.h.  */
 
8022
$ac_includes_default
 
8023
int
 
8024
main ()
 
8025
{
 
8026
if ((void * *) 0)
 
8027
  return 0;
 
8028
if (sizeof (void *))
 
8029
  return 0;
 
8030
  ;
 
8031
  return 0;
 
8032
}
 
8033
_ACEOF
 
8034
rm -f conftest.$ac_objext
 
8035
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
8036
  (eval $ac_compile) 2>conftest.er1
 
8037
  ac_status=$?
 
8038
  grep -v '^ *+' conftest.er1 >conftest.err
 
8039
  rm -f conftest.er1
 
8040
  cat conftest.err >&5
 
8041
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8042
  (exit $ac_status); } &&
 
8043
         { ac_try='test -z "$ac_c_werror_flag"
 
8044
                         || test ! -s conftest.err'
 
8045
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8046
  (eval $ac_try) 2>&5
 
8047
  ac_status=$?
 
8048
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8049
  (exit $ac_status); }; } &&
 
8050
         { ac_try='test -s conftest.$ac_objext'
 
8051
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8052
  (eval $ac_try) 2>&5
 
8053
  ac_status=$?
 
8054
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8055
  (exit $ac_status); }; }; then
 
8056
  ac_cv_type_void_p=yes
 
8057
else
 
8058
  echo "$as_me: failed program was:" >&5
 
8059
sed 's/^/| /' conftest.$ac_ext >&5
 
8060
 
 
8061
ac_cv_type_void_p=no
 
8062
fi
 
8063
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
8064
fi
 
8065
echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
 
8066
echo "${ECHO_T}$ac_cv_type_void_p" >&6
 
8067
 
 
8068
echo "$as_me:$LINENO: checking size of void *" >&5
 
8069
echo $ECHO_N "checking size of void *... $ECHO_C" >&6
 
8070
if test "${ac_cv_sizeof_void_p+set}" = set; then
 
8071
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
8072
else
 
8073
  if test "$ac_cv_type_void_p" = yes; then
 
8074
  # The cast to unsigned long works around a bug in the HP C Compiler
 
8075
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 
8076
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 
8077
  # This bug is HP SR number 8606223364.
 
8078
  if test "$cross_compiling" = yes; then
 
8079
  # Depending upon the size, compute the lo and hi bounds.
 
8080
cat >conftest.$ac_ext <<_ACEOF
 
8081
/* confdefs.h.  */
 
8082
_ACEOF
 
8083
cat confdefs.h >>conftest.$ac_ext
 
8084
cat >>conftest.$ac_ext <<_ACEOF
 
8085
/* end confdefs.h.  */
 
8086
$ac_includes_default
 
8087
int
 
8088
main ()
 
8089
{
 
8090
static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
 
8091
test_array [0] = 0
 
8092
 
 
8093
  ;
 
8094
  return 0;
 
8095
}
 
8096
_ACEOF
 
8097
rm -f conftest.$ac_objext
 
8098
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
8099
  (eval $ac_compile) 2>conftest.er1
 
8100
  ac_status=$?
 
8101
  grep -v '^ *+' conftest.er1 >conftest.err
 
8102
  rm -f conftest.er1
 
8103
  cat conftest.err >&5
 
8104
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8105
  (exit $ac_status); } &&
 
8106
         { ac_try='test -z "$ac_c_werror_flag"
 
8107
                         || test ! -s conftest.err'
 
8108
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8109
  (eval $ac_try) 2>&5
 
8110
  ac_status=$?
 
8111
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8112
  (exit $ac_status); }; } &&
 
8113
         { ac_try='test -s conftest.$ac_objext'
 
8114
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8115
  (eval $ac_try) 2>&5
 
8116
  ac_status=$?
 
8117
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8118
  (exit $ac_status); }; }; then
 
8119
  ac_lo=0 ac_mid=0
 
8120
  while :; do
 
8121
    cat >conftest.$ac_ext <<_ACEOF
 
8122
/* confdefs.h.  */
 
8123
_ACEOF
 
8124
cat confdefs.h >>conftest.$ac_ext
 
8125
cat >>conftest.$ac_ext <<_ACEOF
 
8126
/* end confdefs.h.  */
 
8127
$ac_includes_default
 
8128
int
 
8129
main ()
 
8130
{
 
8131
static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
 
8132
test_array [0] = 0
 
8133
 
 
8134
  ;
 
8135
  return 0;
 
8136
}
 
8137
_ACEOF
 
8138
rm -f conftest.$ac_objext
 
8139
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
8140
  (eval $ac_compile) 2>conftest.er1
 
8141
  ac_status=$?
 
8142
  grep -v '^ *+' conftest.er1 >conftest.err
 
8143
  rm -f conftest.er1
 
8144
  cat conftest.err >&5
 
8145
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8146
  (exit $ac_status); } &&
 
8147
         { ac_try='test -z "$ac_c_werror_flag"
 
8148
                         || test ! -s conftest.err'
 
8149
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8150
  (eval $ac_try) 2>&5
 
8151
  ac_status=$?
 
8152
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8153
  (exit $ac_status); }; } &&
 
8154
         { ac_try='test -s conftest.$ac_objext'
 
8155
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8156
  (eval $ac_try) 2>&5
 
8157
  ac_status=$?
 
8158
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8159
  (exit $ac_status); }; }; then
 
8160
  ac_hi=$ac_mid; break
 
8161
else
 
8162
  echo "$as_me: failed program was:" >&5
 
8163
sed 's/^/| /' conftest.$ac_ext >&5
 
8164
 
 
8165
ac_lo=`expr $ac_mid + 1`
 
8166
                    if test $ac_lo -le $ac_mid; then
 
8167
                      ac_lo= ac_hi=
 
8168
                      break
 
8169
                    fi
 
8170
                    ac_mid=`expr 2 '*' $ac_mid + 1`
 
8171
fi
 
8172
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
8173
  done
 
8174
else
 
8175
  echo "$as_me: failed program was:" >&5
 
8176
sed 's/^/| /' conftest.$ac_ext >&5
 
8177
 
 
8178
cat >conftest.$ac_ext <<_ACEOF
 
8179
/* confdefs.h.  */
 
8180
_ACEOF
 
8181
cat confdefs.h >>conftest.$ac_ext
 
8182
cat >>conftest.$ac_ext <<_ACEOF
 
8183
/* end confdefs.h.  */
 
8184
$ac_includes_default
 
8185
int
 
8186
main ()
 
8187
{
 
8188
static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
 
8189
test_array [0] = 0
 
8190
 
 
8191
  ;
 
8192
  return 0;
 
8193
}
 
8194
_ACEOF
 
8195
rm -f conftest.$ac_objext
 
8196
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
8197
  (eval $ac_compile) 2>conftest.er1
 
8198
  ac_status=$?
 
8199
  grep -v '^ *+' conftest.er1 >conftest.err
 
8200
  rm -f conftest.er1
 
8201
  cat conftest.err >&5
 
8202
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8203
  (exit $ac_status); } &&
 
8204
         { ac_try='test -z "$ac_c_werror_flag"
 
8205
                         || test ! -s conftest.err'
 
8206
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8207
  (eval $ac_try) 2>&5
 
8208
  ac_status=$?
 
8209
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8210
  (exit $ac_status); }; } &&
 
8211
         { ac_try='test -s conftest.$ac_objext'
 
8212
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8213
  (eval $ac_try) 2>&5
 
8214
  ac_status=$?
 
8215
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8216
  (exit $ac_status); }; }; then
 
8217
  ac_hi=-1 ac_mid=-1
 
8218
  while :; do
 
8219
    cat >conftest.$ac_ext <<_ACEOF
 
8220
/* confdefs.h.  */
 
8221
_ACEOF
 
8222
cat confdefs.h >>conftest.$ac_ext
 
8223
cat >>conftest.$ac_ext <<_ACEOF
 
8224
/* end confdefs.h.  */
 
8225
$ac_includes_default
 
8226
int
 
8227
main ()
 
8228
{
 
8229
static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
 
8230
test_array [0] = 0
 
8231
 
 
8232
  ;
 
8233
  return 0;
 
8234
}
 
8235
_ACEOF
 
8236
rm -f conftest.$ac_objext
 
8237
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
8238
  (eval $ac_compile) 2>conftest.er1
 
8239
  ac_status=$?
 
8240
  grep -v '^ *+' conftest.er1 >conftest.err
 
8241
  rm -f conftest.er1
 
8242
  cat conftest.err >&5
 
8243
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8244
  (exit $ac_status); } &&
 
8245
         { ac_try='test -z "$ac_c_werror_flag"
 
8246
                         || test ! -s conftest.err'
 
8247
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8248
  (eval $ac_try) 2>&5
 
8249
  ac_status=$?
 
8250
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8251
  (exit $ac_status); }; } &&
 
8252
         { ac_try='test -s conftest.$ac_objext'
 
8253
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8254
  (eval $ac_try) 2>&5
 
8255
  ac_status=$?
 
8256
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8257
  (exit $ac_status); }; }; then
 
8258
  ac_lo=$ac_mid; break
 
8259
else
 
8260
  echo "$as_me: failed program was:" >&5
 
8261
sed 's/^/| /' conftest.$ac_ext >&5
 
8262
 
 
8263
ac_hi=`expr '(' $ac_mid ')' - 1`
 
8264
                       if test $ac_mid -le $ac_hi; then
 
8265
                         ac_lo= ac_hi=
 
8266
                         break
 
8267
                       fi
 
8268
                       ac_mid=`expr 2 '*' $ac_mid`
 
8269
fi
 
8270
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
8271
  done
 
8272
else
 
8273
  echo "$as_me: failed program was:" >&5
 
8274
sed 's/^/| /' conftest.$ac_ext >&5
 
8275
 
 
8276
ac_lo= ac_hi=
 
8277
fi
 
8278
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
8279
fi
 
8280
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
8281
# Binary search between lo and hi bounds.
 
8282
while test "x$ac_lo" != "x$ac_hi"; do
 
8283
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
 
8284
  cat >conftest.$ac_ext <<_ACEOF
 
8285
/* confdefs.h.  */
 
8286
_ACEOF
 
8287
cat confdefs.h >>conftest.$ac_ext
 
8288
cat >>conftest.$ac_ext <<_ACEOF
 
8289
/* end confdefs.h.  */
 
8290
$ac_includes_default
 
8291
int
 
8292
main ()
 
8293
{
 
8294
static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
 
8295
test_array [0] = 0
 
8296
 
 
8297
  ;
 
8298
  return 0;
 
8299
}
 
8300
_ACEOF
 
8301
rm -f conftest.$ac_objext
 
8302
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
8303
  (eval $ac_compile) 2>conftest.er1
 
8304
  ac_status=$?
 
8305
  grep -v '^ *+' conftest.er1 >conftest.err
 
8306
  rm -f conftest.er1
 
8307
  cat conftest.err >&5
 
8308
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8309
  (exit $ac_status); } &&
 
8310
         { ac_try='test -z "$ac_c_werror_flag"
 
8311
                         || test ! -s conftest.err'
 
8312
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8313
  (eval $ac_try) 2>&5
 
8314
  ac_status=$?
 
8315
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8316
  (exit $ac_status); }; } &&
 
8317
         { ac_try='test -s conftest.$ac_objext'
 
8318
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8319
  (eval $ac_try) 2>&5
 
8320
  ac_status=$?
 
8321
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8322
  (exit $ac_status); }; }; then
 
8323
  ac_hi=$ac_mid
 
8324
else
 
8325
  echo "$as_me: failed program was:" >&5
 
8326
sed 's/^/| /' conftest.$ac_ext >&5
 
8327
 
 
8328
ac_lo=`expr '(' $ac_mid ')' + 1`
 
8329
fi
 
8330
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
8331
done
 
8332
case $ac_lo in
 
8333
?*) ac_cv_sizeof_void_p=$ac_lo;;
 
8334
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
 
8335
See \`config.log' for more details." >&5
 
8336
echo "$as_me: error: cannot compute sizeof (void *), 77
 
8337
See \`config.log' for more details." >&2;}
 
8338
   { (exit 1); exit 1; }; } ;;
 
8339
esac
 
8340
else
 
8341
  if test "$cross_compiling" = yes; then
 
8342
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
 
8343
See \`config.log' for more details." >&5
 
8344
echo "$as_me: error: cannot run test program while cross compiling
 
8345
See \`config.log' for more details." >&2;}
 
8346
   { (exit 1); exit 1; }; }
 
8347
else
 
8348
  cat >conftest.$ac_ext <<_ACEOF
 
8349
/* confdefs.h.  */
 
8350
_ACEOF
 
8351
cat confdefs.h >>conftest.$ac_ext
 
8352
cat >>conftest.$ac_ext <<_ACEOF
 
8353
/* end confdefs.h.  */
 
8354
$ac_includes_default
 
8355
long longval () { return (long) (sizeof (void *)); }
 
8356
unsigned long ulongval () { return (long) (sizeof (void *)); }
 
8357
#include <stdio.h>
 
8358
#include <stdlib.h>
 
8359
int
 
8360
main ()
 
8361
{
 
8362
 
 
8363
  FILE *f = fopen ("conftest.val", "w");
 
8364
  if (! f)
 
8365
    exit (1);
 
8366
  if (((long) (sizeof (void *))) < 0)
 
8367
    {
 
8368
      long i = longval ();
 
8369
      if (i != ((long) (sizeof (void *))))
 
8370
        exit (1);
 
8371
      fprintf (f, "%ld\n", i);
 
8372
    }
 
8373
  else
 
8374
    {
 
8375
      unsigned long i = ulongval ();
 
8376
      if (i != ((long) (sizeof (void *))))
 
8377
        exit (1);
 
8378
      fprintf (f, "%lu\n", i);
 
8379
    }
 
8380
  exit (ferror (f) || fclose (f) != 0);
 
8381
 
 
8382
  ;
 
8383
  return 0;
 
8384
}
 
8385
_ACEOF
 
8386
rm -f conftest$ac_exeext
 
8387
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
8388
  (eval $ac_link) 2>&5
 
8389
  ac_status=$?
 
8390
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8391
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
8392
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8393
  (eval $ac_try) 2>&5
 
8394
  ac_status=$?
 
8395
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8396
  (exit $ac_status); }; }; then
 
8397
  ac_cv_sizeof_void_p=`cat conftest.val`
 
8398
else
 
8399
  echo "$as_me: program exited with status $ac_status" >&5
 
8400
echo "$as_me: failed program was:" >&5
 
8401
sed 's/^/| /' conftest.$ac_ext >&5
 
8402
 
 
8403
( exit $ac_status )
 
8404
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
 
8405
See \`config.log' for more details." >&5
 
8406
echo "$as_me: error: cannot compute sizeof (void *), 77
 
8407
See \`config.log' for more details." >&2;}
 
8408
   { (exit 1); exit 1; }; }
 
8409
fi
 
8410
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
8411
fi
 
8412
fi
 
8413
rm -f conftest.val
 
8414
else
 
8415
  ac_cv_sizeof_void_p=0
 
8416
fi
 
8417
fi
 
8418
echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
 
8419
echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
 
8420
cat >>confdefs.h <<_ACEOF
 
8421
#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
 
8422
_ACEOF
 
8423
 
 
8424
 
 
8425
        case "$ac_cv_sizeof_void_p-$have_ilckd" in
 
8426
            8-no)
 
8427
                ethr_have_native_atomics=no
 
8428
                ethr_have_native_spinlock=no;;
 
8429
            *)
 
8430
                ethr_have_native_atomics=yes
 
8431
                ethr_have_native_spinlock=yes;;
 
8432
        esac
 
8433
 
 
8434
        have_ilckd=no
 
8435
        echo "$as_me:$LINENO: checking for _InterlockedDecrement64()" >&5
 
8436
echo $ECHO_N "checking for _InterlockedDecrement64()... $ECHO_C" >&6
 
8437
        cat >conftest.$ac_ext <<_ACEOF
 
8438
/* confdefs.h.  */
 
8439
_ACEOF
 
8440
cat confdefs.h >>conftest.$ac_ext
 
8441
cat >>conftest.$ac_ext <<_ACEOF
 
8442
/* end confdefs.h.  */
 
8443
 
 
8444
                        #define WIN32_LEAN_AND_MEAN
 
8445
                        #include <windows.h>
 
8446
 
 
8447
int
 
8448
main ()
 
8449
{
 
8450
 
 
8451
                        volatile __int64 *var;
 
8452
                        _InterlockedDecrement64(var);
 
8453
                        return 0;
 
8454
 
 
8455
  ;
 
8456
  return 0;
 
8457
}
 
8458
_ACEOF
 
8459
rm -f conftest.$ac_objext conftest$ac_exeext
 
8460
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
8461
  (eval $ac_link) 2>conftest.er1
 
8462
  ac_status=$?
 
8463
  grep -v '^ *+' conftest.er1 >conftest.err
 
8464
  rm -f conftest.er1
 
8465
  cat conftest.err >&5
 
8466
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8467
  (exit $ac_status); } &&
 
8468
         { ac_try='test -z "$ac_c_werror_flag"
 
8469
                         || test ! -s conftest.err'
 
8470
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8471
  (eval $ac_try) 2>&5
 
8472
  ac_status=$?
 
8473
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8474
  (exit $ac_status); }; } &&
 
8475
         { ac_try='test -s conftest$ac_exeext'
 
8476
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8477
  (eval $ac_try) 2>&5
 
8478
  ac_status=$?
 
8479
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8480
  (exit $ac_status); }; }; then
 
8481
  have_ilckd=yes
 
8482
else
 
8483
  echo "$as_me: failed program was:" >&5
 
8484
sed 's/^/| /' conftest.$ac_ext >&5
 
8485
 
 
8486
fi
 
8487
rm -f conftest.err conftest.$ac_objext \
 
8488
      conftest$ac_exeext conftest.$ac_ext
 
8489
        echo "$as_me:$LINENO: result: $have_ilckd" >&5
 
8490
echo "${ECHO_T}$have_ilckd" >&6
 
8491
        test $have_ilckd = yes &&
 
8492
cat >>confdefs.h <<\_ACEOF
 
8493
#define ETHR_HAVE__INTERLOCKEDDECREMENT64 1
 
8494
_ACEOF
 
8495
 
 
8496
 
 
8497
        have_ilckd=no
 
8498
        echo "$as_me:$LINENO: checking for _InterlockedIncrement64()" >&5
 
8499
echo $ECHO_N "checking for _InterlockedIncrement64()... $ECHO_C" >&6
 
8500
        cat >conftest.$ac_ext <<_ACEOF
 
8501
/* confdefs.h.  */
 
8502
_ACEOF
 
8503
cat confdefs.h >>conftest.$ac_ext
 
8504
cat >>conftest.$ac_ext <<_ACEOF
 
8505
/* end confdefs.h.  */
 
8506
 
 
8507
                        #define WIN32_LEAN_AND_MEAN
 
8508
                        #include <windows.h>
 
8509
 
 
8510
int
 
8511
main ()
 
8512
{
 
8513
 
 
8514
                        volatile __int64 *var;
 
8515
                        _InterlockedIncrement64(var);
 
8516
                        return 0;
 
8517
 
 
8518
  ;
 
8519
  return 0;
 
8520
}
 
8521
_ACEOF
 
8522
rm -f conftest.$ac_objext conftest$ac_exeext
 
8523
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
8524
  (eval $ac_link) 2>conftest.er1
 
8525
  ac_status=$?
 
8526
  grep -v '^ *+' conftest.er1 >conftest.err
 
8527
  rm -f conftest.er1
 
8528
  cat conftest.err >&5
 
8529
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8530
  (exit $ac_status); } &&
 
8531
         { ac_try='test -z "$ac_c_werror_flag"
 
8532
                         || test ! -s conftest.err'
 
8533
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8534
  (eval $ac_try) 2>&5
 
8535
  ac_status=$?
 
8536
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8537
  (exit $ac_status); }; } &&
 
8538
         { ac_try='test -s conftest$ac_exeext'
 
8539
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8540
  (eval $ac_try) 2>&5
 
8541
  ac_status=$?
 
8542
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8543
  (exit $ac_status); }; }; then
 
8544
  have_ilckd=yes
 
8545
else
 
8546
  echo "$as_me: failed program was:" >&5
 
8547
sed 's/^/| /' conftest.$ac_ext >&5
 
8548
 
 
8549
fi
 
8550
rm -f conftest.err conftest.$ac_objext \
 
8551
      conftest$ac_exeext conftest.$ac_ext
 
8552
        echo "$as_me:$LINENO: result: $have_ilckd" >&5
 
8553
echo "${ECHO_T}$have_ilckd" >&6
 
8554
        test $have_ilckd = yes &&
 
8555
cat >>confdefs.h <<\_ACEOF
 
8556
#define ETHR_HAVE__INTERLOCKEDINCREMENT64 1
 
8557
_ACEOF
 
8558
 
 
8559
 
 
8560
        have_ilckd=no
 
8561
        echo "$as_me:$LINENO: checking for _InterlockedExchangeAdd64()" >&5
 
8562
echo $ECHO_N "checking for _InterlockedExchangeAdd64()... $ECHO_C" >&6
 
8563
        cat >conftest.$ac_ext <<_ACEOF
 
8564
/* confdefs.h.  */
 
8565
_ACEOF
 
8566
cat confdefs.h >>conftest.$ac_ext
 
8567
cat >>conftest.$ac_ext <<_ACEOF
 
8568
/* end confdefs.h.  */
 
8569
 
 
8570
                        #define WIN32_LEAN_AND_MEAN
 
8571
                        #include <windows.h>
 
8572
 
 
8573
int
 
8574
main ()
 
8575
{
 
8576
 
 
8577
                        volatile __int64 *var;
 
8578
                        _InterlockedExchangeAdd64(var, (__int64) 1);
 
8579
                        return 0;
 
8580
 
 
8581
  ;
 
8582
  return 0;
 
8583
}
 
8584
_ACEOF
 
8585
rm -f conftest.$ac_objext conftest$ac_exeext
 
8586
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
8587
  (eval $ac_link) 2>conftest.er1
 
8588
  ac_status=$?
 
8589
  grep -v '^ *+' conftest.er1 >conftest.err
 
8590
  rm -f conftest.er1
 
8591
  cat conftest.err >&5
 
8592
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8593
  (exit $ac_status); } &&
 
8594
         { ac_try='test -z "$ac_c_werror_flag"
 
8595
                         || test ! -s conftest.err'
 
8596
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8597
  (eval $ac_try) 2>&5
 
8598
  ac_status=$?
 
8599
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8600
  (exit $ac_status); }; } &&
 
8601
         { ac_try='test -s conftest$ac_exeext'
 
8602
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8603
  (eval $ac_try) 2>&5
 
8604
  ac_status=$?
 
8605
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8606
  (exit $ac_status); }; }; then
 
8607
  have_ilckd=yes
 
8608
else
 
8609
  echo "$as_me: failed program was:" >&5
 
8610
sed 's/^/| /' conftest.$ac_ext >&5
 
8611
 
 
8612
fi
 
8613
rm -f conftest.err conftest.$ac_objext \
 
8614
      conftest$ac_exeext conftest.$ac_ext
 
8615
        echo "$as_me:$LINENO: result: $have_ilckd" >&5
 
8616
echo "${ECHO_T}$have_ilckd" >&6
 
8617
        test $have_ilckd = yes &&
 
8618
cat >>confdefs.h <<\_ACEOF
 
8619
#define ETHR_HAVE__INTERLOCKEDEXCHANGEADD64 1
 
8620
_ACEOF
 
8621
 
 
8622
 
 
8623
        have_ilckd=no
 
8624
        echo "$as_me:$LINENO: checking for _InterlockedExchange64()" >&5
 
8625
echo $ECHO_N "checking for _InterlockedExchange64()... $ECHO_C" >&6
 
8626
        cat >conftest.$ac_ext <<_ACEOF
 
8627
/* confdefs.h.  */
 
8628
_ACEOF
 
8629
cat confdefs.h >>conftest.$ac_ext
 
8630
cat >>conftest.$ac_ext <<_ACEOF
 
8631
/* end confdefs.h.  */
 
8632
 
 
8633
                        #define WIN32_LEAN_AND_MEAN
 
8634
                        #include <windows.h>
 
8635
 
 
8636
int
 
8637
main ()
 
8638
{
 
8639
 
 
8640
                        volatile __int64 *var;
 
8641
                        _InterlockedExchange64(var, (__int64) 1);
 
8642
                        return 0;
 
8643
 
 
8644
  ;
 
8645
  return 0;
 
8646
}
 
8647
_ACEOF
 
8648
rm -f conftest.$ac_objext conftest$ac_exeext
 
8649
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
8650
  (eval $ac_link) 2>conftest.er1
 
8651
  ac_status=$?
 
8652
  grep -v '^ *+' conftest.er1 >conftest.err
 
8653
  rm -f conftest.er1
 
8654
  cat conftest.err >&5
 
8655
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8656
  (exit $ac_status); } &&
 
8657
         { ac_try='test -z "$ac_c_werror_flag"
 
8658
                         || test ! -s conftest.err'
 
8659
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8660
  (eval $ac_try) 2>&5
 
8661
  ac_status=$?
 
8662
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8663
  (exit $ac_status); }; } &&
 
8664
         { ac_try='test -s conftest$ac_exeext'
 
8665
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8666
  (eval $ac_try) 2>&5
 
8667
  ac_status=$?
 
8668
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8669
  (exit $ac_status); }; }; then
 
8670
  have_ilckd=yes
 
8671
else
 
8672
  echo "$as_me: failed program was:" >&5
 
8673
sed 's/^/| /' conftest.$ac_ext >&5
 
8674
 
 
8675
fi
 
8676
rm -f conftest.err conftest.$ac_objext \
 
8677
      conftest$ac_exeext conftest.$ac_ext
 
8678
        echo "$as_me:$LINENO: result: $have_ilckd" >&5
 
8679
echo "${ECHO_T}$have_ilckd" >&6
 
8680
        test $have_ilckd = yes &&
 
8681
cat >>confdefs.h <<\_ACEOF
 
8682
#define ETHR_HAVE__INTERLOCKEDEXCHANGE64 1
 
8683
_ACEOF
 
8684
 
 
8685
 
 
8686
        have_ilckd=no
 
8687
        echo "$as_me:$LINENO: checking for _InterlockedAnd64()" >&5
 
8688
echo $ECHO_N "checking for _InterlockedAnd64()... $ECHO_C" >&6
 
8689
        cat >conftest.$ac_ext <<_ACEOF
 
8690
/* confdefs.h.  */
 
8691
_ACEOF
 
8692
cat confdefs.h >>conftest.$ac_ext
 
8693
cat >>conftest.$ac_ext <<_ACEOF
 
8694
/* end confdefs.h.  */
 
8695
 
 
8696
                        #define WIN32_LEAN_AND_MEAN
 
8697
                        #include <windows.h>
 
8698
 
 
8699
int
 
8700
main ()
 
8701
{
 
8702
 
 
8703
                        volatile __int64 *var;
 
8704
                        _InterlockedAnd64(var, (__int64) 1);
 
8705
                        return 0;
 
8706
 
 
8707
  ;
 
8708
  return 0;
 
8709
}
 
8710
_ACEOF
 
8711
rm -f conftest.$ac_objext conftest$ac_exeext
 
8712
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
8713
  (eval $ac_link) 2>conftest.er1
 
8714
  ac_status=$?
 
8715
  grep -v '^ *+' conftest.er1 >conftest.err
 
8716
  rm -f conftest.er1
 
8717
  cat conftest.err >&5
 
8718
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8719
  (exit $ac_status); } &&
 
8720
         { ac_try='test -z "$ac_c_werror_flag"
 
8721
                         || test ! -s conftest.err'
 
8722
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8723
  (eval $ac_try) 2>&5
 
8724
  ac_status=$?
 
8725
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8726
  (exit $ac_status); }; } &&
 
8727
         { ac_try='test -s conftest$ac_exeext'
 
8728
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8729
  (eval $ac_try) 2>&5
 
8730
  ac_status=$?
 
8731
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8732
  (exit $ac_status); }; }; then
 
8733
  have_ilckd=yes
 
8734
else
 
8735
  echo "$as_me: failed program was:" >&5
 
8736
sed 's/^/| /' conftest.$ac_ext >&5
 
8737
 
 
8738
fi
 
8739
rm -f conftest.err conftest.$ac_objext \
 
8740
      conftest$ac_exeext conftest.$ac_ext
 
8741
        echo "$as_me:$LINENO: result: $have_ilckd" >&5
 
8742
echo "${ECHO_T}$have_ilckd" >&6
 
8743
        test $have_ilckd = yes &&
 
8744
cat >>confdefs.h <<\_ACEOF
 
8745
#define ETHR_HAVE__INTERLOCKEDAND64 1
 
8746
_ACEOF
 
8747
 
 
8748
 
 
8749
        have_ilckd=no
 
8750
        echo "$as_me:$LINENO: checking for _InterlockedOr64()" >&5
 
8751
echo $ECHO_N "checking for _InterlockedOr64()... $ECHO_C" >&6
 
8752
        cat >conftest.$ac_ext <<_ACEOF
 
8753
/* confdefs.h.  */
 
8754
_ACEOF
 
8755
cat confdefs.h >>conftest.$ac_ext
 
8756
cat >>conftest.$ac_ext <<_ACEOF
 
8757
/* end confdefs.h.  */
 
8758
 
 
8759
                        #define WIN32_LEAN_AND_MEAN
 
8760
                        #include <windows.h>
 
8761
 
 
8762
int
 
8763
main ()
 
8764
{
 
8765
 
 
8766
                        volatile __int64 *var;
 
8767
                        _InterlockedOr64(var, (__int64) 1);
 
8768
                        return 0;
 
8769
 
 
8770
  ;
 
8771
  return 0;
 
8772
}
 
8773
_ACEOF
 
8774
rm -f conftest.$ac_objext conftest$ac_exeext
 
8775
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
8776
  (eval $ac_link) 2>conftest.er1
 
8777
  ac_status=$?
 
8778
  grep -v '^ *+' conftest.er1 >conftest.err
 
8779
  rm -f conftest.er1
 
8780
  cat conftest.err >&5
 
8781
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8782
  (exit $ac_status); } &&
 
8783
         { ac_try='test -z "$ac_c_werror_flag"
 
8784
                         || test ! -s conftest.err'
 
8785
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8786
  (eval $ac_try) 2>&5
 
8787
  ac_status=$?
 
8788
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8789
  (exit $ac_status); }; } &&
 
8790
         { ac_try='test -s conftest$ac_exeext'
 
8791
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
8792
  (eval $ac_try) 2>&5
 
8793
  ac_status=$?
 
8794
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
8795
  (exit $ac_status); }; }; then
 
8796
  have_ilckd=yes
 
8797
else
 
8798
  echo "$as_me: failed program was:" >&5
 
8799
sed 's/^/| /' conftest.$ac_ext >&5
 
8800
 
 
8801
fi
 
8802
rm -f conftest.err conftest.$ac_objext \
 
8803
      conftest$ac_exeext conftest.$ac_ext
 
8804
        echo "$as_me:$LINENO: result: $have_ilckd" >&5
 
8805
echo "${ECHO_T}$have_ilckd" >&6
 
8806
        test $have_ilckd = yes &&
 
8807
cat >>confdefs.h <<\_ACEOF
 
8808
#define ETHR_HAVE__INTERLOCKEDOR64 1
 
8809
_ACEOF
 
8810
 
 
8811
 
 
8812
        ;;
 
8813
 
 
8814
    pthread)
 
8815
        ETHR_THR_LIB_BASE_DIR=pthread
 
8816
 
 
8817
cat >>confdefs.h <<\_ACEOF
 
8818
#define ETHR_PTHREADS 1
 
8819
_ACEOF
 
8820
 
 
8821
        case $host_os in
 
8822
            openbsd*)
 
8823
                # The default stack size is insufficient for our needs
 
8824
                # on OpenBSD. We increase it to 256 kilo words.
 
8825
                ethr_modified_default_stack_size=256;;
 
8826
            linux*)
 
8827
                ETHR_DEFS="$ETHR_DEFS -D_GNU_SOURCE"
 
8828
 
 
8829
                if test X$cross_compiling = Xyes; then
 
8830
                    case X$erl_xcomp_linux_usable_sigusrx in
 
8831
                        X) usable_sigusrx=cross;;
 
8832
                        Xyes|Xno) usable_sigusrx=$erl_xcomp_linux_usable_sigusrx;;
 
8833
                        *) { { echo "$as_me:$LINENO: error: Bad erl_xcomp_linux_usable_sigusrx value: $erl_xcomp_linux_usable_sigusrx" >&5
 
8834
echo "$as_me: error: Bad erl_xcomp_linux_usable_sigusrx value: $erl_xcomp_linux_usable_sigusrx" >&2;}
 
8835
   { (exit 1); exit 1; }; };;
 
8836
                    esac
 
8837
                    case X$erl_xcomp_linux_usable_sigaltstack in
 
8838
                        X) usable_sigaltstack=cross;;
 
8839
                        Xyes|Xno) usable_sigaltstack=$erl_xcomp_linux_usable_sigaltstack;;
 
8840
                        *) { { echo "$as_me:$LINENO: error: Bad erl_xcomp_linux_usable_sigaltstack value: $erl_xcomp_linux_usable_sigaltstack" >&5
 
8841
echo "$as_me: error: Bad erl_xcomp_linux_usable_sigaltstack value: $erl_xcomp_linux_usable_sigaltstack" >&2;}
 
8842
   { (exit 1); exit 1; }; };;
 
8843
                    esac
 
8844
                else
 
8845
                    # FIXME: Test for actual problems instead of kernel versions
 
8846
                    linux_kernel_vsn_=`uname -r`
 
8847
                    case $linux_kernel_vsn_ in
 
8848
                        [0-1].*|2.[0-1]|2.[0-1].*)
 
8849
                            usable_sigusrx=no
 
8850
                            usable_sigaltstack=no;;
 
8851
                        2.[2-3]|2.[2-3].*)
 
8852
                            usable_sigusrx=yes
 
8853
                            usable_sigaltstack=no;;
 
8854
                        *)
 
8855
                            usable_sigusrx=yes
 
8856
                            usable_sigaltstack=yes;;
 
8857
                    esac
 
8858
                fi
 
8859
 
 
8860
                echo "$as_me:$LINENO: checking if SIGUSR1 and SIGUSR2 can be used" >&5
 
8861
echo $ECHO_N "checking if SIGUSR1 and SIGUSR2 can be used... $ECHO_C" >&6
 
8862
                echo "$as_me:$LINENO: result: $usable_sigusrx" >&5
 
8863
echo "${ECHO_T}$usable_sigusrx" >&6
 
8864
                if test $usable_sigusrx = cross; then
 
8865
                    usable_sigusrx=yes
 
8866
                    { echo "$as_me:$LINENO: WARNING: result yes guessed because of cross compilation" >&5
 
8867
echo "$as_me: WARNING: result yes guessed because of cross compilation" >&2;}
 
8868
                fi
 
8869
                if test $usable_sigusrx = no; then
 
8870
                    ETHR_DEFS="$ETHR_DEFS -DETHR_UNUSABLE_SIGUSRX"
 
8871
                fi
 
8872
 
 
8873
                echo "$as_me:$LINENO: checking if sigaltstack can be used" >&5
 
8874
echo $ECHO_N "checking if sigaltstack can be used... $ECHO_C" >&6
 
8875
                echo "$as_me:$LINENO: result: $usable_sigaltstack" >&5
 
8876
echo "${ECHO_T}$usable_sigaltstack" >&6
 
8877
                if test $usable_sigaltstack = cross; then
 
8878
                    usable_sigaltstack=yes
 
8879
                    { echo "$as_me:$LINENO: WARNING: result yes guessed because of cross compilation" >&5
 
8880
echo "$as_me: WARNING: result yes guessed because of cross compilation" >&2;}
 
8881
                fi
 
8882
                if test $usable_sigaltstack = no; then
 
8883
                    ETHR_DEFS="$ETHR_DEFS -DETHR_UNUSABLE_SIGALTSTACK"
 
8884
                fi
 
8885
                ;;
 
8886
            *) ;;
 
8887
        esac
 
8888
 
 
8889
                        saved_cppflags="$CPPFLAGS"
6761
8890
        CPPFLAGS="$CPPFLAGS $ETHR_DEFS"
6762
8891
 
6763
 
                saved_libs=$LIBS
 
8892
                saved_libs="$LIBS"
6764
8893
        LIBS="$LIBS $ETHR_X_LIBS"
6765
8894
 
6766
8895
 
6767
 
 
6768
 
 
6769
8896
        if test "${ac_cv_header_pthread_h+set}" = set; then
6770
8897
  echo "$as_me:$LINENO: checking for pthread.h" >&5
6771
8898
echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
6904
9031
 
6905
9032
fi
6906
9033
if test $ac_cv_header_pthread_h = yes; then
 
9034
  \
6907
9035
 
6908
9036
cat >>confdefs.h <<\_ACEOF
6909
9037
#define ETHR_HAVE_PTHREAD_H 1
7061
9189
 
7062
9190
 
7063
9191
 
 
9192
        if test $NEED_NPTL_PTHREAD_H = yes; then
 
9193
 
 
9194
cat >>confdefs.h <<\_ACEOF
 
9195
#define ETHR_NEED_NPTL_PTHREAD_H 1
 
9196
_ACEOF
 
9197
 
 
9198
        fi
 
9199
 
 
9200
        if test "${ac_cv_header_sched_h+set}" = set; then
 
9201
  echo "$as_me:$LINENO: checking for sched.h" >&5
 
9202
echo $ECHO_N "checking for sched.h... $ECHO_C" >&6
 
9203
if test "${ac_cv_header_sched_h+set}" = set; then
 
9204
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
9205
fi
 
9206
echo "$as_me:$LINENO: result: $ac_cv_header_sched_h" >&5
 
9207
echo "${ECHO_T}$ac_cv_header_sched_h" >&6
 
9208
else
 
9209
  # Is the header compilable?
 
9210
echo "$as_me:$LINENO: checking sched.h usability" >&5
 
9211
echo $ECHO_N "checking sched.h usability... $ECHO_C" >&6
 
9212
cat >conftest.$ac_ext <<_ACEOF
 
9213
/* confdefs.h.  */
 
9214
_ACEOF
 
9215
cat confdefs.h >>conftest.$ac_ext
 
9216
cat >>conftest.$ac_ext <<_ACEOF
 
9217
/* end confdefs.h.  */
 
9218
$ac_includes_default
 
9219
#include <sched.h>
 
9220
_ACEOF
 
9221
rm -f conftest.$ac_objext
 
9222
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
9223
  (eval $ac_compile) 2>conftest.er1
 
9224
  ac_status=$?
 
9225
  grep -v '^ *+' conftest.er1 >conftest.err
 
9226
  rm -f conftest.er1
 
9227
  cat conftest.err >&5
 
9228
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9229
  (exit $ac_status); } &&
 
9230
         { ac_try='test -z "$ac_c_werror_flag"
 
9231
                         || test ! -s conftest.err'
 
9232
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9233
  (eval $ac_try) 2>&5
 
9234
  ac_status=$?
 
9235
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9236
  (exit $ac_status); }; } &&
 
9237
         { ac_try='test -s conftest.$ac_objext'
 
9238
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9239
  (eval $ac_try) 2>&5
 
9240
  ac_status=$?
 
9241
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9242
  (exit $ac_status); }; }; then
 
9243
  ac_header_compiler=yes
 
9244
else
 
9245
  echo "$as_me: failed program was:" >&5
 
9246
sed 's/^/| /' conftest.$ac_ext >&5
 
9247
 
 
9248
ac_header_compiler=no
 
9249
fi
 
9250
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
9251
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
9252
echo "${ECHO_T}$ac_header_compiler" >&6
 
9253
 
 
9254
# Is the header present?
 
9255
echo "$as_me:$LINENO: checking sched.h presence" >&5
 
9256
echo $ECHO_N "checking sched.h presence... $ECHO_C" >&6
 
9257
cat >conftest.$ac_ext <<_ACEOF
 
9258
/* confdefs.h.  */
 
9259
_ACEOF
 
9260
cat confdefs.h >>conftest.$ac_ext
 
9261
cat >>conftest.$ac_ext <<_ACEOF
 
9262
/* end confdefs.h.  */
 
9263
#include <sched.h>
 
9264
_ACEOF
 
9265
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
9266
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
9267
  ac_status=$?
 
9268
  grep -v '^ *+' conftest.er1 >conftest.err
 
9269
  rm -f conftest.er1
 
9270
  cat conftest.err >&5
 
9271
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9272
  (exit $ac_status); } >/dev/null; then
 
9273
  if test -s conftest.err; then
 
9274
    ac_cpp_err=$ac_c_preproc_warn_flag
 
9275
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
9276
  else
 
9277
    ac_cpp_err=
 
9278
  fi
 
9279
else
 
9280
  ac_cpp_err=yes
 
9281
fi
 
9282
if test -z "$ac_cpp_err"; then
 
9283
  ac_header_preproc=yes
 
9284
else
 
9285
  echo "$as_me: failed program was:" >&5
 
9286
sed 's/^/| /' conftest.$ac_ext >&5
 
9287
 
 
9288
  ac_header_preproc=no
 
9289
fi
 
9290
rm -f conftest.err conftest.$ac_ext
 
9291
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
9292
echo "${ECHO_T}$ac_header_preproc" >&6
 
9293
 
 
9294
# So?  What about this header?
 
9295
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
9296
  yes:no: )
 
9297
    { echo "$as_me:$LINENO: WARNING: sched.h: accepted by the compiler, rejected by the preprocessor!" >&5
 
9298
echo "$as_me: WARNING: sched.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
9299
    { echo "$as_me:$LINENO: WARNING: sched.h: proceeding with the compiler's result" >&5
 
9300
echo "$as_me: WARNING: sched.h: proceeding with the compiler's result" >&2;}
 
9301
    ac_header_preproc=yes
 
9302
    ;;
 
9303
  no:yes:* )
 
9304
    { echo "$as_me:$LINENO: WARNING: sched.h: present but cannot be compiled" >&5
 
9305
echo "$as_me: WARNING: sched.h: present but cannot be compiled" >&2;}
 
9306
    { echo "$as_me:$LINENO: WARNING: sched.h:     check for missing prerequisite headers?" >&5
 
9307
echo "$as_me: WARNING: sched.h:     check for missing prerequisite headers?" >&2;}
 
9308
    { echo "$as_me:$LINENO: WARNING: sched.h: see the Autoconf documentation" >&5
 
9309
echo "$as_me: WARNING: sched.h: see the Autoconf documentation" >&2;}
 
9310
    { echo "$as_me:$LINENO: WARNING: sched.h:     section \"Present But Cannot Be Compiled\"" >&5
 
9311
echo "$as_me: WARNING: sched.h:     section \"Present But Cannot Be Compiled\"" >&2;}
 
9312
    { echo "$as_me:$LINENO: WARNING: sched.h: proceeding with the preprocessor's result" >&5
 
9313
echo "$as_me: WARNING: sched.h: proceeding with the preprocessor's result" >&2;}
 
9314
    { echo "$as_me:$LINENO: WARNING: sched.h: in the future, the compiler will take precedence" >&5
 
9315
echo "$as_me: WARNING: sched.h: in the future, the compiler will take precedence" >&2;}
 
9316
    (
 
9317
      cat <<\_ASBOX
 
9318
## ------------------------------------------ ##
 
9319
## Report this to the AC_PACKAGE_NAME lists.  ##
 
9320
## ------------------------------------------ ##
 
9321
_ASBOX
 
9322
    ) |
 
9323
      sed "s/^/$as_me: WARNING:     /" >&2
 
9324
    ;;
 
9325
esac
 
9326
echo "$as_me:$LINENO: checking for sched.h" >&5
 
9327
echo $ECHO_N "checking for sched.h... $ECHO_C" >&6
 
9328
if test "${ac_cv_header_sched_h+set}" = set; then
 
9329
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
9330
else
 
9331
  ac_cv_header_sched_h=$ac_header_preproc
 
9332
fi
 
9333
echo "$as_me:$LINENO: result: $ac_cv_header_sched_h" >&5
 
9334
echo "${ECHO_T}$ac_cv_header_sched_h" >&6
 
9335
 
 
9336
fi
 
9337
if test $ac_cv_header_sched_h = yes; then
 
9338
  \
 
9339
 
 
9340
cat >>confdefs.h <<\_ACEOF
 
9341
#define ETHR_HAVE_SCHED_H 1
 
9342
_ACEOF
 
9343
 
 
9344
fi
 
9345
 
 
9346
 
 
9347
 
7064
9348
        if test "${ac_cv_header_sys_time_h+set}" = set; then
7065
9349
  echo "$as_me:$LINENO: checking for sys/time.h" >&5
7066
9350
echo $ECHO_N "checking for sys/time.h... $ECHO_C" >&6
7261
9545
 
7262
9546
 
7263
9547
 
7264
 
        echo "$as_me:$LINENO: checking for pthread_atfork" >&5
7265
 
echo $ECHO_N "checking for pthread_atfork... $ECHO_C" >&6
7266
 
if test "${ac_cv_func_pthread_atfork+set}" = set; then
7267
 
  echo $ECHO_N "(cached) $ECHO_C" >&6
7268
 
else
7269
 
  cat >conftest.$ac_ext <<_ACEOF
7270
 
/* confdefs.h.  */
7271
 
_ACEOF
7272
 
cat confdefs.h >>conftest.$ac_ext
7273
 
cat >>conftest.$ac_ext <<_ACEOF
7274
 
/* end confdefs.h.  */
7275
 
/* Define pthread_atfork to an innocuous variant, in case <limits.h> declares pthread_atfork.
7276
 
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7277
 
#define pthread_atfork innocuous_pthread_atfork
7278
 
 
7279
 
/* System header to define __stub macros and hopefully few prototypes,
7280
 
    which can conflict with char pthread_atfork (); below.
7281
 
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7282
 
    <limits.h> exists even on freestanding compilers.  */
7283
 
 
7284
 
#ifdef __STDC__
7285
 
# include <limits.h>
7286
 
#else
7287
 
# include <assert.h>
7288
 
#endif
7289
 
 
7290
 
#undef pthread_atfork
7291
 
 
7292
 
/* Override any gcc2 internal prototype to avoid an error.  */
7293
 
#ifdef __cplusplus
7294
 
extern "C"
7295
 
{
7296
 
#endif
7297
 
/* We use char because int might match the return type of a gcc2
7298
 
   builtin and then its argument prototype would still apply.  */
7299
 
char pthread_atfork ();
7300
 
/* The GNU C library defines this for functions which it implements
7301
 
    to always fail with ENOSYS.  Some functions are actually named
7302
 
    something starting with __ and the normal name is an alias.  */
7303
 
#if defined (__stub_pthread_atfork) || defined (__stub___pthread_atfork)
7304
 
choke me
7305
 
#else
7306
 
char (*f) () = pthread_atfork;
7307
 
#endif
7308
 
#ifdef __cplusplus
7309
 
}
7310
 
#endif
7311
 
 
7312
 
int
7313
 
main ()
7314
 
{
7315
 
return f != pthread_atfork;
7316
 
  ;
7317
 
  return 0;
7318
 
}
7319
 
_ACEOF
7320
 
rm -f conftest.$ac_objext conftest$ac_exeext
7321
 
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7322
 
  (eval $ac_link) 2>conftest.er1
7323
 
  ac_status=$?
7324
 
  grep -v '^ *+' conftest.er1 >conftest.err
7325
 
  rm -f conftest.er1
7326
 
  cat conftest.err >&5
7327
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7328
 
  (exit $ac_status); } &&
7329
 
         { ac_try='test -z "$ac_c_werror_flag"
7330
 
                         || test ! -s conftest.err'
7331
 
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7332
 
  (eval $ac_try) 2>&5
7333
 
  ac_status=$?
7334
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7335
 
  (exit $ac_status); }; } &&
7336
 
         { ac_try='test -s conftest$ac_exeext'
7337
 
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7338
 
  (eval $ac_try) 2>&5
7339
 
  ac_status=$?
7340
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7341
 
  (exit $ac_status); }; }; then
7342
 
  ac_cv_func_pthread_atfork=yes
7343
 
else
7344
 
  echo "$as_me: failed program was:" >&5
7345
 
sed 's/^/| /' conftest.$ac_ext >&5
7346
 
 
7347
 
ac_cv_func_pthread_atfork=no
7348
 
fi
7349
 
rm -f conftest.err conftest.$ac_objext \
7350
 
      conftest$ac_exeext conftest.$ac_ext
7351
 
fi
7352
 
echo "$as_me:$LINENO: result: $ac_cv_func_pthread_atfork" >&5
7353
 
echo "${ECHO_T}$ac_cv_func_pthread_atfork" >&6
7354
 
if test $ac_cv_func_pthread_atfork = yes; then
7355
 
  \
7356
 
 
7357
 
cat >>confdefs.h <<\_ACEOF
7358
 
#define ETHR_HAVE_PTHREAD_ATFORK 1
7359
 
_ACEOF
7360
 
 
7361
 
fi
7362
 
 
7363
 
        echo "$as_me:$LINENO: checking for pthread_mutexattr_settype" >&5
7364
 
echo $ECHO_N "checking for pthread_mutexattr_settype... $ECHO_C" >&6
7365
 
if test "${ac_cv_func_pthread_mutexattr_settype+set}" = set; then
7366
 
  echo $ECHO_N "(cached) $ECHO_C" >&6
7367
 
else
7368
 
  cat >conftest.$ac_ext <<_ACEOF
7369
 
/* confdefs.h.  */
7370
 
_ACEOF
7371
 
cat confdefs.h >>conftest.$ac_ext
7372
 
cat >>conftest.$ac_ext <<_ACEOF
7373
 
/* end confdefs.h.  */
7374
 
/* Define pthread_mutexattr_settype to an innocuous variant, in case <limits.h> declares pthread_mutexattr_settype.
7375
 
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7376
 
#define pthread_mutexattr_settype innocuous_pthread_mutexattr_settype
7377
 
 
7378
 
/* System header to define __stub macros and hopefully few prototypes,
7379
 
    which can conflict with char pthread_mutexattr_settype (); below.
7380
 
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7381
 
    <limits.h> exists even on freestanding compilers.  */
7382
 
 
7383
 
#ifdef __STDC__
7384
 
# include <limits.h>
7385
 
#else
7386
 
# include <assert.h>
7387
 
#endif
7388
 
 
7389
 
#undef pthread_mutexattr_settype
7390
 
 
7391
 
/* Override any gcc2 internal prototype to avoid an error.  */
7392
 
#ifdef __cplusplus
7393
 
extern "C"
7394
 
{
7395
 
#endif
7396
 
/* We use char because int might match the return type of a gcc2
7397
 
   builtin and then its argument prototype would still apply.  */
7398
 
char pthread_mutexattr_settype ();
7399
 
/* The GNU C library defines this for functions which it implements
7400
 
    to always fail with ENOSYS.  Some functions are actually named
7401
 
    something starting with __ and the normal name is an alias.  */
7402
 
#if defined (__stub_pthread_mutexattr_settype) || defined (__stub___pthread_mutexattr_settype)
7403
 
choke me
7404
 
#else
7405
 
char (*f) () = pthread_mutexattr_settype;
7406
 
#endif
7407
 
#ifdef __cplusplus
7408
 
}
7409
 
#endif
7410
 
 
7411
 
int
7412
 
main ()
7413
 
{
7414
 
return f != pthread_mutexattr_settype;
7415
 
  ;
7416
 
  return 0;
7417
 
}
7418
 
_ACEOF
7419
 
rm -f conftest.$ac_objext conftest$ac_exeext
7420
 
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7421
 
  (eval $ac_link) 2>conftest.er1
7422
 
  ac_status=$?
7423
 
  grep -v '^ *+' conftest.er1 >conftest.err
7424
 
  rm -f conftest.er1
7425
 
  cat conftest.err >&5
7426
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7427
 
  (exit $ac_status); } &&
7428
 
         { ac_try='test -z "$ac_c_werror_flag"
7429
 
                         || test ! -s conftest.err'
7430
 
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7431
 
  (eval $ac_try) 2>&5
7432
 
  ac_status=$?
7433
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7434
 
  (exit $ac_status); }; } &&
7435
 
         { ac_try='test -s conftest$ac_exeext'
7436
 
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7437
 
  (eval $ac_try) 2>&5
7438
 
  ac_status=$?
7439
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7440
 
  (exit $ac_status); }; }; then
7441
 
  ac_cv_func_pthread_mutexattr_settype=yes
7442
 
else
7443
 
  echo "$as_me: failed program was:" >&5
7444
 
sed 's/^/| /' conftest.$ac_ext >&5
7445
 
 
7446
 
ac_cv_func_pthread_mutexattr_settype=no
7447
 
fi
7448
 
rm -f conftest.err conftest.$ac_objext \
7449
 
      conftest$ac_exeext conftest.$ac_ext
7450
 
fi
7451
 
echo "$as_me:$LINENO: result: $ac_cv_func_pthread_mutexattr_settype" >&5
7452
 
echo "${ECHO_T}$ac_cv_func_pthread_mutexattr_settype" >&6
7453
 
if test $ac_cv_func_pthread_mutexattr_settype = yes; then
7454
 
  \
7455
 
 
7456
 
cat >>confdefs.h <<\_ACEOF
7457
 
#define ETHR_HAVE_PTHREAD_MUTEXATTR_SETTYPE 1
7458
 
_ACEOF
7459
 
 
7460
 
fi
7461
 
 
7462
 
        echo "$as_me:$LINENO: checking for pthread_mutexattr_setkind_np" >&5
7463
 
echo $ECHO_N "checking for pthread_mutexattr_setkind_np... $ECHO_C" >&6
7464
 
if test "${ac_cv_func_pthread_mutexattr_setkind_np+set}" = set; then
7465
 
  echo $ECHO_N "(cached) $ECHO_C" >&6
7466
 
else
7467
 
  cat >conftest.$ac_ext <<_ACEOF
7468
 
/* confdefs.h.  */
7469
 
_ACEOF
7470
 
cat confdefs.h >>conftest.$ac_ext
7471
 
cat >>conftest.$ac_ext <<_ACEOF
7472
 
/* end confdefs.h.  */
7473
 
/* Define pthread_mutexattr_setkind_np to an innocuous variant, in case <limits.h> declares pthread_mutexattr_setkind_np.
7474
 
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7475
 
#define pthread_mutexattr_setkind_np innocuous_pthread_mutexattr_setkind_np
7476
 
 
7477
 
/* System header to define __stub macros and hopefully few prototypes,
7478
 
    which can conflict with char pthread_mutexattr_setkind_np (); below.
7479
 
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7480
 
    <limits.h> exists even on freestanding compilers.  */
7481
 
 
7482
 
#ifdef __STDC__
7483
 
# include <limits.h>
7484
 
#else
7485
 
# include <assert.h>
7486
 
#endif
7487
 
 
7488
 
#undef pthread_mutexattr_setkind_np
7489
 
 
7490
 
/* Override any gcc2 internal prototype to avoid an error.  */
7491
 
#ifdef __cplusplus
7492
 
extern "C"
7493
 
{
7494
 
#endif
7495
 
/* We use char because int might match the return type of a gcc2
7496
 
   builtin and then its argument prototype would still apply.  */
7497
 
char pthread_mutexattr_setkind_np ();
7498
 
/* The GNU C library defines this for functions which it implements
7499
 
    to always fail with ENOSYS.  Some functions are actually named
7500
 
    something starting with __ and the normal name is an alias.  */
7501
 
#if defined (__stub_pthread_mutexattr_setkind_np) || defined (__stub___pthread_mutexattr_setkind_np)
7502
 
choke me
7503
 
#else
7504
 
char (*f) () = pthread_mutexattr_setkind_np;
7505
 
#endif
7506
 
#ifdef __cplusplus
7507
 
}
7508
 
#endif
7509
 
 
7510
 
int
7511
 
main ()
7512
 
{
7513
 
return f != pthread_mutexattr_setkind_np;
7514
 
  ;
7515
 
  return 0;
7516
 
}
7517
 
_ACEOF
7518
 
rm -f conftest.$ac_objext conftest$ac_exeext
7519
 
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7520
 
  (eval $ac_link) 2>conftest.er1
7521
 
  ac_status=$?
7522
 
  grep -v '^ *+' conftest.er1 >conftest.err
7523
 
  rm -f conftest.er1
7524
 
  cat conftest.err >&5
7525
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7526
 
  (exit $ac_status); } &&
7527
 
         { ac_try='test -z "$ac_c_werror_flag"
7528
 
                         || test ! -s conftest.err'
7529
 
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7530
 
  (eval $ac_try) 2>&5
7531
 
  ac_status=$?
7532
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7533
 
  (exit $ac_status); }; } &&
7534
 
         { ac_try='test -s conftest$ac_exeext'
7535
 
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7536
 
  (eval $ac_try) 2>&5
7537
 
  ac_status=$?
7538
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7539
 
  (exit $ac_status); }; }; then
7540
 
  ac_cv_func_pthread_mutexattr_setkind_np=yes
7541
 
else
7542
 
  echo "$as_me: failed program was:" >&5
7543
 
sed 's/^/| /' conftest.$ac_ext >&5
7544
 
 
7545
 
ac_cv_func_pthread_mutexattr_setkind_np=no
7546
 
fi
7547
 
rm -f conftest.err conftest.$ac_objext \
7548
 
      conftest$ac_exeext conftest.$ac_ext
7549
 
fi
7550
 
echo "$as_me:$LINENO: result: $ac_cv_func_pthread_mutexattr_setkind_np" >&5
7551
 
echo "${ECHO_T}$ac_cv_func_pthread_mutexattr_setkind_np" >&6
7552
 
if test $ac_cv_func_pthread_mutexattr_setkind_np = yes; then
7553
 
  \
7554
 
 
7555
 
cat >>confdefs.h <<\_ACEOF
7556
 
#define ETHR_HAVE_PTHREAD_MUTEXATTR_SETKIND_NP 1
7557
 
_ACEOF
7558
 
 
7559
 
fi
7560
 
 
7561
9548
        echo "$as_me:$LINENO: checking for pthread_spin_lock" >&5
7562
9549
echo $ECHO_N "checking for pthread_spin_lock... $ECHO_C" >&6
7563
9550
if test "${ac_cv_func_pthread_spin_lock+set}" = set; then
7650
9637
echo "${ECHO_T}$ac_cv_func_pthread_spin_lock" >&6
7651
9638
if test $ac_cv_func_pthread_spin_lock = yes; then
7652
9639
  \
 
9640
                        ethr_have_native_spinlock=yes \
7653
9641
 
7654
9642
cat >>confdefs.h <<\_ACEOF
7655
9643
#define ETHR_HAVE_PTHREAD_SPIN_LOCK 1
7657
9645
 
7658
9646
fi
7659
9647
 
7660
 
        case $host_os in
7661
 
                linux*) # Writers may get starved
7662
 
                        # TODO: write a test that tests the implementation
7663
 
                        ;;
7664
 
                *)
7665
 
                        echo "$as_me:$LINENO: checking for pthread_rwlock_init" >&5
 
9648
 
 
9649
        have_sched_yield=no
 
9650
        have_librt_sched_yield=no
 
9651
        echo "$as_me:$LINENO: checking for sched_yield" >&5
 
9652
echo $ECHO_N "checking for sched_yield... $ECHO_C" >&6
 
9653
if test "${ac_cv_func_sched_yield+set}" = set; then
 
9654
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
9655
else
 
9656
  cat >conftest.$ac_ext <<_ACEOF
 
9657
/* confdefs.h.  */
 
9658
_ACEOF
 
9659
cat confdefs.h >>conftest.$ac_ext
 
9660
cat >>conftest.$ac_ext <<_ACEOF
 
9661
/* end confdefs.h.  */
 
9662
/* Define sched_yield to an innocuous variant, in case <limits.h> declares sched_yield.
 
9663
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 
9664
#define sched_yield innocuous_sched_yield
 
9665
 
 
9666
/* System header to define __stub macros and hopefully few prototypes,
 
9667
    which can conflict with char sched_yield (); below.
 
9668
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 
9669
    <limits.h> exists even on freestanding compilers.  */
 
9670
 
 
9671
#ifdef __STDC__
 
9672
# include <limits.h>
 
9673
#else
 
9674
# include <assert.h>
 
9675
#endif
 
9676
 
 
9677
#undef sched_yield
 
9678
 
 
9679
/* Override any gcc2 internal prototype to avoid an error.  */
 
9680
#ifdef __cplusplus
 
9681
extern "C"
 
9682
{
 
9683
#endif
 
9684
/* We use char because int might match the return type of a gcc2
 
9685
   builtin and then its argument prototype would still apply.  */
 
9686
char sched_yield ();
 
9687
/* The GNU C library defines this for functions which it implements
 
9688
    to always fail with ENOSYS.  Some functions are actually named
 
9689
    something starting with __ and the normal name is an alias.  */
 
9690
#if defined (__stub_sched_yield) || defined (__stub___sched_yield)
 
9691
choke me
 
9692
#else
 
9693
char (*f) () = sched_yield;
 
9694
#endif
 
9695
#ifdef __cplusplus
 
9696
}
 
9697
#endif
 
9698
 
 
9699
int
 
9700
main ()
 
9701
{
 
9702
return f != sched_yield;
 
9703
  ;
 
9704
  return 0;
 
9705
}
 
9706
_ACEOF
 
9707
rm -f conftest.$ac_objext conftest$ac_exeext
 
9708
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
9709
  (eval $ac_link) 2>conftest.er1
 
9710
  ac_status=$?
 
9711
  grep -v '^ *+' conftest.er1 >conftest.err
 
9712
  rm -f conftest.er1
 
9713
  cat conftest.err >&5
 
9714
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9715
  (exit $ac_status); } &&
 
9716
         { ac_try='test -z "$ac_c_werror_flag"
 
9717
                         || test ! -s conftest.err'
 
9718
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9719
  (eval $ac_try) 2>&5
 
9720
  ac_status=$?
 
9721
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9722
  (exit $ac_status); }; } &&
 
9723
         { ac_try='test -s conftest$ac_exeext'
 
9724
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9725
  (eval $ac_try) 2>&5
 
9726
  ac_status=$?
 
9727
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9728
  (exit $ac_status); }; }; then
 
9729
  ac_cv_func_sched_yield=yes
 
9730
else
 
9731
  echo "$as_me: failed program was:" >&5
 
9732
sed 's/^/| /' conftest.$ac_ext >&5
 
9733
 
 
9734
ac_cv_func_sched_yield=no
 
9735
fi
 
9736
rm -f conftest.err conftest.$ac_objext \
 
9737
      conftest$ac_exeext conftest.$ac_ext
 
9738
fi
 
9739
echo "$as_me:$LINENO: result: $ac_cv_func_sched_yield" >&5
 
9740
echo "${ECHO_T}$ac_cv_func_sched_yield" >&6
 
9741
if test $ac_cv_func_sched_yield = yes; then
 
9742
  have_sched_yield=yes
 
9743
fi
 
9744
 
 
9745
        if test $have_sched_yield = no; then
 
9746
            echo "$as_me:$LINENO: checking for sched_yield in -lrt" >&5
 
9747
echo $ECHO_N "checking for sched_yield in -lrt... $ECHO_C" >&6
 
9748
if test "${ac_cv_lib_rt_sched_yield+set}" = set; then
 
9749
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
9750
else
 
9751
  ac_check_lib_save_LIBS=$LIBS
 
9752
LIBS="-lrt  $LIBS"
 
9753
cat >conftest.$ac_ext <<_ACEOF
 
9754
/* confdefs.h.  */
 
9755
_ACEOF
 
9756
cat confdefs.h >>conftest.$ac_ext
 
9757
cat >>conftest.$ac_ext <<_ACEOF
 
9758
/* end confdefs.h.  */
 
9759
 
 
9760
/* Override any gcc2 internal prototype to avoid an error.  */
 
9761
#ifdef __cplusplus
 
9762
extern "C"
 
9763
#endif
 
9764
/* We use char because int might match the return type of a gcc2
 
9765
   builtin and then its argument prototype would still apply.  */
 
9766
char sched_yield ();
 
9767
int
 
9768
main ()
 
9769
{
 
9770
sched_yield ();
 
9771
  ;
 
9772
  return 0;
 
9773
}
 
9774
_ACEOF
 
9775
rm -f conftest.$ac_objext conftest$ac_exeext
 
9776
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
9777
  (eval $ac_link) 2>conftest.er1
 
9778
  ac_status=$?
 
9779
  grep -v '^ *+' conftest.er1 >conftest.err
 
9780
  rm -f conftest.er1
 
9781
  cat conftest.err >&5
 
9782
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9783
  (exit $ac_status); } &&
 
9784
         { ac_try='test -z "$ac_c_werror_flag"
 
9785
                         || test ! -s conftest.err'
 
9786
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9787
  (eval $ac_try) 2>&5
 
9788
  ac_status=$?
 
9789
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9790
  (exit $ac_status); }; } &&
 
9791
         { ac_try='test -s conftest$ac_exeext'
 
9792
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9793
  (eval $ac_try) 2>&5
 
9794
  ac_status=$?
 
9795
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9796
  (exit $ac_status); }; }; then
 
9797
  ac_cv_lib_rt_sched_yield=yes
 
9798
else
 
9799
  echo "$as_me: failed program was:" >&5
 
9800
sed 's/^/| /' conftest.$ac_ext >&5
 
9801
 
 
9802
ac_cv_lib_rt_sched_yield=no
 
9803
fi
 
9804
rm -f conftest.err conftest.$ac_objext \
 
9805
      conftest$ac_exeext conftest.$ac_ext
 
9806
LIBS=$ac_check_lib_save_LIBS
 
9807
fi
 
9808
echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sched_yield" >&5
 
9809
echo "${ECHO_T}$ac_cv_lib_rt_sched_yield" >&6
 
9810
if test $ac_cv_lib_rt_sched_yield = yes; then
 
9811
  have_librt_sched_yield=yes
 
9812
                          ETHR_X_LIBS="$ETHR_X_LIBS -lrt"
 
9813
fi
 
9814
 
 
9815
        fi
 
9816
        if test $have_sched_yield = yes || test $have_librt_sched_yield = yes; then
 
9817
 
 
9818
cat >>confdefs.h <<\_ACEOF
 
9819
#define ETHR_HAVE_SCHED_YIELD 1
 
9820
_ACEOF
 
9821
 
 
9822
            echo "$as_me:$LINENO: checking whether sched_yield() returns an int" >&5
 
9823
echo $ECHO_N "checking whether sched_yield() returns an int... $ECHO_C" >&6
 
9824
            sched_yield_ret_int=no
 
9825
            cat >conftest.$ac_ext <<_ACEOF
 
9826
/* confdefs.h.  */
 
9827
_ACEOF
 
9828
cat confdefs.h >>conftest.$ac_ext
 
9829
cat >>conftest.$ac_ext <<_ACEOF
 
9830
/* end confdefs.h.  */
 
9831
 
 
9832
                                #ifdef ETHR_HAVE_SCHED_H
 
9833
                                #include <sched.h>
 
9834
                                #endif
 
9835
 
 
9836
int
 
9837
main ()
 
9838
{
 
9839
int sched_yield();
 
9840
  ;
 
9841
  return 0;
 
9842
}
 
9843
_ACEOF
 
9844
rm -f conftest.$ac_objext
 
9845
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
9846
  (eval $ac_compile) 2>conftest.er1
 
9847
  ac_status=$?
 
9848
  grep -v '^ *+' conftest.er1 >conftest.err
 
9849
  rm -f conftest.er1
 
9850
  cat conftest.err >&5
 
9851
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9852
  (exit $ac_status); } &&
 
9853
         { ac_try='test -z "$ac_c_werror_flag"
 
9854
                         || test ! -s conftest.err'
 
9855
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9856
  (eval $ac_try) 2>&5
 
9857
  ac_status=$?
 
9858
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9859
  (exit $ac_status); }; } &&
 
9860
         { ac_try='test -s conftest.$ac_objext'
 
9861
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9862
  (eval $ac_try) 2>&5
 
9863
  ac_status=$?
 
9864
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9865
  (exit $ac_status); }; }; then
 
9866
  sched_yield_ret_int=yes
 
9867
else
 
9868
  echo "$as_me: failed program was:" >&5
 
9869
sed 's/^/| /' conftest.$ac_ext >&5
 
9870
 
 
9871
fi
 
9872
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
9873
            echo "$as_me:$LINENO: result: $sched_yield_ret_int" >&5
 
9874
echo "${ECHO_T}$sched_yield_ret_int" >&6
 
9875
            if test $sched_yield_ret_int = yes; then
 
9876
 
 
9877
cat >>confdefs.h <<\_ACEOF
 
9878
#define ETHR_SCHED_YIELD_RET_INT 1
 
9879
_ACEOF
 
9880
 
 
9881
            fi
 
9882
        fi
 
9883
 
 
9884
        have_pthread_yield=no
 
9885
        echo "$as_me:$LINENO: checking for pthread_yield" >&5
 
9886
echo $ECHO_N "checking for pthread_yield... $ECHO_C" >&6
 
9887
if test "${ac_cv_func_pthread_yield+set}" = set; then
 
9888
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
9889
else
 
9890
  cat >conftest.$ac_ext <<_ACEOF
 
9891
/* confdefs.h.  */
 
9892
_ACEOF
 
9893
cat confdefs.h >>conftest.$ac_ext
 
9894
cat >>conftest.$ac_ext <<_ACEOF
 
9895
/* end confdefs.h.  */
 
9896
/* Define pthread_yield to an innocuous variant, in case <limits.h> declares pthread_yield.
 
9897
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 
9898
#define pthread_yield innocuous_pthread_yield
 
9899
 
 
9900
/* System header to define __stub macros and hopefully few prototypes,
 
9901
    which can conflict with char pthread_yield (); below.
 
9902
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 
9903
    <limits.h> exists even on freestanding compilers.  */
 
9904
 
 
9905
#ifdef __STDC__
 
9906
# include <limits.h>
 
9907
#else
 
9908
# include <assert.h>
 
9909
#endif
 
9910
 
 
9911
#undef pthread_yield
 
9912
 
 
9913
/* Override any gcc2 internal prototype to avoid an error.  */
 
9914
#ifdef __cplusplus
 
9915
extern "C"
 
9916
{
 
9917
#endif
 
9918
/* We use char because int might match the return type of a gcc2
 
9919
   builtin and then its argument prototype would still apply.  */
 
9920
char pthread_yield ();
 
9921
/* The GNU C library defines this for functions which it implements
 
9922
    to always fail with ENOSYS.  Some functions are actually named
 
9923
    something starting with __ and the normal name is an alias.  */
 
9924
#if defined (__stub_pthread_yield) || defined (__stub___pthread_yield)
 
9925
choke me
 
9926
#else
 
9927
char (*f) () = pthread_yield;
 
9928
#endif
 
9929
#ifdef __cplusplus
 
9930
}
 
9931
#endif
 
9932
 
 
9933
int
 
9934
main ()
 
9935
{
 
9936
return f != pthread_yield;
 
9937
  ;
 
9938
  return 0;
 
9939
}
 
9940
_ACEOF
 
9941
rm -f conftest.$ac_objext conftest$ac_exeext
 
9942
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
9943
  (eval $ac_link) 2>conftest.er1
 
9944
  ac_status=$?
 
9945
  grep -v '^ *+' conftest.er1 >conftest.err
 
9946
  rm -f conftest.er1
 
9947
  cat conftest.err >&5
 
9948
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9949
  (exit $ac_status); } &&
 
9950
         { ac_try='test -z "$ac_c_werror_flag"
 
9951
                         || test ! -s conftest.err'
 
9952
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9953
  (eval $ac_try) 2>&5
 
9954
  ac_status=$?
 
9955
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9956
  (exit $ac_status); }; } &&
 
9957
         { ac_try='test -s conftest$ac_exeext'
 
9958
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
9959
  (eval $ac_try) 2>&5
 
9960
  ac_status=$?
 
9961
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
9962
  (exit $ac_status); }; }; then
 
9963
  ac_cv_func_pthread_yield=yes
 
9964
else
 
9965
  echo "$as_me: failed program was:" >&5
 
9966
sed 's/^/| /' conftest.$ac_ext >&5
 
9967
 
 
9968
ac_cv_func_pthread_yield=no
 
9969
fi
 
9970
rm -f conftest.err conftest.$ac_objext \
 
9971
      conftest$ac_exeext conftest.$ac_ext
 
9972
fi
 
9973
echo "$as_me:$LINENO: result: $ac_cv_func_pthread_yield" >&5
 
9974
echo "${ECHO_T}$ac_cv_func_pthread_yield" >&6
 
9975
if test $ac_cv_func_pthread_yield = yes; then
 
9976
  have_pthread_yield=yes
 
9977
fi
 
9978
 
 
9979
        if test $have_pthread_yield = yes; then
 
9980
 
 
9981
cat >>confdefs.h <<\_ACEOF
 
9982
#define ETHR_HAVE_PTHREAD_YIELD 1
 
9983
_ACEOF
 
9984
 
 
9985
            echo "$as_me:$LINENO: checking whether pthread_yield() returns an int" >&5
 
9986
echo $ECHO_N "checking whether pthread_yield() returns an int... $ECHO_C" >&6
 
9987
            pthread_yield_ret_int=no
 
9988
            cat >conftest.$ac_ext <<_ACEOF
 
9989
/* confdefs.h.  */
 
9990
_ACEOF
 
9991
cat confdefs.h >>conftest.$ac_ext
 
9992
cat >>conftest.$ac_ext <<_ACEOF
 
9993
/* end confdefs.h.  */
 
9994
 
 
9995
                                #if defined(ETHR_NEED_NPTL_PTHREAD_H)
 
9996
                                #include <nptl/pthread.h>
 
9997
                                #elif defined(ETHR_HAVE_MIT_PTHREAD_H)
 
9998
                                #include <pthread/mit/pthread.h>
 
9999
                                #elif defined(ETHR_HAVE_PTHREAD_H)
 
10000
                                #include <pthread.h>
 
10001
                                #endif
 
10002
 
 
10003
int
 
10004
main ()
 
10005
{
 
10006
int pthread_yield();
 
10007
  ;
 
10008
  return 0;
 
10009
}
 
10010
_ACEOF
 
10011
rm -f conftest.$ac_objext
 
10012
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
10013
  (eval $ac_compile) 2>conftest.er1
 
10014
  ac_status=$?
 
10015
  grep -v '^ *+' conftest.er1 >conftest.err
 
10016
  rm -f conftest.er1
 
10017
  cat conftest.err >&5
 
10018
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10019
  (exit $ac_status); } &&
 
10020
         { ac_try='test -z "$ac_c_werror_flag"
 
10021
                         || test ! -s conftest.err'
 
10022
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10023
  (eval $ac_try) 2>&5
 
10024
  ac_status=$?
 
10025
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10026
  (exit $ac_status); }; } &&
 
10027
         { ac_try='test -s conftest.$ac_objext'
 
10028
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10029
  (eval $ac_try) 2>&5
 
10030
  ac_status=$?
 
10031
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10032
  (exit $ac_status); }; }; then
 
10033
  pthread_yield_ret_int=yes
 
10034
else
 
10035
  echo "$as_me: failed program was:" >&5
 
10036
sed 's/^/| /' conftest.$ac_ext >&5
 
10037
 
 
10038
fi
 
10039
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
10040
            echo "$as_me:$LINENO: result: $pthread_yield_ret_int" >&5
 
10041
echo "${ECHO_T}$pthread_yield_ret_int" >&6
 
10042
            if test $pthread_yield_ret_int = yes; then
 
10043
 
 
10044
cat >>confdefs.h <<\_ACEOF
 
10045
#define ETHR_PTHREAD_YIELD_RET_INT 1
 
10046
_ACEOF
 
10047
 
 
10048
            fi
 
10049
        fi
 
10050
 
 
10051
        have_pthread_rwlock_init=no
 
10052
        echo "$as_me:$LINENO: checking for pthread_rwlock_init" >&5
7666
10053
echo $ECHO_N "checking for pthread_rwlock_init... $ECHO_C" >&6
7667
10054
if test "${ac_cv_func_pthread_rwlock_init+set}" = set; then
7668
10055
  echo $ECHO_N "(cached) $ECHO_C" >&6
7753
10140
echo "$as_me:$LINENO: result: $ac_cv_func_pthread_rwlock_init" >&5
7754
10141
echo "${ECHO_T}$ac_cv_func_pthread_rwlock_init" >&6
7755
10142
if test $ac_cv_func_pthread_rwlock_init = yes; then
7756
 
  \
7757
 
 
7758
 
cat >>confdefs.h <<\_ACEOF
7759
 
#define ETHR_HAVE_PTHREAD_RWLOCK_INIT 1
7760
 
_ACEOF
7761
 
 
7762
 
fi
7763
 
 
7764
 
                        ;;
7765
 
        esac
 
10143
  have_pthread_rwlock_init=yes
 
10144
fi
 
10145
 
 
10146
        if test $have_pthread_rwlock_init = yes; then
 
10147
 
 
10148
            ethr_have_pthread_rwlockattr_setkind_np=no
 
10149
            echo "$as_me:$LINENO: checking for pthread_rwlockattr_setkind_np" >&5
 
10150
echo $ECHO_N "checking for pthread_rwlockattr_setkind_np... $ECHO_C" >&6
 
10151
if test "${ac_cv_func_pthread_rwlockattr_setkind_np+set}" = set; then
 
10152
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
10153
else
 
10154
  cat >conftest.$ac_ext <<_ACEOF
 
10155
/* confdefs.h.  */
 
10156
_ACEOF
 
10157
cat confdefs.h >>conftest.$ac_ext
 
10158
cat >>conftest.$ac_ext <<_ACEOF
 
10159
/* end confdefs.h.  */
 
10160
/* Define pthread_rwlockattr_setkind_np to an innocuous variant, in case <limits.h> declares pthread_rwlockattr_setkind_np.
 
10161
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 
10162
#define pthread_rwlockattr_setkind_np innocuous_pthread_rwlockattr_setkind_np
 
10163
 
 
10164
/* System header to define __stub macros and hopefully few prototypes,
 
10165
    which can conflict with char pthread_rwlockattr_setkind_np (); below.
 
10166
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 
10167
    <limits.h> exists even on freestanding compilers.  */
 
10168
 
 
10169
#ifdef __STDC__
 
10170
# include <limits.h>
 
10171
#else
 
10172
# include <assert.h>
 
10173
#endif
 
10174
 
 
10175
#undef pthread_rwlockattr_setkind_np
 
10176
 
 
10177
/* Override any gcc2 internal prototype to avoid an error.  */
 
10178
#ifdef __cplusplus
 
10179
extern "C"
 
10180
{
 
10181
#endif
 
10182
/* We use char because int might match the return type of a gcc2
 
10183
   builtin and then its argument prototype would still apply.  */
 
10184
char pthread_rwlockattr_setkind_np ();
 
10185
/* The GNU C library defines this for functions which it implements
 
10186
    to always fail with ENOSYS.  Some functions are actually named
 
10187
    something starting with __ and the normal name is an alias.  */
 
10188
#if defined (__stub_pthread_rwlockattr_setkind_np) || defined (__stub___pthread_rwlockattr_setkind_np)
 
10189
choke me
 
10190
#else
 
10191
char (*f) () = pthread_rwlockattr_setkind_np;
 
10192
#endif
 
10193
#ifdef __cplusplus
 
10194
}
 
10195
#endif
 
10196
 
 
10197
int
 
10198
main ()
 
10199
{
 
10200
return f != pthread_rwlockattr_setkind_np;
 
10201
  ;
 
10202
  return 0;
 
10203
}
 
10204
_ACEOF
 
10205
rm -f conftest.$ac_objext conftest$ac_exeext
 
10206
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
10207
  (eval $ac_link) 2>conftest.er1
 
10208
  ac_status=$?
 
10209
  grep -v '^ *+' conftest.er1 >conftest.err
 
10210
  rm -f conftest.er1
 
10211
  cat conftest.err >&5
 
10212
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10213
  (exit $ac_status); } &&
 
10214
         { ac_try='test -z "$ac_c_werror_flag"
 
10215
                         || test ! -s conftest.err'
 
10216
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10217
  (eval $ac_try) 2>&5
 
10218
  ac_status=$?
 
10219
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10220
  (exit $ac_status); }; } &&
 
10221
         { ac_try='test -s conftest$ac_exeext'
 
10222
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10223
  (eval $ac_try) 2>&5
 
10224
  ac_status=$?
 
10225
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10226
  (exit $ac_status); }; }; then
 
10227
  ac_cv_func_pthread_rwlockattr_setkind_np=yes
 
10228
else
 
10229
  echo "$as_me: failed program was:" >&5
 
10230
sed 's/^/| /' conftest.$ac_ext >&5
 
10231
 
 
10232
ac_cv_func_pthread_rwlockattr_setkind_np=no
 
10233
fi
 
10234
rm -f conftest.err conftest.$ac_objext \
 
10235
      conftest$ac_exeext conftest.$ac_ext
 
10236
fi
 
10237
echo "$as_me:$LINENO: result: $ac_cv_func_pthread_rwlockattr_setkind_np" >&5
 
10238
echo "${ECHO_T}$ac_cv_func_pthread_rwlockattr_setkind_np" >&6
 
10239
if test $ac_cv_func_pthread_rwlockattr_setkind_np = yes; then
 
10240
  ethr_have_pthread_rwlockattr_setkind_np=yes
 
10241
fi
 
10242
 
 
10243
 
 
10244
            if test $ethr_have_pthread_rwlockattr_setkind_np = yes; then
 
10245
 
 
10246
cat >>confdefs.h <<\_ACEOF
 
10247
#define ETHR_HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP 1
 
10248
_ACEOF
 
10249
 
 
10250
 
 
10251
                echo "$as_me:$LINENO: checking for PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP" >&5
 
10252
echo $ECHO_N "checking for PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP... $ECHO_C" >&6
 
10253
                ethr_pthread_rwlock_writer_nonrecursive_initializer_np=no
 
10254
                cat >conftest.$ac_ext <<_ACEOF
 
10255
/* confdefs.h.  */
 
10256
_ACEOF
 
10257
cat confdefs.h >>conftest.$ac_ext
 
10258
cat >>conftest.$ac_ext <<_ACEOF
 
10259
/* end confdefs.h.  */
 
10260
 
 
10261
                                #if defined(ETHR_NEED_NPTL_PTHREAD_H)
 
10262
                                #include <nptl/pthread.h>
 
10263
                                #elif defined(ETHR_HAVE_MIT_PTHREAD_H)
 
10264
                                #include <pthread/mit/pthread.h>
 
10265
                                #elif defined(ETHR_HAVE_PTHREAD_H)
 
10266
                                #include <pthread.h>
 
10267
                                #endif
 
10268
 
 
10269
int
 
10270
main ()
 
10271
{
 
10272
 
 
10273
                                pthread_rwlockattr_t *attr;
 
10274
                                return pthread_rwlockattr_setkind_np(attr,
 
10275
                                    PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
 
10276
 
 
10277
  ;
 
10278
  return 0;
 
10279
}
 
10280
_ACEOF
 
10281
rm -f conftest.$ac_objext conftest$ac_exeext
 
10282
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
10283
  (eval $ac_link) 2>conftest.er1
 
10284
  ac_status=$?
 
10285
  grep -v '^ *+' conftest.er1 >conftest.err
 
10286
  rm -f conftest.er1
 
10287
  cat conftest.err >&5
 
10288
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10289
  (exit $ac_status); } &&
 
10290
         { ac_try='test -z "$ac_c_werror_flag"
 
10291
                         || test ! -s conftest.err'
 
10292
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10293
  (eval $ac_try) 2>&5
 
10294
  ac_status=$?
 
10295
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10296
  (exit $ac_status); }; } &&
 
10297
         { ac_try='test -s conftest$ac_exeext'
 
10298
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10299
  (eval $ac_try) 2>&5
 
10300
  ac_status=$?
 
10301
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10302
  (exit $ac_status); }; }; then
 
10303
  ethr_pthread_rwlock_writer_nonrecursive_initializer_np=yes
 
10304
else
 
10305
  echo "$as_me: failed program was:" >&5
 
10306
sed 's/^/| /' conftest.$ac_ext >&5
 
10307
 
 
10308
fi
 
10309
rm -f conftest.err conftest.$ac_objext \
 
10310
      conftest$ac_exeext conftest.$ac_ext
 
10311
                echo "$as_me:$LINENO: result: $ethr_pthread_rwlock_writer_nonrecursive_initializer_np" >&5
 
10312
echo "${ECHO_T}$ethr_pthread_rwlock_writer_nonrecursive_initializer_np" >&6
 
10313
                if test $ethr_pthread_rwlock_writer_nonrecursive_initializer_np = yes; then
 
10314
 
 
10315
cat >>confdefs.h <<\_ACEOF
 
10316
#define ETHR_HAVE_PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP 1
 
10317
_ACEOF
 
10318
 
 
10319
                fi
 
10320
            fi
 
10321
        fi
 
10322
 
 
10323
        if test "$force_pthread_rwlocks" = "yes"; then
 
10324
 
 
10325
 
 
10326
cat >>confdefs.h <<\_ACEOF
 
10327
#define ETHR_FORCE_PTHREAD_RWLOCK 1
 
10328
_ACEOF
 
10329
 
 
10330
 
 
10331
            if test $have_pthread_rwlock_init = yes; then
 
10332
                { echo "$as_me:$LINENO: WARNING: Forced usage of pthread rwlocks. Note that this implementation may suffer from starvation issues." >&5
 
10333
echo "$as_me: WARNING: Forced usage of pthread rwlocks. Note that this implementation may suffer from starvation issues." >&2;}
 
10334
            else
 
10335
                { { echo "$as_me:$LINENO: error: User forced usage of pthread rwlock, but no such implementation was found" >&5
 
10336
echo "$as_me: error: User forced usage of pthread rwlock, but no such implementation was found" >&2;}
 
10337
   { (exit 1); exit 1; }; }
 
10338
            fi
 
10339
        fi
 
10340
 
7766
10341
        echo "$as_me:$LINENO: checking for pthread_attr_setguardsize" >&5
7767
10342
echo $ECHO_N "checking for pthread_attr_setguardsize... $ECHO_C" >&6
7768
10343
if test "${ac_cv_func_pthread_attr_setguardsize+set}" = set; then
7863
10438
fi
7864
10439
 
7865
10440
 
 
10441
        linux_futex=no
 
10442
        echo "$as_me:$LINENO: checking for Linux futexes" >&5
 
10443
echo $ECHO_N "checking for Linux futexes... $ECHO_C" >&6
 
10444
        cat >conftest.$ac_ext <<_ACEOF
 
10445
/* confdefs.h.  */
 
10446
_ACEOF
 
10447
cat confdefs.h >>conftest.$ac_ext
 
10448
cat >>conftest.$ac_ext <<_ACEOF
 
10449
/* end confdefs.h.  */
 
10450
 
 
10451
                        #include <sys/syscall.h>
 
10452
                        #include <unistd.h>
 
10453
                        #include <linux/futex.h>
 
10454
                        #include <sys/time.h>
 
10455
 
 
10456
int
 
10457
main ()
 
10458
{
 
10459
 
 
10460
                        int i = 1;
 
10461
                        syscall(__NR_futex, (void *) &i, FUTEX_WAKE, 1,
 
10462
                                (void*)0,(void*)0, 0);
 
10463
                        syscall(__NR_futex, (void *) &i, FUTEX_WAIT, 0,
 
10464
                                (void*)0,(void*)0, 0);
 
10465
                        return 0;
 
10466
 
 
10467
  ;
 
10468
  return 0;
 
10469
}
 
10470
_ACEOF
 
10471
rm -f conftest.$ac_objext conftest$ac_exeext
 
10472
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
10473
  (eval $ac_link) 2>conftest.er1
 
10474
  ac_status=$?
 
10475
  grep -v '^ *+' conftest.er1 >conftest.err
 
10476
  rm -f conftest.er1
 
10477
  cat conftest.err >&5
 
10478
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10479
  (exit $ac_status); } &&
 
10480
         { ac_try='test -z "$ac_c_werror_flag"
 
10481
                         || test ! -s conftest.err'
 
10482
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10483
  (eval $ac_try) 2>&5
 
10484
  ac_status=$?
 
10485
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10486
  (exit $ac_status); }; } &&
 
10487
         { ac_try='test -s conftest$ac_exeext'
 
10488
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10489
  (eval $ac_try) 2>&5
 
10490
  ac_status=$?
 
10491
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10492
  (exit $ac_status); }; }; then
 
10493
  linux_futex=yes
 
10494
else
 
10495
  echo "$as_me: failed program was:" >&5
 
10496
sed 's/^/| /' conftest.$ac_ext >&5
 
10497
 
 
10498
fi
 
10499
rm -f conftest.err conftest.$ac_objext \
 
10500
      conftest$ac_exeext conftest.$ac_ext
 
10501
        echo "$as_me:$LINENO: result: $linux_futex" >&5
 
10502
echo "${ECHO_T}$linux_futex" >&6
 
10503
        test $linux_futex = yes &&
 
10504
cat >>confdefs.h <<\_ACEOF
 
10505
#define ETHR_HAVE_LINUX_FUTEX 1
 
10506
_ACEOF
 
10507
 
 
10508
 
 
10509
        echo "$as_me:$LINENO: checking for GCC atomic operations" >&5
 
10510
echo $ECHO_N "checking for GCC atomic operations... $ECHO_C" >&6
 
10511
        ethr_have_gcc_atomic_ops=no
 
10512
        cat >conftest.$ac_ext <<_ACEOF
 
10513
/* confdefs.h.  */
 
10514
_ACEOF
 
10515
cat confdefs.h >>conftest.$ac_ext
 
10516
cat >>conftest.$ac_ext <<_ACEOF
 
10517
/* end confdefs.h.  */
 
10518
 
 
10519
int
 
10520
main ()
 
10521
{
 
10522
 
 
10523
                        long res;
 
10524
                        volatile long val;
 
10525
                        res = __sync_val_compare_and_swap(&val, (long) 1, (long) 0);
 
10526
                        res = __sync_add_and_fetch(&val, (long) 1);
 
10527
                        res = __sync_sub_and_fetch(&val, (long) 1);
 
10528
                        res = __sync_fetch_and_and(&val, (long) 1);
 
10529
                        res = __sync_fetch_and_or(&val, (long) 1);
 
10530
 
 
10531
  ;
 
10532
  return 0;
 
10533
}
 
10534
_ACEOF
 
10535
rm -f conftest.$ac_objext conftest$ac_exeext
 
10536
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
10537
  (eval $ac_link) 2>conftest.er1
 
10538
  ac_status=$?
 
10539
  grep -v '^ *+' conftest.er1 >conftest.err
 
10540
  rm -f conftest.er1
 
10541
  cat conftest.err >&5
 
10542
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10543
  (exit $ac_status); } &&
 
10544
         { ac_try='test -z "$ac_c_werror_flag"
 
10545
                         || test ! -s conftest.err'
 
10546
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10547
  (eval $ac_try) 2>&5
 
10548
  ac_status=$?
 
10549
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10550
  (exit $ac_status); }; } &&
 
10551
         { ac_try='test -s conftest$ac_exeext'
 
10552
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10553
  (eval $ac_try) 2>&5
 
10554
  ac_status=$?
 
10555
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10556
  (exit $ac_status); }; }; then
 
10557
  ethr_have_native_atomics=yes
 
10558
                     ethr_have_gcc_atomic_ops=yes
 
10559
else
 
10560
  echo "$as_me: failed program was:" >&5
 
10561
sed 's/^/| /' conftest.$ac_ext >&5
 
10562
 
 
10563
fi
 
10564
rm -f conftest.err conftest.$ac_objext \
 
10565
      conftest$ac_exeext conftest.$ac_ext
 
10566
        echo "$as_me:$LINENO: result: $ethr_have_gcc_atomic_ops" >&5
 
10567
echo "${ECHO_T}$ethr_have_gcc_atomic_ops" >&6
 
10568
        test $ethr_have_gcc_atomic_ops = yes &&
 
10569
cat >>confdefs.h <<\_ACEOF
 
10570
#define ETHR_HAVE_GCC_ATOMIC_OPS 1
 
10571
_ACEOF
 
10572
 
 
10573
 
 
10574
        case "$host_cpu" in
 
10575
          sun4u | sparc64 | sun4v)
 
10576
                ethr_have_native_atomics=yes;;
 
10577
          i86pc | i*86 | x86_64 | amd64)
 
10578
                ethr_have_native_atomics=yes;;
 
10579
          macppc | ppc | "Power Macintosh")
 
10580
                ethr_have_native_atomics=yes;;
 
10581
          tile)
 
10582
                ethr_have_native_atomics=yes;;
 
10583
          *)
 
10584
                ;;
 
10585
        esac
 
10586
 
 
10587
        echo "$as_me:$LINENO: checking for a usable libatomic_ops implementation" >&5
 
10588
echo $ECHO_N "checking for a usable libatomic_ops implementation... $ECHO_C" >&6
 
10589
        case "x$with_libatomic_ops" in
 
10590
            xno | xyes | x)
 
10591
                libatomic_ops_include=
 
10592
                ;;
 
10593
            *)
 
10594
                if test -d "${with_libatomic_ops}/include"; then
 
10595
                    libatomic_ops_include="-I$with_libatomic_ops/include"
 
10596
                    CPPFLAGS="$CPPFLAGS $libatomic_ops_include"
 
10597
                else
 
10598
                    { { echo "$as_me:$LINENO: error: libatomic_ops include directory $with_libatomic_ops/include not found" >&5
 
10599
echo "$as_me: error: libatomic_ops include directory $with_libatomic_ops/include not found" >&2;}
 
10600
   { (exit 1); exit 1; }; }
 
10601
                fi;;
 
10602
        esac
 
10603
        ethr_have_libatomic_ops=no
 
10604
        cat >conftest.$ac_ext <<_ACEOF
 
10605
/* confdefs.h.  */
 
10606
_ACEOF
 
10607
cat confdefs.h >>conftest.$ac_ext
 
10608
cat >>conftest.$ac_ext <<_ACEOF
 
10609
/* end confdefs.h.  */
 
10610
#include "atomic_ops.h"
 
10611
int
 
10612
main ()
 
10613
{
 
10614
 
 
10615
                        volatile AO_t x;
 
10616
                        AO_t y;
 
10617
                        int z;
 
10618
 
 
10619
                        AO_nop_full();
 
10620
                        AO_store(&x, (AO_t) 0);
 
10621
                        z = AO_load(&x);
 
10622
                        z = AO_compare_and_swap(&x, (AO_t) 0, (AO_t) 1);
 
10623
 
 
10624
  ;
 
10625
  return 0;
 
10626
}
 
10627
_ACEOF
 
10628
rm -f conftest.$ac_objext conftest$ac_exeext
 
10629
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
10630
  (eval $ac_link) 2>conftest.er1
 
10631
  ac_status=$?
 
10632
  grep -v '^ *+' conftest.er1 >conftest.err
 
10633
  rm -f conftest.er1
 
10634
  cat conftest.err >&5
 
10635
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10636
  (exit $ac_status); } &&
 
10637
         { ac_try='test -z "$ac_c_werror_flag"
 
10638
                         || test ! -s conftest.err'
 
10639
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10640
  (eval $ac_try) 2>&5
 
10641
  ac_status=$?
 
10642
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10643
  (exit $ac_status); }; } &&
 
10644
         { ac_try='test -s conftest$ac_exeext'
 
10645
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10646
  (eval $ac_try) 2>&5
 
10647
  ac_status=$?
 
10648
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10649
  (exit $ac_status); }; }; then
 
10650
  ethr_have_native_atomics=yes
 
10651
                     ethr_have_libatomic_ops=yes
 
10652
else
 
10653
  echo "$as_me: failed program was:" >&5
 
10654
sed 's/^/| /' conftest.$ac_ext >&5
 
10655
 
 
10656
fi
 
10657
rm -f conftest.err conftest.$ac_objext \
 
10658
      conftest$ac_exeext conftest.$ac_ext
 
10659
        echo "$as_me:$LINENO: result: $ethr_have_libatomic_ops" >&5
 
10660
echo "${ECHO_T}$ethr_have_libatomic_ops" >&6
 
10661
        if test $ethr_have_libatomic_ops = yes; then
 
10662
            echo "$as_me:$LINENO: checking for AO_t" >&5
 
10663
echo $ECHO_N "checking for AO_t... $ECHO_C" >&6
 
10664
if test "${ac_cv_type_AO_t+set}" = set; then
 
10665
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
10666
else
 
10667
  cat >conftest.$ac_ext <<_ACEOF
 
10668
/* confdefs.h.  */
 
10669
_ACEOF
 
10670
cat confdefs.h >>conftest.$ac_ext
 
10671
cat >>conftest.$ac_ext <<_ACEOF
 
10672
/* end confdefs.h.  */
 
10673
 
 
10674
                                #include <stdio.h>
 
10675
                                #include "atomic_ops.h"
 
10676
 
 
10677
 
 
10678
int
 
10679
main ()
 
10680
{
 
10681
if ((AO_t *) 0)
 
10682
  return 0;
 
10683
if (sizeof (AO_t))
 
10684
  return 0;
 
10685
  ;
 
10686
  return 0;
 
10687
}
 
10688
_ACEOF
 
10689
rm -f conftest.$ac_objext
 
10690
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
10691
  (eval $ac_compile) 2>conftest.er1
 
10692
  ac_status=$?
 
10693
  grep -v '^ *+' conftest.er1 >conftest.err
 
10694
  rm -f conftest.er1
 
10695
  cat conftest.err >&5
 
10696
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10697
  (exit $ac_status); } &&
 
10698
         { ac_try='test -z "$ac_c_werror_flag"
 
10699
                         || test ! -s conftest.err'
 
10700
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10701
  (eval $ac_try) 2>&5
 
10702
  ac_status=$?
 
10703
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10704
  (exit $ac_status); }; } &&
 
10705
         { ac_try='test -s conftest.$ac_objext'
 
10706
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10707
  (eval $ac_try) 2>&5
 
10708
  ac_status=$?
 
10709
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10710
  (exit $ac_status); }; }; then
 
10711
  ac_cv_type_AO_t=yes
 
10712
else
 
10713
  echo "$as_me: failed program was:" >&5
 
10714
sed 's/^/| /' conftest.$ac_ext >&5
 
10715
 
 
10716
ac_cv_type_AO_t=no
 
10717
fi
 
10718
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
10719
fi
 
10720
echo "$as_me:$LINENO: result: $ac_cv_type_AO_t" >&5
 
10721
echo "${ECHO_T}$ac_cv_type_AO_t" >&6
 
10722
 
 
10723
echo "$as_me:$LINENO: checking size of AO_t" >&5
 
10724
echo $ECHO_N "checking size of AO_t... $ECHO_C" >&6
 
10725
if test "${ac_cv_sizeof_AO_t+set}" = set; then
 
10726
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
10727
else
 
10728
  if test "$ac_cv_type_AO_t" = yes; then
 
10729
  # The cast to unsigned long works around a bug in the HP C Compiler
 
10730
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 
10731
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 
10732
  # This bug is HP SR number 8606223364.
 
10733
  if test "$cross_compiling" = yes; then
 
10734
  # Depending upon the size, compute the lo and hi bounds.
 
10735
cat >conftest.$ac_ext <<_ACEOF
 
10736
/* confdefs.h.  */
 
10737
_ACEOF
 
10738
cat confdefs.h >>conftest.$ac_ext
 
10739
cat >>conftest.$ac_ext <<_ACEOF
 
10740
/* end confdefs.h.  */
 
10741
 
 
10742
                                #include <stdio.h>
 
10743
                                #include "atomic_ops.h"
 
10744
 
 
10745
 
 
10746
int
 
10747
main ()
 
10748
{
 
10749
static int test_array [1 - 2 * !(((long) (sizeof (AO_t))) >= 0)];
 
10750
test_array [0] = 0
 
10751
 
 
10752
  ;
 
10753
  return 0;
 
10754
}
 
10755
_ACEOF
 
10756
rm -f conftest.$ac_objext
 
10757
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
10758
  (eval $ac_compile) 2>conftest.er1
 
10759
  ac_status=$?
 
10760
  grep -v '^ *+' conftest.er1 >conftest.err
 
10761
  rm -f conftest.er1
 
10762
  cat conftest.err >&5
 
10763
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10764
  (exit $ac_status); } &&
 
10765
         { ac_try='test -z "$ac_c_werror_flag"
 
10766
                         || test ! -s conftest.err'
 
10767
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10768
  (eval $ac_try) 2>&5
 
10769
  ac_status=$?
 
10770
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10771
  (exit $ac_status); }; } &&
 
10772
         { ac_try='test -s conftest.$ac_objext'
 
10773
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10774
  (eval $ac_try) 2>&5
 
10775
  ac_status=$?
 
10776
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10777
  (exit $ac_status); }; }; then
 
10778
  ac_lo=0 ac_mid=0
 
10779
  while :; do
 
10780
    cat >conftest.$ac_ext <<_ACEOF
 
10781
/* confdefs.h.  */
 
10782
_ACEOF
 
10783
cat confdefs.h >>conftest.$ac_ext
 
10784
cat >>conftest.$ac_ext <<_ACEOF
 
10785
/* end confdefs.h.  */
 
10786
 
 
10787
                                #include <stdio.h>
 
10788
                                #include "atomic_ops.h"
 
10789
 
 
10790
 
 
10791
int
 
10792
main ()
 
10793
{
 
10794
static int test_array [1 - 2 * !(((long) (sizeof (AO_t))) <= $ac_mid)];
 
10795
test_array [0] = 0
 
10796
 
 
10797
  ;
 
10798
  return 0;
 
10799
}
 
10800
_ACEOF
 
10801
rm -f conftest.$ac_objext
 
10802
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
10803
  (eval $ac_compile) 2>conftest.er1
 
10804
  ac_status=$?
 
10805
  grep -v '^ *+' conftest.er1 >conftest.err
 
10806
  rm -f conftest.er1
 
10807
  cat conftest.err >&5
 
10808
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10809
  (exit $ac_status); } &&
 
10810
         { ac_try='test -z "$ac_c_werror_flag"
 
10811
                         || test ! -s conftest.err'
 
10812
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10813
  (eval $ac_try) 2>&5
 
10814
  ac_status=$?
 
10815
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10816
  (exit $ac_status); }; } &&
 
10817
         { ac_try='test -s conftest.$ac_objext'
 
10818
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10819
  (eval $ac_try) 2>&5
 
10820
  ac_status=$?
 
10821
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10822
  (exit $ac_status); }; }; then
 
10823
  ac_hi=$ac_mid; break
 
10824
else
 
10825
  echo "$as_me: failed program was:" >&5
 
10826
sed 's/^/| /' conftest.$ac_ext >&5
 
10827
 
 
10828
ac_lo=`expr $ac_mid + 1`
 
10829
                    if test $ac_lo -le $ac_mid; then
 
10830
                      ac_lo= ac_hi=
 
10831
                      break
 
10832
                    fi
 
10833
                    ac_mid=`expr 2 '*' $ac_mid + 1`
 
10834
fi
 
10835
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
10836
  done
 
10837
else
 
10838
  echo "$as_me: failed program was:" >&5
 
10839
sed 's/^/| /' conftest.$ac_ext >&5
 
10840
 
 
10841
cat >conftest.$ac_ext <<_ACEOF
 
10842
/* confdefs.h.  */
 
10843
_ACEOF
 
10844
cat confdefs.h >>conftest.$ac_ext
 
10845
cat >>conftest.$ac_ext <<_ACEOF
 
10846
/* end confdefs.h.  */
 
10847
 
 
10848
                                #include <stdio.h>
 
10849
                                #include "atomic_ops.h"
 
10850
 
 
10851
 
 
10852
int
 
10853
main ()
 
10854
{
 
10855
static int test_array [1 - 2 * !(((long) (sizeof (AO_t))) < 0)];
 
10856
test_array [0] = 0
 
10857
 
 
10858
  ;
 
10859
  return 0;
 
10860
}
 
10861
_ACEOF
 
10862
rm -f conftest.$ac_objext
 
10863
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
10864
  (eval $ac_compile) 2>conftest.er1
 
10865
  ac_status=$?
 
10866
  grep -v '^ *+' conftest.er1 >conftest.err
 
10867
  rm -f conftest.er1
 
10868
  cat conftest.err >&5
 
10869
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10870
  (exit $ac_status); } &&
 
10871
         { ac_try='test -z "$ac_c_werror_flag"
 
10872
                         || test ! -s conftest.err'
 
10873
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10874
  (eval $ac_try) 2>&5
 
10875
  ac_status=$?
 
10876
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10877
  (exit $ac_status); }; } &&
 
10878
         { ac_try='test -s conftest.$ac_objext'
 
10879
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10880
  (eval $ac_try) 2>&5
 
10881
  ac_status=$?
 
10882
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10883
  (exit $ac_status); }; }; then
 
10884
  ac_hi=-1 ac_mid=-1
 
10885
  while :; do
 
10886
    cat >conftest.$ac_ext <<_ACEOF
 
10887
/* confdefs.h.  */
 
10888
_ACEOF
 
10889
cat confdefs.h >>conftest.$ac_ext
 
10890
cat >>conftest.$ac_ext <<_ACEOF
 
10891
/* end confdefs.h.  */
 
10892
 
 
10893
                                #include <stdio.h>
 
10894
                                #include "atomic_ops.h"
 
10895
 
 
10896
 
 
10897
int
 
10898
main ()
 
10899
{
 
10900
static int test_array [1 - 2 * !(((long) (sizeof (AO_t))) >= $ac_mid)];
 
10901
test_array [0] = 0
 
10902
 
 
10903
  ;
 
10904
  return 0;
 
10905
}
 
10906
_ACEOF
 
10907
rm -f conftest.$ac_objext
 
10908
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
10909
  (eval $ac_compile) 2>conftest.er1
 
10910
  ac_status=$?
 
10911
  grep -v '^ *+' conftest.er1 >conftest.err
 
10912
  rm -f conftest.er1
 
10913
  cat conftest.err >&5
 
10914
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10915
  (exit $ac_status); } &&
 
10916
         { ac_try='test -z "$ac_c_werror_flag"
 
10917
                         || test ! -s conftest.err'
 
10918
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10919
  (eval $ac_try) 2>&5
 
10920
  ac_status=$?
 
10921
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10922
  (exit $ac_status); }; } &&
 
10923
         { ac_try='test -s conftest.$ac_objext'
 
10924
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10925
  (eval $ac_try) 2>&5
 
10926
  ac_status=$?
 
10927
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10928
  (exit $ac_status); }; }; then
 
10929
  ac_lo=$ac_mid; break
 
10930
else
 
10931
  echo "$as_me: failed program was:" >&5
 
10932
sed 's/^/| /' conftest.$ac_ext >&5
 
10933
 
 
10934
ac_hi=`expr '(' $ac_mid ')' - 1`
 
10935
                       if test $ac_mid -le $ac_hi; then
 
10936
                         ac_lo= ac_hi=
 
10937
                         break
 
10938
                       fi
 
10939
                       ac_mid=`expr 2 '*' $ac_mid`
 
10940
fi
 
10941
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
10942
  done
 
10943
else
 
10944
  echo "$as_me: failed program was:" >&5
 
10945
sed 's/^/| /' conftest.$ac_ext >&5
 
10946
 
 
10947
ac_lo= ac_hi=
 
10948
fi
 
10949
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
10950
fi
 
10951
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
10952
# Binary search between lo and hi bounds.
 
10953
while test "x$ac_lo" != "x$ac_hi"; do
 
10954
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
 
10955
  cat >conftest.$ac_ext <<_ACEOF
 
10956
/* confdefs.h.  */
 
10957
_ACEOF
 
10958
cat confdefs.h >>conftest.$ac_ext
 
10959
cat >>conftest.$ac_ext <<_ACEOF
 
10960
/* end confdefs.h.  */
 
10961
 
 
10962
                                #include <stdio.h>
 
10963
                                #include "atomic_ops.h"
 
10964
 
 
10965
 
 
10966
int
 
10967
main ()
 
10968
{
 
10969
static int test_array [1 - 2 * !(((long) (sizeof (AO_t))) <= $ac_mid)];
 
10970
test_array [0] = 0
 
10971
 
 
10972
  ;
 
10973
  return 0;
 
10974
}
 
10975
_ACEOF
 
10976
rm -f conftest.$ac_objext
 
10977
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
10978
  (eval $ac_compile) 2>conftest.er1
 
10979
  ac_status=$?
 
10980
  grep -v '^ *+' conftest.er1 >conftest.err
 
10981
  rm -f conftest.er1
 
10982
  cat conftest.err >&5
 
10983
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10984
  (exit $ac_status); } &&
 
10985
         { ac_try='test -z "$ac_c_werror_flag"
 
10986
                         || test ! -s conftest.err'
 
10987
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10988
  (eval $ac_try) 2>&5
 
10989
  ac_status=$?
 
10990
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10991
  (exit $ac_status); }; } &&
 
10992
         { ac_try='test -s conftest.$ac_objext'
 
10993
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
10994
  (eval $ac_try) 2>&5
 
10995
  ac_status=$?
 
10996
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
10997
  (exit $ac_status); }; }; then
 
10998
  ac_hi=$ac_mid
 
10999
else
 
11000
  echo "$as_me: failed program was:" >&5
 
11001
sed 's/^/| /' conftest.$ac_ext >&5
 
11002
 
 
11003
ac_lo=`expr '(' $ac_mid ')' + 1`
 
11004
fi
 
11005
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
11006
done
 
11007
case $ac_lo in
 
11008
?*) ac_cv_sizeof_AO_t=$ac_lo;;
 
11009
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (AO_t), 77
 
11010
See \`config.log' for more details." >&5
 
11011
echo "$as_me: error: cannot compute sizeof (AO_t), 77
 
11012
See \`config.log' for more details." >&2;}
 
11013
   { (exit 1); exit 1; }; } ;;
 
11014
esac
 
11015
else
 
11016
  if test "$cross_compiling" = yes; then
 
11017
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
 
11018
See \`config.log' for more details." >&5
 
11019
echo "$as_me: error: cannot run test program while cross compiling
 
11020
See \`config.log' for more details." >&2;}
 
11021
   { (exit 1); exit 1; }; }
 
11022
else
 
11023
  cat >conftest.$ac_ext <<_ACEOF
 
11024
/* confdefs.h.  */
 
11025
_ACEOF
 
11026
cat confdefs.h >>conftest.$ac_ext
 
11027
cat >>conftest.$ac_ext <<_ACEOF
 
11028
/* end confdefs.h.  */
 
11029
 
 
11030
                                #include <stdio.h>
 
11031
                                #include "atomic_ops.h"
 
11032
 
 
11033
 
 
11034
long longval () { return (long) (sizeof (AO_t)); }
 
11035
unsigned long ulongval () { return (long) (sizeof (AO_t)); }
 
11036
#include <stdio.h>
 
11037
#include <stdlib.h>
 
11038
int
 
11039
main ()
 
11040
{
 
11041
 
 
11042
  FILE *f = fopen ("conftest.val", "w");
 
11043
  if (! f)
 
11044
    exit (1);
 
11045
  if (((long) (sizeof (AO_t))) < 0)
 
11046
    {
 
11047
      long i = longval ();
 
11048
      if (i != ((long) (sizeof (AO_t))))
 
11049
        exit (1);
 
11050
      fprintf (f, "%ld\n", i);
 
11051
    }
 
11052
  else
 
11053
    {
 
11054
      unsigned long i = ulongval ();
 
11055
      if (i != ((long) (sizeof (AO_t))))
 
11056
        exit (1);
 
11057
      fprintf (f, "%lu\n", i);
 
11058
    }
 
11059
  exit (ferror (f) || fclose (f) != 0);
 
11060
 
 
11061
  ;
 
11062
  return 0;
 
11063
}
 
11064
_ACEOF
 
11065
rm -f conftest$ac_exeext
 
11066
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
11067
  (eval $ac_link) 2>&5
 
11068
  ac_status=$?
 
11069
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11070
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
11071
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11072
  (eval $ac_try) 2>&5
 
11073
  ac_status=$?
 
11074
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11075
  (exit $ac_status); }; }; then
 
11076
  ac_cv_sizeof_AO_t=`cat conftest.val`
 
11077
else
 
11078
  echo "$as_me: program exited with status $ac_status" >&5
 
11079
echo "$as_me: failed program was:" >&5
 
11080
sed 's/^/| /' conftest.$ac_ext >&5
 
11081
 
 
11082
( exit $ac_status )
 
11083
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (AO_t), 77
 
11084
See \`config.log' for more details." >&5
 
11085
echo "$as_me: error: cannot compute sizeof (AO_t), 77
 
11086
See \`config.log' for more details." >&2;}
 
11087
   { (exit 1); exit 1; }; }
 
11088
fi
 
11089
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
11090
fi
 
11091
fi
 
11092
rm -f conftest.val
 
11093
else
 
11094
  ac_cv_sizeof_AO_t=0
 
11095
fi
 
11096
fi
 
11097
echo "$as_me:$LINENO: result: $ac_cv_sizeof_AO_t" >&5
 
11098
echo "${ECHO_T}$ac_cv_sizeof_AO_t" >&6
 
11099
cat >>confdefs.h <<_ACEOF
 
11100
#define SIZEOF_AO_T $ac_cv_sizeof_AO_t
 
11101
_ACEOF
 
11102
 
 
11103
 
 
11104
 
 
11105
cat >>confdefs.h <<_ACEOF
 
11106
#define ETHR_SIZEOF_AO_T $ac_cv_sizeof_AO_t
 
11107
_ACEOF
 
11108
 
 
11109
 
 
11110
 
 
11111
cat >>confdefs.h <<\_ACEOF
 
11112
#define ETHR_HAVE_LIBATOMIC_OPS 1
 
11113
_ACEOF
 
11114
 
 
11115
            if test "x$with_libatomic_ops" != "xno" && test "x$with_libatomic_ops" != "x"; then
 
11116
 
 
11117
cat >>confdefs.h <<\_ACEOF
 
11118
#define ETHR_PREFER_LIBATOMIC_OPS_NATIVE_IMPLS 1
 
11119
_ACEOF
 
11120
 
 
11121
            fi
 
11122
            ETHR_DEFS="$ETHR_DEFS $libatomic_ops_include"
 
11123
        elif test "x$with_libatomic_ops" != "xno" && test "x$with_libatomic_ops" != "x"; then
 
11124
            { { echo "$as_me:$LINENO: error: No usable libatomic_ops implementation found" >&5
 
11125
echo "$as_me: error: No usable libatomic_ops implementation found" >&2;}
 
11126
   { (exit 1); exit 1; }; }
 
11127
        fi
 
11128
 
7866
11129
                LIBS=$saved_libs
7867
11130
                CPPFLAGS=$saved_cppflags
7868
11131
 
7869
 
    fi
7870
 
fi
 
11132
        ;;
 
11133
    *)
 
11134
        ;;
 
11135
esac
7871
11136
 
7872
11137
echo "$as_me:$LINENO: checking whether default stack size should be modified" >&5
7873
11138
echo $ECHO_N "checking whether default stack size should be modified... $ECHO_C" >&6
7886
11151
 
7887
11152
if test "x$ETHR_THR_LIB_BASE" != "x"; then
7888
11153
        ETHR_DEFS="-DUSE_THREADS $ETHR_DEFS"
7889
 
        ETHR_LIBS="-l$ethr_lib_name $ETHR_X_LIBS"
 
11154
        ETHR_LIBS="-l$ethr_lib_name -lerts_internal_r $ETHR_X_LIBS"
7890
11155
        ETHR_LIB_NAME=$ethr_lib_name
7891
11156
fi
7892
11157
 
8310
11575
_ACEOF
8311
11576
 
8312
11577
 
8313
 
if test "X$disable_native_ethr_impls" = "Xyes"; then
 
11578
echo "$as_me:$LINENO: checking for int" >&5
 
11579
echo $ECHO_N "checking for int... $ECHO_C" >&6
 
11580
if test "${ac_cv_type_int+set}" = set; then
 
11581
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
11582
else
 
11583
  cat >conftest.$ac_ext <<_ACEOF
 
11584
/* confdefs.h.  */
 
11585
_ACEOF
 
11586
cat confdefs.h >>conftest.$ac_ext
 
11587
cat >>conftest.$ac_ext <<_ACEOF
 
11588
/* end confdefs.h.  */
 
11589
$ac_includes_default
 
11590
int
 
11591
main ()
 
11592
{
 
11593
if ((int *) 0)
 
11594
  return 0;
 
11595
if (sizeof (int))
 
11596
  return 0;
 
11597
  ;
 
11598
  return 0;
 
11599
}
 
11600
_ACEOF
 
11601
rm -f conftest.$ac_objext
 
11602
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
11603
  (eval $ac_compile) 2>conftest.er1
 
11604
  ac_status=$?
 
11605
  grep -v '^ *+' conftest.er1 >conftest.err
 
11606
  rm -f conftest.er1
 
11607
  cat conftest.err >&5
 
11608
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11609
  (exit $ac_status); } &&
 
11610
         { ac_try='test -z "$ac_c_werror_flag"
 
11611
                         || test ! -s conftest.err'
 
11612
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11613
  (eval $ac_try) 2>&5
 
11614
  ac_status=$?
 
11615
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11616
  (exit $ac_status); }; } &&
 
11617
         { ac_try='test -s conftest.$ac_objext'
 
11618
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11619
  (eval $ac_try) 2>&5
 
11620
  ac_status=$?
 
11621
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11622
  (exit $ac_status); }; }; then
 
11623
  ac_cv_type_int=yes
 
11624
else
 
11625
  echo "$as_me: failed program was:" >&5
 
11626
sed 's/^/| /' conftest.$ac_ext >&5
 
11627
 
 
11628
ac_cv_type_int=no
 
11629
fi
 
11630
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
11631
fi
 
11632
echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
 
11633
echo "${ECHO_T}$ac_cv_type_int" >&6
 
11634
 
 
11635
echo "$as_me:$LINENO: checking size of int" >&5
 
11636
echo $ECHO_N "checking size of int... $ECHO_C" >&6
 
11637
if test "${ac_cv_sizeof_int+set}" = set; then
 
11638
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
11639
else
 
11640
  if test "$ac_cv_type_int" = yes; then
 
11641
  # The cast to unsigned long works around a bug in the HP C Compiler
 
11642
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 
11643
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 
11644
  # This bug is HP SR number 8606223364.
 
11645
  if test "$cross_compiling" = yes; then
 
11646
  # Depending upon the size, compute the lo and hi bounds.
 
11647
cat >conftest.$ac_ext <<_ACEOF
 
11648
/* confdefs.h.  */
 
11649
_ACEOF
 
11650
cat confdefs.h >>conftest.$ac_ext
 
11651
cat >>conftest.$ac_ext <<_ACEOF
 
11652
/* end confdefs.h.  */
 
11653
$ac_includes_default
 
11654
int
 
11655
main ()
 
11656
{
 
11657
static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
 
11658
test_array [0] = 0
 
11659
 
 
11660
  ;
 
11661
  return 0;
 
11662
}
 
11663
_ACEOF
 
11664
rm -f conftest.$ac_objext
 
11665
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
11666
  (eval $ac_compile) 2>conftest.er1
 
11667
  ac_status=$?
 
11668
  grep -v '^ *+' conftest.er1 >conftest.err
 
11669
  rm -f conftest.er1
 
11670
  cat conftest.err >&5
 
11671
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11672
  (exit $ac_status); } &&
 
11673
         { ac_try='test -z "$ac_c_werror_flag"
 
11674
                         || test ! -s conftest.err'
 
11675
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11676
  (eval $ac_try) 2>&5
 
11677
  ac_status=$?
 
11678
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11679
  (exit $ac_status); }; } &&
 
11680
         { ac_try='test -s conftest.$ac_objext'
 
11681
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11682
  (eval $ac_try) 2>&5
 
11683
  ac_status=$?
 
11684
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11685
  (exit $ac_status); }; }; then
 
11686
  ac_lo=0 ac_mid=0
 
11687
  while :; do
 
11688
    cat >conftest.$ac_ext <<_ACEOF
 
11689
/* confdefs.h.  */
 
11690
_ACEOF
 
11691
cat confdefs.h >>conftest.$ac_ext
 
11692
cat >>conftest.$ac_ext <<_ACEOF
 
11693
/* end confdefs.h.  */
 
11694
$ac_includes_default
 
11695
int
 
11696
main ()
 
11697
{
 
11698
static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
 
11699
test_array [0] = 0
 
11700
 
 
11701
  ;
 
11702
  return 0;
 
11703
}
 
11704
_ACEOF
 
11705
rm -f conftest.$ac_objext
 
11706
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
11707
  (eval $ac_compile) 2>conftest.er1
 
11708
  ac_status=$?
 
11709
  grep -v '^ *+' conftest.er1 >conftest.err
 
11710
  rm -f conftest.er1
 
11711
  cat conftest.err >&5
 
11712
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11713
  (exit $ac_status); } &&
 
11714
         { ac_try='test -z "$ac_c_werror_flag"
 
11715
                         || test ! -s conftest.err'
 
11716
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11717
  (eval $ac_try) 2>&5
 
11718
  ac_status=$?
 
11719
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11720
  (exit $ac_status); }; } &&
 
11721
         { ac_try='test -s conftest.$ac_objext'
 
11722
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11723
  (eval $ac_try) 2>&5
 
11724
  ac_status=$?
 
11725
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11726
  (exit $ac_status); }; }; then
 
11727
  ac_hi=$ac_mid; break
 
11728
else
 
11729
  echo "$as_me: failed program was:" >&5
 
11730
sed 's/^/| /' conftest.$ac_ext >&5
 
11731
 
 
11732
ac_lo=`expr $ac_mid + 1`
 
11733
                    if test $ac_lo -le $ac_mid; then
 
11734
                      ac_lo= ac_hi=
 
11735
                      break
 
11736
                    fi
 
11737
                    ac_mid=`expr 2 '*' $ac_mid + 1`
 
11738
fi
 
11739
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
11740
  done
 
11741
else
 
11742
  echo "$as_me: failed program was:" >&5
 
11743
sed 's/^/| /' conftest.$ac_ext >&5
 
11744
 
 
11745
cat >conftest.$ac_ext <<_ACEOF
 
11746
/* confdefs.h.  */
 
11747
_ACEOF
 
11748
cat confdefs.h >>conftest.$ac_ext
 
11749
cat >>conftest.$ac_ext <<_ACEOF
 
11750
/* end confdefs.h.  */
 
11751
$ac_includes_default
 
11752
int
 
11753
main ()
 
11754
{
 
11755
static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
 
11756
test_array [0] = 0
 
11757
 
 
11758
  ;
 
11759
  return 0;
 
11760
}
 
11761
_ACEOF
 
11762
rm -f conftest.$ac_objext
 
11763
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
11764
  (eval $ac_compile) 2>conftest.er1
 
11765
  ac_status=$?
 
11766
  grep -v '^ *+' conftest.er1 >conftest.err
 
11767
  rm -f conftest.er1
 
11768
  cat conftest.err >&5
 
11769
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11770
  (exit $ac_status); } &&
 
11771
         { ac_try='test -z "$ac_c_werror_flag"
 
11772
                         || test ! -s conftest.err'
 
11773
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11774
  (eval $ac_try) 2>&5
 
11775
  ac_status=$?
 
11776
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11777
  (exit $ac_status); }; } &&
 
11778
         { ac_try='test -s conftest.$ac_objext'
 
11779
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11780
  (eval $ac_try) 2>&5
 
11781
  ac_status=$?
 
11782
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11783
  (exit $ac_status); }; }; then
 
11784
  ac_hi=-1 ac_mid=-1
 
11785
  while :; do
 
11786
    cat >conftest.$ac_ext <<_ACEOF
 
11787
/* confdefs.h.  */
 
11788
_ACEOF
 
11789
cat confdefs.h >>conftest.$ac_ext
 
11790
cat >>conftest.$ac_ext <<_ACEOF
 
11791
/* end confdefs.h.  */
 
11792
$ac_includes_default
 
11793
int
 
11794
main ()
 
11795
{
 
11796
static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
 
11797
test_array [0] = 0
 
11798
 
 
11799
  ;
 
11800
  return 0;
 
11801
}
 
11802
_ACEOF
 
11803
rm -f conftest.$ac_objext
 
11804
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
11805
  (eval $ac_compile) 2>conftest.er1
 
11806
  ac_status=$?
 
11807
  grep -v '^ *+' conftest.er1 >conftest.err
 
11808
  rm -f conftest.er1
 
11809
  cat conftest.err >&5
 
11810
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11811
  (exit $ac_status); } &&
 
11812
         { ac_try='test -z "$ac_c_werror_flag"
 
11813
                         || test ! -s conftest.err'
 
11814
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11815
  (eval $ac_try) 2>&5
 
11816
  ac_status=$?
 
11817
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11818
  (exit $ac_status); }; } &&
 
11819
         { ac_try='test -s conftest.$ac_objext'
 
11820
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11821
  (eval $ac_try) 2>&5
 
11822
  ac_status=$?
 
11823
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11824
  (exit $ac_status); }; }; then
 
11825
  ac_lo=$ac_mid; break
 
11826
else
 
11827
  echo "$as_me: failed program was:" >&5
 
11828
sed 's/^/| /' conftest.$ac_ext >&5
 
11829
 
 
11830
ac_hi=`expr '(' $ac_mid ')' - 1`
 
11831
                       if test $ac_mid -le $ac_hi; then
 
11832
                         ac_lo= ac_hi=
 
11833
                         break
 
11834
                       fi
 
11835
                       ac_mid=`expr 2 '*' $ac_mid`
 
11836
fi
 
11837
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
11838
  done
 
11839
else
 
11840
  echo "$as_me: failed program was:" >&5
 
11841
sed 's/^/| /' conftest.$ac_ext >&5
 
11842
 
 
11843
ac_lo= ac_hi=
 
11844
fi
 
11845
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
11846
fi
 
11847
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
11848
# Binary search between lo and hi bounds.
 
11849
while test "x$ac_lo" != "x$ac_hi"; do
 
11850
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
 
11851
  cat >conftest.$ac_ext <<_ACEOF
 
11852
/* confdefs.h.  */
 
11853
_ACEOF
 
11854
cat confdefs.h >>conftest.$ac_ext
 
11855
cat >>conftest.$ac_ext <<_ACEOF
 
11856
/* end confdefs.h.  */
 
11857
$ac_includes_default
 
11858
int
 
11859
main ()
 
11860
{
 
11861
static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
 
11862
test_array [0] = 0
 
11863
 
 
11864
  ;
 
11865
  return 0;
 
11866
}
 
11867
_ACEOF
 
11868
rm -f conftest.$ac_objext
 
11869
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
11870
  (eval $ac_compile) 2>conftest.er1
 
11871
  ac_status=$?
 
11872
  grep -v '^ *+' conftest.er1 >conftest.err
 
11873
  rm -f conftest.er1
 
11874
  cat conftest.err >&5
 
11875
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11876
  (exit $ac_status); } &&
 
11877
         { ac_try='test -z "$ac_c_werror_flag"
 
11878
                         || test ! -s conftest.err'
 
11879
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11880
  (eval $ac_try) 2>&5
 
11881
  ac_status=$?
 
11882
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11883
  (exit $ac_status); }; } &&
 
11884
         { ac_try='test -s conftest.$ac_objext'
 
11885
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11886
  (eval $ac_try) 2>&5
 
11887
  ac_status=$?
 
11888
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11889
  (exit $ac_status); }; }; then
 
11890
  ac_hi=$ac_mid
 
11891
else
 
11892
  echo "$as_me: failed program was:" >&5
 
11893
sed 's/^/| /' conftest.$ac_ext >&5
 
11894
 
 
11895
ac_lo=`expr '(' $ac_mid ')' + 1`
 
11896
fi
 
11897
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
11898
done
 
11899
case $ac_lo in
 
11900
?*) ac_cv_sizeof_int=$ac_lo;;
 
11901
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
 
11902
See \`config.log' for more details." >&5
 
11903
echo "$as_me: error: cannot compute sizeof (int), 77
 
11904
See \`config.log' for more details." >&2;}
 
11905
   { (exit 1); exit 1; }; } ;;
 
11906
esac
 
11907
else
 
11908
  if test "$cross_compiling" = yes; then
 
11909
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
 
11910
See \`config.log' for more details." >&5
 
11911
echo "$as_me: error: cannot run test program while cross compiling
 
11912
See \`config.log' for more details." >&2;}
 
11913
   { (exit 1); exit 1; }; }
 
11914
else
 
11915
  cat >conftest.$ac_ext <<_ACEOF
 
11916
/* confdefs.h.  */
 
11917
_ACEOF
 
11918
cat confdefs.h >>conftest.$ac_ext
 
11919
cat >>conftest.$ac_ext <<_ACEOF
 
11920
/* end confdefs.h.  */
 
11921
$ac_includes_default
 
11922
long longval () { return (long) (sizeof (int)); }
 
11923
unsigned long ulongval () { return (long) (sizeof (int)); }
 
11924
#include <stdio.h>
 
11925
#include <stdlib.h>
 
11926
int
 
11927
main ()
 
11928
{
 
11929
 
 
11930
  FILE *f = fopen ("conftest.val", "w");
 
11931
  if (! f)
 
11932
    exit (1);
 
11933
  if (((long) (sizeof (int))) < 0)
 
11934
    {
 
11935
      long i = longval ();
 
11936
      if (i != ((long) (sizeof (int))))
 
11937
        exit (1);
 
11938
      fprintf (f, "%ld\n", i);
 
11939
    }
 
11940
  else
 
11941
    {
 
11942
      unsigned long i = ulongval ();
 
11943
      if (i != ((long) (sizeof (int))))
 
11944
        exit (1);
 
11945
      fprintf (f, "%lu\n", i);
 
11946
    }
 
11947
  exit (ferror (f) || fclose (f) != 0);
 
11948
 
 
11949
  ;
 
11950
  return 0;
 
11951
}
 
11952
_ACEOF
 
11953
rm -f conftest$ac_exeext
 
11954
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
11955
  (eval $ac_link) 2>&5
 
11956
  ac_status=$?
 
11957
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11958
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
11959
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
11960
  (eval $ac_try) 2>&5
 
11961
  ac_status=$?
 
11962
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
11963
  (exit $ac_status); }; }; then
 
11964
  ac_cv_sizeof_int=`cat conftest.val`
 
11965
else
 
11966
  echo "$as_me: program exited with status $ac_status" >&5
 
11967
echo "$as_me: failed program was:" >&5
 
11968
sed 's/^/| /' conftest.$ac_ext >&5
 
11969
 
 
11970
( exit $ac_status )
 
11971
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
 
11972
See \`config.log' for more details." >&5
 
11973
echo "$as_me: error: cannot compute sizeof (int), 77
 
11974
See \`config.log' for more details." >&2;}
 
11975
   { (exit 1); exit 1; }; }
 
11976
fi
 
11977
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
11978
fi
 
11979
fi
 
11980
rm -f conftest.val
 
11981
else
 
11982
  ac_cv_sizeof_int=0
 
11983
fi
 
11984
fi
 
11985
echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
 
11986
echo "${ECHO_T}$ac_cv_sizeof_int" >&6
 
11987
cat >>confdefs.h <<_ACEOF
 
11988
#define SIZEOF_INT $ac_cv_sizeof_int
 
11989
_ACEOF
 
11990
 
 
11991
 
 
11992
 
 
11993
cat >>confdefs.h <<_ACEOF
 
11994
#define ETHR_SIZEOF_INT $ac_cv_sizeof_int
 
11995
_ACEOF
 
11996
 
 
11997
echo "$as_me:$LINENO: checking for long" >&5
 
11998
echo $ECHO_N "checking for long... $ECHO_C" >&6
 
11999
if test "${ac_cv_type_long+set}" = set; then
 
12000
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
12001
else
 
12002
  cat >conftest.$ac_ext <<_ACEOF
 
12003
/* confdefs.h.  */
 
12004
_ACEOF
 
12005
cat confdefs.h >>conftest.$ac_ext
 
12006
cat >>conftest.$ac_ext <<_ACEOF
 
12007
/* end confdefs.h.  */
 
12008
$ac_includes_default
 
12009
int
 
12010
main ()
 
12011
{
 
12012
if ((long *) 0)
 
12013
  return 0;
 
12014
if (sizeof (long))
 
12015
  return 0;
 
12016
  ;
 
12017
  return 0;
 
12018
}
 
12019
_ACEOF
 
12020
rm -f conftest.$ac_objext
 
12021
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
12022
  (eval $ac_compile) 2>conftest.er1
 
12023
  ac_status=$?
 
12024
  grep -v '^ *+' conftest.er1 >conftest.err
 
12025
  rm -f conftest.er1
 
12026
  cat conftest.err >&5
 
12027
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12028
  (exit $ac_status); } &&
 
12029
         { ac_try='test -z "$ac_c_werror_flag"
 
12030
                         || test ! -s conftest.err'
 
12031
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12032
  (eval $ac_try) 2>&5
 
12033
  ac_status=$?
 
12034
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12035
  (exit $ac_status); }; } &&
 
12036
         { ac_try='test -s conftest.$ac_objext'
 
12037
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12038
  (eval $ac_try) 2>&5
 
12039
  ac_status=$?
 
12040
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12041
  (exit $ac_status); }; }; then
 
12042
  ac_cv_type_long=yes
 
12043
else
 
12044
  echo "$as_me: failed program was:" >&5
 
12045
sed 's/^/| /' conftest.$ac_ext >&5
 
12046
 
 
12047
ac_cv_type_long=no
 
12048
fi
 
12049
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
12050
fi
 
12051
echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
 
12052
echo "${ECHO_T}$ac_cv_type_long" >&6
 
12053
 
 
12054
echo "$as_me:$LINENO: checking size of long" >&5
 
12055
echo $ECHO_N "checking size of long... $ECHO_C" >&6
 
12056
if test "${ac_cv_sizeof_long+set}" = set; then
 
12057
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
12058
else
 
12059
  if test "$ac_cv_type_long" = yes; then
 
12060
  # The cast to unsigned long works around a bug in the HP C Compiler
 
12061
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 
12062
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 
12063
  # This bug is HP SR number 8606223364.
 
12064
  if test "$cross_compiling" = yes; then
 
12065
  # Depending upon the size, compute the lo and hi bounds.
 
12066
cat >conftest.$ac_ext <<_ACEOF
 
12067
/* confdefs.h.  */
 
12068
_ACEOF
 
12069
cat confdefs.h >>conftest.$ac_ext
 
12070
cat >>conftest.$ac_ext <<_ACEOF
 
12071
/* end confdefs.h.  */
 
12072
$ac_includes_default
 
12073
int
 
12074
main ()
 
12075
{
 
12076
static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
 
12077
test_array [0] = 0
 
12078
 
 
12079
  ;
 
12080
  return 0;
 
12081
}
 
12082
_ACEOF
 
12083
rm -f conftest.$ac_objext
 
12084
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
12085
  (eval $ac_compile) 2>conftest.er1
 
12086
  ac_status=$?
 
12087
  grep -v '^ *+' conftest.er1 >conftest.err
 
12088
  rm -f conftest.er1
 
12089
  cat conftest.err >&5
 
12090
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12091
  (exit $ac_status); } &&
 
12092
         { ac_try='test -z "$ac_c_werror_flag"
 
12093
                         || test ! -s conftest.err'
 
12094
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12095
  (eval $ac_try) 2>&5
 
12096
  ac_status=$?
 
12097
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12098
  (exit $ac_status); }; } &&
 
12099
         { ac_try='test -s conftest.$ac_objext'
 
12100
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12101
  (eval $ac_try) 2>&5
 
12102
  ac_status=$?
 
12103
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12104
  (exit $ac_status); }; }; then
 
12105
  ac_lo=0 ac_mid=0
 
12106
  while :; do
 
12107
    cat >conftest.$ac_ext <<_ACEOF
 
12108
/* confdefs.h.  */
 
12109
_ACEOF
 
12110
cat confdefs.h >>conftest.$ac_ext
 
12111
cat >>conftest.$ac_ext <<_ACEOF
 
12112
/* end confdefs.h.  */
 
12113
$ac_includes_default
 
12114
int
 
12115
main ()
 
12116
{
 
12117
static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
 
12118
test_array [0] = 0
 
12119
 
 
12120
  ;
 
12121
  return 0;
 
12122
}
 
12123
_ACEOF
 
12124
rm -f conftest.$ac_objext
 
12125
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
12126
  (eval $ac_compile) 2>conftest.er1
 
12127
  ac_status=$?
 
12128
  grep -v '^ *+' conftest.er1 >conftest.err
 
12129
  rm -f conftest.er1
 
12130
  cat conftest.err >&5
 
12131
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12132
  (exit $ac_status); } &&
 
12133
         { ac_try='test -z "$ac_c_werror_flag"
 
12134
                         || test ! -s conftest.err'
 
12135
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12136
  (eval $ac_try) 2>&5
 
12137
  ac_status=$?
 
12138
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12139
  (exit $ac_status); }; } &&
 
12140
         { ac_try='test -s conftest.$ac_objext'
 
12141
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12142
  (eval $ac_try) 2>&5
 
12143
  ac_status=$?
 
12144
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12145
  (exit $ac_status); }; }; then
 
12146
  ac_hi=$ac_mid; break
 
12147
else
 
12148
  echo "$as_me: failed program was:" >&5
 
12149
sed 's/^/| /' conftest.$ac_ext >&5
 
12150
 
 
12151
ac_lo=`expr $ac_mid + 1`
 
12152
                    if test $ac_lo -le $ac_mid; then
 
12153
                      ac_lo= ac_hi=
 
12154
                      break
 
12155
                    fi
 
12156
                    ac_mid=`expr 2 '*' $ac_mid + 1`
 
12157
fi
 
12158
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
12159
  done
 
12160
else
 
12161
  echo "$as_me: failed program was:" >&5
 
12162
sed 's/^/| /' conftest.$ac_ext >&5
 
12163
 
 
12164
cat >conftest.$ac_ext <<_ACEOF
 
12165
/* confdefs.h.  */
 
12166
_ACEOF
 
12167
cat confdefs.h >>conftest.$ac_ext
 
12168
cat >>conftest.$ac_ext <<_ACEOF
 
12169
/* end confdefs.h.  */
 
12170
$ac_includes_default
 
12171
int
 
12172
main ()
 
12173
{
 
12174
static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
 
12175
test_array [0] = 0
 
12176
 
 
12177
  ;
 
12178
  return 0;
 
12179
}
 
12180
_ACEOF
 
12181
rm -f conftest.$ac_objext
 
12182
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
12183
  (eval $ac_compile) 2>conftest.er1
 
12184
  ac_status=$?
 
12185
  grep -v '^ *+' conftest.er1 >conftest.err
 
12186
  rm -f conftest.er1
 
12187
  cat conftest.err >&5
 
12188
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12189
  (exit $ac_status); } &&
 
12190
         { ac_try='test -z "$ac_c_werror_flag"
 
12191
                         || test ! -s conftest.err'
 
12192
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12193
  (eval $ac_try) 2>&5
 
12194
  ac_status=$?
 
12195
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12196
  (exit $ac_status); }; } &&
 
12197
         { ac_try='test -s conftest.$ac_objext'
 
12198
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12199
  (eval $ac_try) 2>&5
 
12200
  ac_status=$?
 
12201
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12202
  (exit $ac_status); }; }; then
 
12203
  ac_hi=-1 ac_mid=-1
 
12204
  while :; do
 
12205
    cat >conftest.$ac_ext <<_ACEOF
 
12206
/* confdefs.h.  */
 
12207
_ACEOF
 
12208
cat confdefs.h >>conftest.$ac_ext
 
12209
cat >>conftest.$ac_ext <<_ACEOF
 
12210
/* end confdefs.h.  */
 
12211
$ac_includes_default
 
12212
int
 
12213
main ()
 
12214
{
 
12215
static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
 
12216
test_array [0] = 0
 
12217
 
 
12218
  ;
 
12219
  return 0;
 
12220
}
 
12221
_ACEOF
 
12222
rm -f conftest.$ac_objext
 
12223
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
12224
  (eval $ac_compile) 2>conftest.er1
 
12225
  ac_status=$?
 
12226
  grep -v '^ *+' conftest.er1 >conftest.err
 
12227
  rm -f conftest.er1
 
12228
  cat conftest.err >&5
 
12229
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12230
  (exit $ac_status); } &&
 
12231
         { ac_try='test -z "$ac_c_werror_flag"
 
12232
                         || test ! -s conftest.err'
 
12233
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12234
  (eval $ac_try) 2>&5
 
12235
  ac_status=$?
 
12236
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12237
  (exit $ac_status); }; } &&
 
12238
         { ac_try='test -s conftest.$ac_objext'
 
12239
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12240
  (eval $ac_try) 2>&5
 
12241
  ac_status=$?
 
12242
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12243
  (exit $ac_status); }; }; then
 
12244
  ac_lo=$ac_mid; break
 
12245
else
 
12246
  echo "$as_me: failed program was:" >&5
 
12247
sed 's/^/| /' conftest.$ac_ext >&5
 
12248
 
 
12249
ac_hi=`expr '(' $ac_mid ')' - 1`
 
12250
                       if test $ac_mid -le $ac_hi; then
 
12251
                         ac_lo= ac_hi=
 
12252
                         break
 
12253
                       fi
 
12254
                       ac_mid=`expr 2 '*' $ac_mid`
 
12255
fi
 
12256
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
12257
  done
 
12258
else
 
12259
  echo "$as_me: failed program was:" >&5
 
12260
sed 's/^/| /' conftest.$ac_ext >&5
 
12261
 
 
12262
ac_lo= ac_hi=
 
12263
fi
 
12264
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
12265
fi
 
12266
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
12267
# Binary search between lo and hi bounds.
 
12268
while test "x$ac_lo" != "x$ac_hi"; do
 
12269
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
 
12270
  cat >conftest.$ac_ext <<_ACEOF
 
12271
/* confdefs.h.  */
 
12272
_ACEOF
 
12273
cat confdefs.h >>conftest.$ac_ext
 
12274
cat >>conftest.$ac_ext <<_ACEOF
 
12275
/* end confdefs.h.  */
 
12276
$ac_includes_default
 
12277
int
 
12278
main ()
 
12279
{
 
12280
static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
 
12281
test_array [0] = 0
 
12282
 
 
12283
  ;
 
12284
  return 0;
 
12285
}
 
12286
_ACEOF
 
12287
rm -f conftest.$ac_objext
 
12288
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
12289
  (eval $ac_compile) 2>conftest.er1
 
12290
  ac_status=$?
 
12291
  grep -v '^ *+' conftest.er1 >conftest.err
 
12292
  rm -f conftest.er1
 
12293
  cat conftest.err >&5
 
12294
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12295
  (exit $ac_status); } &&
 
12296
         { ac_try='test -z "$ac_c_werror_flag"
 
12297
                         || test ! -s conftest.err'
 
12298
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12299
  (eval $ac_try) 2>&5
 
12300
  ac_status=$?
 
12301
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12302
  (exit $ac_status); }; } &&
 
12303
         { ac_try='test -s conftest.$ac_objext'
 
12304
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12305
  (eval $ac_try) 2>&5
 
12306
  ac_status=$?
 
12307
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12308
  (exit $ac_status); }; }; then
 
12309
  ac_hi=$ac_mid
 
12310
else
 
12311
  echo "$as_me: failed program was:" >&5
 
12312
sed 's/^/| /' conftest.$ac_ext >&5
 
12313
 
 
12314
ac_lo=`expr '(' $ac_mid ')' + 1`
 
12315
fi
 
12316
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
12317
done
 
12318
case $ac_lo in
 
12319
?*) ac_cv_sizeof_long=$ac_lo;;
 
12320
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
 
12321
See \`config.log' for more details." >&5
 
12322
echo "$as_me: error: cannot compute sizeof (long), 77
 
12323
See \`config.log' for more details." >&2;}
 
12324
   { (exit 1); exit 1; }; } ;;
 
12325
esac
 
12326
else
 
12327
  if test "$cross_compiling" = yes; then
 
12328
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
 
12329
See \`config.log' for more details." >&5
 
12330
echo "$as_me: error: cannot run test program while cross compiling
 
12331
See \`config.log' for more details." >&2;}
 
12332
   { (exit 1); exit 1; }; }
 
12333
else
 
12334
  cat >conftest.$ac_ext <<_ACEOF
 
12335
/* confdefs.h.  */
 
12336
_ACEOF
 
12337
cat confdefs.h >>conftest.$ac_ext
 
12338
cat >>conftest.$ac_ext <<_ACEOF
 
12339
/* end confdefs.h.  */
 
12340
$ac_includes_default
 
12341
long longval () { return (long) (sizeof (long)); }
 
12342
unsigned long ulongval () { return (long) (sizeof (long)); }
 
12343
#include <stdio.h>
 
12344
#include <stdlib.h>
 
12345
int
 
12346
main ()
 
12347
{
 
12348
 
 
12349
  FILE *f = fopen ("conftest.val", "w");
 
12350
  if (! f)
 
12351
    exit (1);
 
12352
  if (((long) (sizeof (long))) < 0)
 
12353
    {
 
12354
      long i = longval ();
 
12355
      if (i != ((long) (sizeof (long))))
 
12356
        exit (1);
 
12357
      fprintf (f, "%ld\n", i);
 
12358
    }
 
12359
  else
 
12360
    {
 
12361
      unsigned long i = ulongval ();
 
12362
      if (i != ((long) (sizeof (long))))
 
12363
        exit (1);
 
12364
      fprintf (f, "%lu\n", i);
 
12365
    }
 
12366
  exit (ferror (f) || fclose (f) != 0);
 
12367
 
 
12368
  ;
 
12369
  return 0;
 
12370
}
 
12371
_ACEOF
 
12372
rm -f conftest$ac_exeext
 
12373
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
12374
  (eval $ac_link) 2>&5
 
12375
  ac_status=$?
 
12376
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12377
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
12378
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12379
  (eval $ac_try) 2>&5
 
12380
  ac_status=$?
 
12381
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12382
  (exit $ac_status); }; }; then
 
12383
  ac_cv_sizeof_long=`cat conftest.val`
 
12384
else
 
12385
  echo "$as_me: program exited with status $ac_status" >&5
 
12386
echo "$as_me: failed program was:" >&5
 
12387
sed 's/^/| /' conftest.$ac_ext >&5
 
12388
 
 
12389
( exit $ac_status )
 
12390
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
 
12391
See \`config.log' for more details." >&5
 
12392
echo "$as_me: error: cannot compute sizeof (long), 77
 
12393
See \`config.log' for more details." >&2;}
 
12394
   { (exit 1); exit 1; }; }
 
12395
fi
 
12396
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
12397
fi
 
12398
fi
 
12399
rm -f conftest.val
 
12400
else
 
12401
  ac_cv_sizeof_long=0
 
12402
fi
 
12403
fi
 
12404
echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
 
12405
echo "${ECHO_T}$ac_cv_sizeof_long" >&6
 
12406
cat >>confdefs.h <<_ACEOF
 
12407
#define SIZEOF_LONG $ac_cv_sizeof_long
 
12408
_ACEOF
 
12409
 
 
12410
 
 
12411
 
 
12412
cat >>confdefs.h <<_ACEOF
 
12413
#define ETHR_SIZEOF_LONG $ac_cv_sizeof_long
 
12414
_ACEOF
 
12415
 
 
12416
echo "$as_me:$LINENO: checking for long long" >&5
 
12417
echo $ECHO_N "checking for long long... $ECHO_C" >&6
 
12418
if test "${ac_cv_type_long_long+set}" = set; then
 
12419
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
12420
else
 
12421
  cat >conftest.$ac_ext <<_ACEOF
 
12422
/* confdefs.h.  */
 
12423
_ACEOF
 
12424
cat confdefs.h >>conftest.$ac_ext
 
12425
cat >>conftest.$ac_ext <<_ACEOF
 
12426
/* end confdefs.h.  */
 
12427
$ac_includes_default
 
12428
int
 
12429
main ()
 
12430
{
 
12431
if ((long long *) 0)
 
12432
  return 0;
 
12433
if (sizeof (long long))
 
12434
  return 0;
 
12435
  ;
 
12436
  return 0;
 
12437
}
 
12438
_ACEOF
 
12439
rm -f conftest.$ac_objext
 
12440
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
12441
  (eval $ac_compile) 2>conftest.er1
 
12442
  ac_status=$?
 
12443
  grep -v '^ *+' conftest.er1 >conftest.err
 
12444
  rm -f conftest.er1
 
12445
  cat conftest.err >&5
 
12446
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12447
  (exit $ac_status); } &&
 
12448
         { ac_try='test -z "$ac_c_werror_flag"
 
12449
                         || test ! -s conftest.err'
 
12450
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12451
  (eval $ac_try) 2>&5
 
12452
  ac_status=$?
 
12453
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12454
  (exit $ac_status); }; } &&
 
12455
         { ac_try='test -s conftest.$ac_objext'
 
12456
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12457
  (eval $ac_try) 2>&5
 
12458
  ac_status=$?
 
12459
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12460
  (exit $ac_status); }; }; then
 
12461
  ac_cv_type_long_long=yes
 
12462
else
 
12463
  echo "$as_me: failed program was:" >&5
 
12464
sed 's/^/| /' conftest.$ac_ext >&5
 
12465
 
 
12466
ac_cv_type_long_long=no
 
12467
fi
 
12468
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
12469
fi
 
12470
echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
 
12471
echo "${ECHO_T}$ac_cv_type_long_long" >&6
 
12472
 
 
12473
echo "$as_me:$LINENO: checking size of long long" >&5
 
12474
echo $ECHO_N "checking size of long long... $ECHO_C" >&6
 
12475
if test "${ac_cv_sizeof_long_long+set}" = set; then
 
12476
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
12477
else
 
12478
  if test "$ac_cv_type_long_long" = yes; then
 
12479
  # The cast to unsigned long works around a bug in the HP C Compiler
 
12480
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 
12481
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 
12482
  # This bug is HP SR number 8606223364.
 
12483
  if test "$cross_compiling" = yes; then
 
12484
  # Depending upon the size, compute the lo and hi bounds.
 
12485
cat >conftest.$ac_ext <<_ACEOF
 
12486
/* confdefs.h.  */
 
12487
_ACEOF
 
12488
cat confdefs.h >>conftest.$ac_ext
 
12489
cat >>conftest.$ac_ext <<_ACEOF
 
12490
/* end confdefs.h.  */
 
12491
$ac_includes_default
 
12492
int
 
12493
main ()
 
12494
{
 
12495
static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
 
12496
test_array [0] = 0
 
12497
 
 
12498
  ;
 
12499
  return 0;
 
12500
}
 
12501
_ACEOF
 
12502
rm -f conftest.$ac_objext
 
12503
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
12504
  (eval $ac_compile) 2>conftest.er1
 
12505
  ac_status=$?
 
12506
  grep -v '^ *+' conftest.er1 >conftest.err
 
12507
  rm -f conftest.er1
 
12508
  cat conftest.err >&5
 
12509
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12510
  (exit $ac_status); } &&
 
12511
         { ac_try='test -z "$ac_c_werror_flag"
 
12512
                         || test ! -s conftest.err'
 
12513
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12514
  (eval $ac_try) 2>&5
 
12515
  ac_status=$?
 
12516
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12517
  (exit $ac_status); }; } &&
 
12518
         { ac_try='test -s conftest.$ac_objext'
 
12519
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12520
  (eval $ac_try) 2>&5
 
12521
  ac_status=$?
 
12522
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12523
  (exit $ac_status); }; }; then
 
12524
  ac_lo=0 ac_mid=0
 
12525
  while :; do
 
12526
    cat >conftest.$ac_ext <<_ACEOF
 
12527
/* confdefs.h.  */
 
12528
_ACEOF
 
12529
cat confdefs.h >>conftest.$ac_ext
 
12530
cat >>conftest.$ac_ext <<_ACEOF
 
12531
/* end confdefs.h.  */
 
12532
$ac_includes_default
 
12533
int
 
12534
main ()
 
12535
{
 
12536
static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
 
12537
test_array [0] = 0
 
12538
 
 
12539
  ;
 
12540
  return 0;
 
12541
}
 
12542
_ACEOF
 
12543
rm -f conftest.$ac_objext
 
12544
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
12545
  (eval $ac_compile) 2>conftest.er1
 
12546
  ac_status=$?
 
12547
  grep -v '^ *+' conftest.er1 >conftest.err
 
12548
  rm -f conftest.er1
 
12549
  cat conftest.err >&5
 
12550
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12551
  (exit $ac_status); } &&
 
12552
         { ac_try='test -z "$ac_c_werror_flag"
 
12553
                         || test ! -s conftest.err'
 
12554
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12555
  (eval $ac_try) 2>&5
 
12556
  ac_status=$?
 
12557
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12558
  (exit $ac_status); }; } &&
 
12559
         { ac_try='test -s conftest.$ac_objext'
 
12560
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12561
  (eval $ac_try) 2>&5
 
12562
  ac_status=$?
 
12563
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12564
  (exit $ac_status); }; }; then
 
12565
  ac_hi=$ac_mid; break
 
12566
else
 
12567
  echo "$as_me: failed program was:" >&5
 
12568
sed 's/^/| /' conftest.$ac_ext >&5
 
12569
 
 
12570
ac_lo=`expr $ac_mid + 1`
 
12571
                    if test $ac_lo -le $ac_mid; then
 
12572
                      ac_lo= ac_hi=
 
12573
                      break
 
12574
                    fi
 
12575
                    ac_mid=`expr 2 '*' $ac_mid + 1`
 
12576
fi
 
12577
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
12578
  done
 
12579
else
 
12580
  echo "$as_me: failed program was:" >&5
 
12581
sed 's/^/| /' conftest.$ac_ext >&5
 
12582
 
 
12583
cat >conftest.$ac_ext <<_ACEOF
 
12584
/* confdefs.h.  */
 
12585
_ACEOF
 
12586
cat confdefs.h >>conftest.$ac_ext
 
12587
cat >>conftest.$ac_ext <<_ACEOF
 
12588
/* end confdefs.h.  */
 
12589
$ac_includes_default
 
12590
int
 
12591
main ()
 
12592
{
 
12593
static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
 
12594
test_array [0] = 0
 
12595
 
 
12596
  ;
 
12597
  return 0;
 
12598
}
 
12599
_ACEOF
 
12600
rm -f conftest.$ac_objext
 
12601
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
12602
  (eval $ac_compile) 2>conftest.er1
 
12603
  ac_status=$?
 
12604
  grep -v '^ *+' conftest.er1 >conftest.err
 
12605
  rm -f conftest.er1
 
12606
  cat conftest.err >&5
 
12607
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12608
  (exit $ac_status); } &&
 
12609
         { ac_try='test -z "$ac_c_werror_flag"
 
12610
                         || test ! -s conftest.err'
 
12611
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12612
  (eval $ac_try) 2>&5
 
12613
  ac_status=$?
 
12614
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12615
  (exit $ac_status); }; } &&
 
12616
         { ac_try='test -s conftest.$ac_objext'
 
12617
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12618
  (eval $ac_try) 2>&5
 
12619
  ac_status=$?
 
12620
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12621
  (exit $ac_status); }; }; then
 
12622
  ac_hi=-1 ac_mid=-1
 
12623
  while :; do
 
12624
    cat >conftest.$ac_ext <<_ACEOF
 
12625
/* confdefs.h.  */
 
12626
_ACEOF
 
12627
cat confdefs.h >>conftest.$ac_ext
 
12628
cat >>conftest.$ac_ext <<_ACEOF
 
12629
/* end confdefs.h.  */
 
12630
$ac_includes_default
 
12631
int
 
12632
main ()
 
12633
{
 
12634
static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
 
12635
test_array [0] = 0
 
12636
 
 
12637
  ;
 
12638
  return 0;
 
12639
}
 
12640
_ACEOF
 
12641
rm -f conftest.$ac_objext
 
12642
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
12643
  (eval $ac_compile) 2>conftest.er1
 
12644
  ac_status=$?
 
12645
  grep -v '^ *+' conftest.er1 >conftest.err
 
12646
  rm -f conftest.er1
 
12647
  cat conftest.err >&5
 
12648
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12649
  (exit $ac_status); } &&
 
12650
         { ac_try='test -z "$ac_c_werror_flag"
 
12651
                         || test ! -s conftest.err'
 
12652
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12653
  (eval $ac_try) 2>&5
 
12654
  ac_status=$?
 
12655
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12656
  (exit $ac_status); }; } &&
 
12657
         { ac_try='test -s conftest.$ac_objext'
 
12658
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12659
  (eval $ac_try) 2>&5
 
12660
  ac_status=$?
 
12661
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12662
  (exit $ac_status); }; }; then
 
12663
  ac_lo=$ac_mid; break
 
12664
else
 
12665
  echo "$as_me: failed program was:" >&5
 
12666
sed 's/^/| /' conftest.$ac_ext >&5
 
12667
 
 
12668
ac_hi=`expr '(' $ac_mid ')' - 1`
 
12669
                       if test $ac_mid -le $ac_hi; then
 
12670
                         ac_lo= ac_hi=
 
12671
                         break
 
12672
                       fi
 
12673
                       ac_mid=`expr 2 '*' $ac_mid`
 
12674
fi
 
12675
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
12676
  done
 
12677
else
 
12678
  echo "$as_me: failed program was:" >&5
 
12679
sed 's/^/| /' conftest.$ac_ext >&5
 
12680
 
 
12681
ac_lo= ac_hi=
 
12682
fi
 
12683
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
12684
fi
 
12685
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
12686
# Binary search between lo and hi bounds.
 
12687
while test "x$ac_lo" != "x$ac_hi"; do
 
12688
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
 
12689
  cat >conftest.$ac_ext <<_ACEOF
 
12690
/* confdefs.h.  */
 
12691
_ACEOF
 
12692
cat confdefs.h >>conftest.$ac_ext
 
12693
cat >>conftest.$ac_ext <<_ACEOF
 
12694
/* end confdefs.h.  */
 
12695
$ac_includes_default
 
12696
int
 
12697
main ()
 
12698
{
 
12699
static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
 
12700
test_array [0] = 0
 
12701
 
 
12702
  ;
 
12703
  return 0;
 
12704
}
 
12705
_ACEOF
 
12706
rm -f conftest.$ac_objext
 
12707
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
12708
  (eval $ac_compile) 2>conftest.er1
 
12709
  ac_status=$?
 
12710
  grep -v '^ *+' conftest.er1 >conftest.err
 
12711
  rm -f conftest.er1
 
12712
  cat conftest.err >&5
 
12713
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12714
  (exit $ac_status); } &&
 
12715
         { ac_try='test -z "$ac_c_werror_flag"
 
12716
                         || test ! -s conftest.err'
 
12717
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12718
  (eval $ac_try) 2>&5
 
12719
  ac_status=$?
 
12720
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12721
  (exit $ac_status); }; } &&
 
12722
         { ac_try='test -s conftest.$ac_objext'
 
12723
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12724
  (eval $ac_try) 2>&5
 
12725
  ac_status=$?
 
12726
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12727
  (exit $ac_status); }; }; then
 
12728
  ac_hi=$ac_mid
 
12729
else
 
12730
  echo "$as_me: failed program was:" >&5
 
12731
sed 's/^/| /' conftest.$ac_ext >&5
 
12732
 
 
12733
ac_lo=`expr '(' $ac_mid ')' + 1`
 
12734
fi
 
12735
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
12736
done
 
12737
case $ac_lo in
 
12738
?*) ac_cv_sizeof_long_long=$ac_lo;;
 
12739
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
 
12740
See \`config.log' for more details." >&5
 
12741
echo "$as_me: error: cannot compute sizeof (long long), 77
 
12742
See \`config.log' for more details." >&2;}
 
12743
   { (exit 1); exit 1; }; } ;;
 
12744
esac
 
12745
else
 
12746
  if test "$cross_compiling" = yes; then
 
12747
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
 
12748
See \`config.log' for more details." >&5
 
12749
echo "$as_me: error: cannot run test program while cross compiling
 
12750
See \`config.log' for more details." >&2;}
 
12751
   { (exit 1); exit 1; }; }
 
12752
else
 
12753
  cat >conftest.$ac_ext <<_ACEOF
 
12754
/* confdefs.h.  */
 
12755
_ACEOF
 
12756
cat confdefs.h >>conftest.$ac_ext
 
12757
cat >>conftest.$ac_ext <<_ACEOF
 
12758
/* end confdefs.h.  */
 
12759
$ac_includes_default
 
12760
long longval () { return (long) (sizeof (long long)); }
 
12761
unsigned long ulongval () { return (long) (sizeof (long long)); }
 
12762
#include <stdio.h>
 
12763
#include <stdlib.h>
 
12764
int
 
12765
main ()
 
12766
{
 
12767
 
 
12768
  FILE *f = fopen ("conftest.val", "w");
 
12769
  if (! f)
 
12770
    exit (1);
 
12771
  if (((long) (sizeof (long long))) < 0)
 
12772
    {
 
12773
      long i = longval ();
 
12774
      if (i != ((long) (sizeof (long long))))
 
12775
        exit (1);
 
12776
      fprintf (f, "%ld\n", i);
 
12777
    }
 
12778
  else
 
12779
    {
 
12780
      unsigned long i = ulongval ();
 
12781
      if (i != ((long) (sizeof (long long))))
 
12782
        exit (1);
 
12783
      fprintf (f, "%lu\n", i);
 
12784
    }
 
12785
  exit (ferror (f) || fclose (f) != 0);
 
12786
 
 
12787
  ;
 
12788
  return 0;
 
12789
}
 
12790
_ACEOF
 
12791
rm -f conftest$ac_exeext
 
12792
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
12793
  (eval $ac_link) 2>&5
 
12794
  ac_status=$?
 
12795
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12796
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
12797
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12798
  (eval $ac_try) 2>&5
 
12799
  ac_status=$?
 
12800
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12801
  (exit $ac_status); }; }; then
 
12802
  ac_cv_sizeof_long_long=`cat conftest.val`
 
12803
else
 
12804
  echo "$as_me: program exited with status $ac_status" >&5
 
12805
echo "$as_me: failed program was:" >&5
 
12806
sed 's/^/| /' conftest.$ac_ext >&5
 
12807
 
 
12808
( exit $ac_status )
 
12809
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
 
12810
See \`config.log' for more details." >&5
 
12811
echo "$as_me: error: cannot compute sizeof (long long), 77
 
12812
See \`config.log' for more details." >&2;}
 
12813
   { (exit 1); exit 1; }; }
 
12814
fi
 
12815
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
12816
fi
 
12817
fi
 
12818
rm -f conftest.val
 
12819
else
 
12820
  ac_cv_sizeof_long_long=0
 
12821
fi
 
12822
fi
 
12823
echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
 
12824
echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
 
12825
cat >>confdefs.h <<_ACEOF
 
12826
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
 
12827
_ACEOF
 
12828
 
 
12829
 
 
12830
 
 
12831
cat >>confdefs.h <<_ACEOF
 
12832
#define ETHR_SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
 
12833
_ACEOF
 
12834
 
 
12835
echo "$as_me:$LINENO: checking for __int64" >&5
 
12836
echo $ECHO_N "checking for __int64... $ECHO_C" >&6
 
12837
if test "${ac_cv_type___int64+set}" = set; then
 
12838
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
12839
else
 
12840
  cat >conftest.$ac_ext <<_ACEOF
 
12841
/* confdefs.h.  */
 
12842
_ACEOF
 
12843
cat confdefs.h >>conftest.$ac_ext
 
12844
cat >>conftest.$ac_ext <<_ACEOF
 
12845
/* end confdefs.h.  */
 
12846
$ac_includes_default
 
12847
int
 
12848
main ()
 
12849
{
 
12850
if ((__int64 *) 0)
 
12851
  return 0;
 
12852
if (sizeof (__int64))
 
12853
  return 0;
 
12854
  ;
 
12855
  return 0;
 
12856
}
 
12857
_ACEOF
 
12858
rm -f conftest.$ac_objext
 
12859
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
12860
  (eval $ac_compile) 2>conftest.er1
 
12861
  ac_status=$?
 
12862
  grep -v '^ *+' conftest.er1 >conftest.err
 
12863
  rm -f conftest.er1
 
12864
  cat conftest.err >&5
 
12865
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12866
  (exit $ac_status); } &&
 
12867
         { ac_try='test -z "$ac_c_werror_flag"
 
12868
                         || test ! -s conftest.err'
 
12869
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12870
  (eval $ac_try) 2>&5
 
12871
  ac_status=$?
 
12872
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12873
  (exit $ac_status); }; } &&
 
12874
         { ac_try='test -s conftest.$ac_objext'
 
12875
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12876
  (eval $ac_try) 2>&5
 
12877
  ac_status=$?
 
12878
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12879
  (exit $ac_status); }; }; then
 
12880
  ac_cv_type___int64=yes
 
12881
else
 
12882
  echo "$as_me: failed program was:" >&5
 
12883
sed 's/^/| /' conftest.$ac_ext >&5
 
12884
 
 
12885
ac_cv_type___int64=no
 
12886
fi
 
12887
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
12888
fi
 
12889
echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5
 
12890
echo "${ECHO_T}$ac_cv_type___int64" >&6
 
12891
 
 
12892
echo "$as_me:$LINENO: checking size of __int64" >&5
 
12893
echo $ECHO_N "checking size of __int64... $ECHO_C" >&6
 
12894
if test "${ac_cv_sizeof___int64+set}" = set; then
 
12895
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
12896
else
 
12897
  if test "$ac_cv_type___int64" = yes; then
 
12898
  # The cast to unsigned long works around a bug in the HP C Compiler
 
12899
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 
12900
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 
12901
  # This bug is HP SR number 8606223364.
 
12902
  if test "$cross_compiling" = yes; then
 
12903
  # Depending upon the size, compute the lo and hi bounds.
 
12904
cat >conftest.$ac_ext <<_ACEOF
 
12905
/* confdefs.h.  */
 
12906
_ACEOF
 
12907
cat confdefs.h >>conftest.$ac_ext
 
12908
cat >>conftest.$ac_ext <<_ACEOF
 
12909
/* end confdefs.h.  */
 
12910
$ac_includes_default
 
12911
int
 
12912
main ()
 
12913
{
 
12914
static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)];
 
12915
test_array [0] = 0
 
12916
 
 
12917
  ;
 
12918
  return 0;
 
12919
}
 
12920
_ACEOF
 
12921
rm -f conftest.$ac_objext
 
12922
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
12923
  (eval $ac_compile) 2>conftest.er1
 
12924
  ac_status=$?
 
12925
  grep -v '^ *+' conftest.er1 >conftest.err
 
12926
  rm -f conftest.er1
 
12927
  cat conftest.err >&5
 
12928
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12929
  (exit $ac_status); } &&
 
12930
         { ac_try='test -z "$ac_c_werror_flag"
 
12931
                         || test ! -s conftest.err'
 
12932
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12933
  (eval $ac_try) 2>&5
 
12934
  ac_status=$?
 
12935
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12936
  (exit $ac_status); }; } &&
 
12937
         { ac_try='test -s conftest.$ac_objext'
 
12938
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12939
  (eval $ac_try) 2>&5
 
12940
  ac_status=$?
 
12941
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12942
  (exit $ac_status); }; }; then
 
12943
  ac_lo=0 ac_mid=0
 
12944
  while :; do
 
12945
    cat >conftest.$ac_ext <<_ACEOF
 
12946
/* confdefs.h.  */
 
12947
_ACEOF
 
12948
cat confdefs.h >>conftest.$ac_ext
 
12949
cat >>conftest.$ac_ext <<_ACEOF
 
12950
/* end confdefs.h.  */
 
12951
$ac_includes_default
 
12952
int
 
12953
main ()
 
12954
{
 
12955
static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
 
12956
test_array [0] = 0
 
12957
 
 
12958
  ;
 
12959
  return 0;
 
12960
}
 
12961
_ACEOF
 
12962
rm -f conftest.$ac_objext
 
12963
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
12964
  (eval $ac_compile) 2>conftest.er1
 
12965
  ac_status=$?
 
12966
  grep -v '^ *+' conftest.er1 >conftest.err
 
12967
  rm -f conftest.er1
 
12968
  cat conftest.err >&5
 
12969
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12970
  (exit $ac_status); } &&
 
12971
         { ac_try='test -z "$ac_c_werror_flag"
 
12972
                         || test ! -s conftest.err'
 
12973
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12974
  (eval $ac_try) 2>&5
 
12975
  ac_status=$?
 
12976
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12977
  (exit $ac_status); }; } &&
 
12978
         { ac_try='test -s conftest.$ac_objext'
 
12979
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
12980
  (eval $ac_try) 2>&5
 
12981
  ac_status=$?
 
12982
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
12983
  (exit $ac_status); }; }; then
 
12984
  ac_hi=$ac_mid; break
 
12985
else
 
12986
  echo "$as_me: failed program was:" >&5
 
12987
sed 's/^/| /' conftest.$ac_ext >&5
 
12988
 
 
12989
ac_lo=`expr $ac_mid + 1`
 
12990
                    if test $ac_lo -le $ac_mid; then
 
12991
                      ac_lo= ac_hi=
 
12992
                      break
 
12993
                    fi
 
12994
                    ac_mid=`expr 2 '*' $ac_mid + 1`
 
12995
fi
 
12996
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
12997
  done
 
12998
else
 
12999
  echo "$as_me: failed program was:" >&5
 
13000
sed 's/^/| /' conftest.$ac_ext >&5
 
13001
 
 
13002
cat >conftest.$ac_ext <<_ACEOF
 
13003
/* confdefs.h.  */
 
13004
_ACEOF
 
13005
cat confdefs.h >>conftest.$ac_ext
 
13006
cat >>conftest.$ac_ext <<_ACEOF
 
13007
/* end confdefs.h.  */
 
13008
$ac_includes_default
 
13009
int
 
13010
main ()
 
13011
{
 
13012
static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)];
 
13013
test_array [0] = 0
 
13014
 
 
13015
  ;
 
13016
  return 0;
 
13017
}
 
13018
_ACEOF
 
13019
rm -f conftest.$ac_objext
 
13020
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
13021
  (eval $ac_compile) 2>conftest.er1
 
13022
  ac_status=$?
 
13023
  grep -v '^ *+' conftest.er1 >conftest.err
 
13024
  rm -f conftest.er1
 
13025
  cat conftest.err >&5
 
13026
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13027
  (exit $ac_status); } &&
 
13028
         { ac_try='test -z "$ac_c_werror_flag"
 
13029
                         || test ! -s conftest.err'
 
13030
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13031
  (eval $ac_try) 2>&5
 
13032
  ac_status=$?
 
13033
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13034
  (exit $ac_status); }; } &&
 
13035
         { ac_try='test -s conftest.$ac_objext'
 
13036
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13037
  (eval $ac_try) 2>&5
 
13038
  ac_status=$?
 
13039
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13040
  (exit $ac_status); }; }; then
 
13041
  ac_hi=-1 ac_mid=-1
 
13042
  while :; do
 
13043
    cat >conftest.$ac_ext <<_ACEOF
 
13044
/* confdefs.h.  */
 
13045
_ACEOF
 
13046
cat confdefs.h >>conftest.$ac_ext
 
13047
cat >>conftest.$ac_ext <<_ACEOF
 
13048
/* end confdefs.h.  */
 
13049
$ac_includes_default
 
13050
int
 
13051
main ()
 
13052
{
 
13053
static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)];
 
13054
test_array [0] = 0
 
13055
 
 
13056
  ;
 
13057
  return 0;
 
13058
}
 
13059
_ACEOF
 
13060
rm -f conftest.$ac_objext
 
13061
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
13062
  (eval $ac_compile) 2>conftest.er1
 
13063
  ac_status=$?
 
13064
  grep -v '^ *+' conftest.er1 >conftest.err
 
13065
  rm -f conftest.er1
 
13066
  cat conftest.err >&5
 
13067
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13068
  (exit $ac_status); } &&
 
13069
         { ac_try='test -z "$ac_c_werror_flag"
 
13070
                         || test ! -s conftest.err'
 
13071
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13072
  (eval $ac_try) 2>&5
 
13073
  ac_status=$?
 
13074
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13075
  (exit $ac_status); }; } &&
 
13076
         { ac_try='test -s conftest.$ac_objext'
 
13077
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13078
  (eval $ac_try) 2>&5
 
13079
  ac_status=$?
 
13080
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13081
  (exit $ac_status); }; }; then
 
13082
  ac_lo=$ac_mid; break
 
13083
else
 
13084
  echo "$as_me: failed program was:" >&5
 
13085
sed 's/^/| /' conftest.$ac_ext >&5
 
13086
 
 
13087
ac_hi=`expr '(' $ac_mid ')' - 1`
 
13088
                       if test $ac_mid -le $ac_hi; then
 
13089
                         ac_lo= ac_hi=
 
13090
                         break
 
13091
                       fi
 
13092
                       ac_mid=`expr 2 '*' $ac_mid`
 
13093
fi
 
13094
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
13095
  done
 
13096
else
 
13097
  echo "$as_me: failed program was:" >&5
 
13098
sed 's/^/| /' conftest.$ac_ext >&5
 
13099
 
 
13100
ac_lo= ac_hi=
 
13101
fi
 
13102
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
13103
fi
 
13104
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
13105
# Binary search between lo and hi bounds.
 
13106
while test "x$ac_lo" != "x$ac_hi"; do
 
13107
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
 
13108
  cat >conftest.$ac_ext <<_ACEOF
 
13109
/* confdefs.h.  */
 
13110
_ACEOF
 
13111
cat confdefs.h >>conftest.$ac_ext
 
13112
cat >>conftest.$ac_ext <<_ACEOF
 
13113
/* end confdefs.h.  */
 
13114
$ac_includes_default
 
13115
int
 
13116
main ()
 
13117
{
 
13118
static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)];
 
13119
test_array [0] = 0
 
13120
 
 
13121
  ;
 
13122
  return 0;
 
13123
}
 
13124
_ACEOF
 
13125
rm -f conftest.$ac_objext
 
13126
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
13127
  (eval $ac_compile) 2>conftest.er1
 
13128
  ac_status=$?
 
13129
  grep -v '^ *+' conftest.er1 >conftest.err
 
13130
  rm -f conftest.er1
 
13131
  cat conftest.err >&5
 
13132
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13133
  (exit $ac_status); } &&
 
13134
         { ac_try='test -z "$ac_c_werror_flag"
 
13135
                         || test ! -s conftest.err'
 
13136
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13137
  (eval $ac_try) 2>&5
 
13138
  ac_status=$?
 
13139
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13140
  (exit $ac_status); }; } &&
 
13141
         { ac_try='test -s conftest.$ac_objext'
 
13142
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13143
  (eval $ac_try) 2>&5
 
13144
  ac_status=$?
 
13145
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13146
  (exit $ac_status); }; }; then
 
13147
  ac_hi=$ac_mid
 
13148
else
 
13149
  echo "$as_me: failed program was:" >&5
 
13150
sed 's/^/| /' conftest.$ac_ext >&5
 
13151
 
 
13152
ac_lo=`expr '(' $ac_mid ')' + 1`
 
13153
fi
 
13154
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
13155
done
 
13156
case $ac_lo in
 
13157
?*) ac_cv_sizeof___int64=$ac_lo;;
 
13158
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
 
13159
See \`config.log' for more details." >&5
 
13160
echo "$as_me: error: cannot compute sizeof (__int64), 77
 
13161
See \`config.log' for more details." >&2;}
 
13162
   { (exit 1); exit 1; }; } ;;
 
13163
esac
 
13164
else
 
13165
  if test "$cross_compiling" = yes; then
 
13166
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
 
13167
See \`config.log' for more details." >&5
 
13168
echo "$as_me: error: cannot run test program while cross compiling
 
13169
See \`config.log' for more details." >&2;}
 
13170
   { (exit 1); exit 1; }; }
 
13171
else
 
13172
  cat >conftest.$ac_ext <<_ACEOF
 
13173
/* confdefs.h.  */
 
13174
_ACEOF
 
13175
cat confdefs.h >>conftest.$ac_ext
 
13176
cat >>conftest.$ac_ext <<_ACEOF
 
13177
/* end confdefs.h.  */
 
13178
$ac_includes_default
 
13179
long longval () { return (long) (sizeof (__int64)); }
 
13180
unsigned long ulongval () { return (long) (sizeof (__int64)); }
 
13181
#include <stdio.h>
 
13182
#include <stdlib.h>
 
13183
int
 
13184
main ()
 
13185
{
 
13186
 
 
13187
  FILE *f = fopen ("conftest.val", "w");
 
13188
  if (! f)
 
13189
    exit (1);
 
13190
  if (((long) (sizeof (__int64))) < 0)
 
13191
    {
 
13192
      long i = longval ();
 
13193
      if (i != ((long) (sizeof (__int64))))
 
13194
        exit (1);
 
13195
      fprintf (f, "%ld\n", i);
 
13196
    }
 
13197
  else
 
13198
    {
 
13199
      unsigned long i = ulongval ();
 
13200
      if (i != ((long) (sizeof (__int64))))
 
13201
        exit (1);
 
13202
      fprintf (f, "%lu\n", i);
 
13203
    }
 
13204
  exit (ferror (f) || fclose (f) != 0);
 
13205
 
 
13206
  ;
 
13207
  return 0;
 
13208
}
 
13209
_ACEOF
 
13210
rm -f conftest$ac_exeext
 
13211
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
13212
  (eval $ac_link) 2>&5
 
13213
  ac_status=$?
 
13214
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13215
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
13216
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13217
  (eval $ac_try) 2>&5
 
13218
  ac_status=$?
 
13219
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13220
  (exit $ac_status); }; }; then
 
13221
  ac_cv_sizeof___int64=`cat conftest.val`
 
13222
else
 
13223
  echo "$as_me: program exited with status $ac_status" >&5
 
13224
echo "$as_me: failed program was:" >&5
 
13225
sed 's/^/| /' conftest.$ac_ext >&5
 
13226
 
 
13227
( exit $ac_status )
 
13228
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77
 
13229
See \`config.log' for more details." >&5
 
13230
echo "$as_me: error: cannot compute sizeof (__int64), 77
 
13231
See \`config.log' for more details." >&2;}
 
13232
   { (exit 1); exit 1; }; }
 
13233
fi
 
13234
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
13235
fi
 
13236
fi
 
13237
rm -f conftest.val
 
13238
else
 
13239
  ac_cv_sizeof___int64=0
 
13240
fi
 
13241
fi
 
13242
echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5
 
13243
echo "${ECHO_T}$ac_cv_sizeof___int64" >&6
 
13244
cat >>confdefs.h <<_ACEOF
 
13245
#define SIZEOF___INT64 $ac_cv_sizeof___int64
 
13246
_ACEOF
 
13247
 
 
13248
 
 
13249
 
 
13250
cat >>confdefs.h <<_ACEOF
 
13251
#define ETHR_SIZEOF___INT64 $ac_cv_sizeof___int64
 
13252
_ACEOF
 
13253
 
 
13254
 
 
13255
 
 
13256
case X$erl_xcomp_bigendian in
 
13257
    X) ;;
 
13258
    Xyes|Xno) ac_cv_c_bigendian=$erl_xcomp_bigendian;;
 
13259
    *) { { echo "$as_me:$LINENO: error: Bad erl_xcomp_bigendian value: $erl_xcomp_bigendian" >&5
 
13260
echo "$as_me: error: Bad erl_xcomp_bigendian value: $erl_xcomp_bigendian" >&2;}
 
13261
   { (exit 1); exit 1; }; };;
 
13262
esac
 
13263
 
 
13264
echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
 
13265
echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
 
13266
if test "${ac_cv_c_bigendian+set}" = set; then
 
13267
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
13268
else
 
13269
  # See if sys/param.h defines the BYTE_ORDER macro.
 
13270
cat >conftest.$ac_ext <<_ACEOF
 
13271
/* confdefs.h.  */
 
13272
_ACEOF
 
13273
cat confdefs.h >>conftest.$ac_ext
 
13274
cat >>conftest.$ac_ext <<_ACEOF
 
13275
/* end confdefs.h.  */
 
13276
#include <sys/types.h>
 
13277
#include <sys/param.h>
 
13278
 
 
13279
int
 
13280
main ()
 
13281
{
 
13282
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
 
13283
 bogus endian macros
 
13284
#endif
 
13285
 
 
13286
  ;
 
13287
  return 0;
 
13288
}
 
13289
_ACEOF
 
13290
rm -f conftest.$ac_objext
 
13291
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
13292
  (eval $ac_compile) 2>conftest.er1
 
13293
  ac_status=$?
 
13294
  grep -v '^ *+' conftest.er1 >conftest.err
 
13295
  rm -f conftest.er1
 
13296
  cat conftest.err >&5
 
13297
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13298
  (exit $ac_status); } &&
 
13299
         { ac_try='test -z "$ac_c_werror_flag"
 
13300
                         || test ! -s conftest.err'
 
13301
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13302
  (eval $ac_try) 2>&5
 
13303
  ac_status=$?
 
13304
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13305
  (exit $ac_status); }; } &&
 
13306
         { ac_try='test -s conftest.$ac_objext'
 
13307
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13308
  (eval $ac_try) 2>&5
 
13309
  ac_status=$?
 
13310
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13311
  (exit $ac_status); }; }; then
 
13312
  # It does; now see whether it defined to BIG_ENDIAN or not.
 
13313
cat >conftest.$ac_ext <<_ACEOF
 
13314
/* confdefs.h.  */
 
13315
_ACEOF
 
13316
cat confdefs.h >>conftest.$ac_ext
 
13317
cat >>conftest.$ac_ext <<_ACEOF
 
13318
/* end confdefs.h.  */
 
13319
#include <sys/types.h>
 
13320
#include <sys/param.h>
 
13321
 
 
13322
int
 
13323
main ()
 
13324
{
 
13325
#if BYTE_ORDER != BIG_ENDIAN
 
13326
 not big endian
 
13327
#endif
 
13328
 
 
13329
  ;
 
13330
  return 0;
 
13331
}
 
13332
_ACEOF
 
13333
rm -f conftest.$ac_objext
 
13334
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
13335
  (eval $ac_compile) 2>conftest.er1
 
13336
  ac_status=$?
 
13337
  grep -v '^ *+' conftest.er1 >conftest.err
 
13338
  rm -f conftest.er1
 
13339
  cat conftest.err >&5
 
13340
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13341
  (exit $ac_status); } &&
 
13342
         { ac_try='test -z "$ac_c_werror_flag"
 
13343
                         || test ! -s conftest.err'
 
13344
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13345
  (eval $ac_try) 2>&5
 
13346
  ac_status=$?
 
13347
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13348
  (exit $ac_status); }; } &&
 
13349
         { ac_try='test -s conftest.$ac_objext'
 
13350
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13351
  (eval $ac_try) 2>&5
 
13352
  ac_status=$?
 
13353
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13354
  (exit $ac_status); }; }; then
 
13355
  ac_cv_c_bigendian=yes
 
13356
else
 
13357
  echo "$as_me: failed program was:" >&5
 
13358
sed 's/^/| /' conftest.$ac_ext >&5
 
13359
 
 
13360
ac_cv_c_bigendian=no
 
13361
fi
 
13362
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
13363
else
 
13364
  echo "$as_me: failed program was:" >&5
 
13365
sed 's/^/| /' conftest.$ac_ext >&5
 
13366
 
 
13367
# It does not; compile a test program.
 
13368
if test "$cross_compiling" = yes; then
 
13369
  # try to guess the endianness by grepping values into an object file
 
13370
  ac_cv_c_bigendian=unknown
 
13371
  cat >conftest.$ac_ext <<_ACEOF
 
13372
/* confdefs.h.  */
 
13373
_ACEOF
 
13374
cat confdefs.h >>conftest.$ac_ext
 
13375
cat >>conftest.$ac_ext <<_ACEOF
 
13376
/* end confdefs.h.  */
 
13377
short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
 
13378
short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
 
13379
void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
 
13380
short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
 
13381
short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
 
13382
void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
 
13383
int
 
13384
main ()
 
13385
{
 
13386
 _ascii (); _ebcdic ();
 
13387
  ;
 
13388
  return 0;
 
13389
}
 
13390
_ACEOF
 
13391
rm -f conftest.$ac_objext
 
13392
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
13393
  (eval $ac_compile) 2>conftest.er1
 
13394
  ac_status=$?
 
13395
  grep -v '^ *+' conftest.er1 >conftest.err
 
13396
  rm -f conftest.er1
 
13397
  cat conftest.err >&5
 
13398
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13399
  (exit $ac_status); } &&
 
13400
         { ac_try='test -z "$ac_c_werror_flag"
 
13401
                         || test ! -s conftest.err'
 
13402
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13403
  (eval $ac_try) 2>&5
 
13404
  ac_status=$?
 
13405
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13406
  (exit $ac_status); }; } &&
 
13407
         { ac_try='test -s conftest.$ac_objext'
 
13408
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13409
  (eval $ac_try) 2>&5
 
13410
  ac_status=$?
 
13411
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13412
  (exit $ac_status); }; }; then
 
13413
  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
 
13414
  ac_cv_c_bigendian=yes
 
13415
fi
 
13416
if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
 
13417
  if test "$ac_cv_c_bigendian" = unknown; then
 
13418
    ac_cv_c_bigendian=no
 
13419
  else
 
13420
    # finding both strings is unlikely to happen, but who knows?
 
13421
    ac_cv_c_bigendian=unknown
 
13422
  fi
 
13423
fi
 
13424
else
 
13425
  echo "$as_me: failed program was:" >&5
 
13426
sed 's/^/| /' conftest.$ac_ext >&5
 
13427
 
 
13428
fi
 
13429
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
13430
else
 
13431
  cat >conftest.$ac_ext <<_ACEOF
 
13432
/* confdefs.h.  */
 
13433
_ACEOF
 
13434
cat confdefs.h >>conftest.$ac_ext
 
13435
cat >>conftest.$ac_ext <<_ACEOF
 
13436
/* end confdefs.h.  */
 
13437
int
 
13438
main ()
 
13439
{
 
13440
  /* Are we little or big endian?  From Harbison&Steele.  */
 
13441
  union
 
13442
  {
 
13443
    long l;
 
13444
    char c[sizeof (long)];
 
13445
  } u;
 
13446
  u.l = 1;
 
13447
  exit (u.c[sizeof (long) - 1] == 1);
 
13448
}
 
13449
_ACEOF
 
13450
rm -f conftest$ac_exeext
 
13451
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
13452
  (eval $ac_link) 2>&5
 
13453
  ac_status=$?
 
13454
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13455
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
13456
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13457
  (eval $ac_try) 2>&5
 
13458
  ac_status=$?
 
13459
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13460
  (exit $ac_status); }; }; then
 
13461
  ac_cv_c_bigendian=no
 
13462
else
 
13463
  echo "$as_me: program exited with status $ac_status" >&5
 
13464
echo "$as_me: failed program was:" >&5
 
13465
sed 's/^/| /' conftest.$ac_ext >&5
 
13466
 
 
13467
( exit $ac_status )
 
13468
ac_cv_c_bigendian=yes
 
13469
fi
 
13470
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
13471
fi
 
13472
fi
 
13473
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
13474
fi
 
13475
echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
 
13476
echo "${ECHO_T}$ac_cv_c_bigendian" >&6
 
13477
case $ac_cv_c_bigendian in
 
13478
  yes)
 
13479
 
 
13480
cat >>confdefs.h <<\_ACEOF
 
13481
#define WORDS_BIGENDIAN 1
 
13482
_ACEOF
 
13483
 ;;
 
13484
  no)
 
13485
     ;;
 
13486
  *)
 
13487
    { { echo "$as_me:$LINENO: error: unknown endianness
 
13488
presetting ac_cv_c_bigendian=no (or yes) will help" >&5
 
13489
echo "$as_me: error: unknown endianness
 
13490
presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
 
13491
   { (exit 1); exit 1; }; } ;;
 
13492
esac
 
13493
 
 
13494
 
 
13495
if test "$ac_cv_c_bigendian" = "yes"; then
 
13496
 
 
13497
cat >>confdefs.h <<\_ACEOF
 
13498
#define ETHR_BIGENDIAN 1
 
13499
_ACEOF
 
13500
 
 
13501
fi
 
13502
 
 
13503
# Check whether --enable-native-ethr-impls or --disable-native-ethr-impls was given.
 
13504
if test "${enable_native_ethr_impls+set}" = set; then
 
13505
  enableval="$enable_native_ethr_impls"
 
13506
   case "$enableval" in
 
13507
    no) disable_native_ethr_impls=yes ;;
 
13508
    *)  disable_native_ethr_impls=no ;;
 
13509
  esac
 
13510
else
 
13511
  disable_native_ethr_impls=no
 
13512
fi;
 
13513
 
 
13514
test "X$disable_native_ethr_impls" = "Xyes" &&
8314
13515
 
8315
13516
cat >>confdefs.h <<\_ACEOF
8316
13517
#define ETHR_DISABLE_NATIVE_IMPLS 1
8317
13518
_ACEOF
8318
13519
 
8319
 
fi
 
13520
 
 
13521
# Check whether --enable-prefer-gcc-native-ethr-impls or --disable-prefer-gcc-native-ethr-impls was given.
 
13522
if test "${enable_prefer_gcc_native_ethr_impls+set}" = set; then
 
13523
  enableval="$enable_prefer_gcc_native_ethr_impls"
 
13524
   case "$enableval" in
 
13525
    yes) enable_prefer_gcc_native_ethr_impls=yes ;;
 
13526
    *)  enable_prefer_gcc_native_ethr_impls=no ;;
 
13527
  esac
 
13528
else
 
13529
  enable_prefer_gcc_native_ethr_impls=no
 
13530
fi;
 
13531
 
 
13532
test $enable_prefer_gcc_native_ethr_impls = yes &&
 
13533
 
 
13534
cat >>confdefs.h <<\_ACEOF
 
13535
#define ETHR_PREFER_GCC_NATIVE_IMPLS 1
 
13536
_ACEOF
 
13537
 
 
13538
 
 
13539
 
 
13540
# Check whether --with-libatomic_ops or --without-libatomic_ops was given.
 
13541
if test "${with_libatomic_ops+set}" = set; then
 
13542
  withval="$with_libatomic_ops"
 
13543
 
 
13544
fi;
 
13545
 
 
13546
# Check whether --enable-ethread-pre-pentium4-compatibility or --disable-ethread-pre-pentium4-compatibility was given.
 
13547
if test "${enable_ethread_pre_pentium4_compatibility+set}" = set; then
 
13548
  enableval="$enable_ethread_pre_pentium4_compatibility"
 
13549
 
 
13550
  case "$enable_ethread_pre_pentium4_compatibility" in
 
13551
    yes|no) ;;
 
13552
    *) enable_ethread_pre_pentium4_compatibility=check;;
 
13553
  esac
 
13554
 
 
13555
else
 
13556
  enable_ethread_pre_pentium4_compatibility=check
 
13557
fi;
 
13558
 
 
13559
test "$cross_compiling" != "yes" || enable_ethread_pre_pentium4_compatibility=no
 
13560
 
 
13561
case "$enable_ethread_pre_pentium4_compatibility-$host_cpu" in
 
13562
  check-i86pc | check-i*86)
 
13563
    echo "$as_me:$LINENO: checking whether pre pentium 4 compatibility should forced" >&5
 
13564
echo $ECHO_N "checking whether pre pentium 4 compatibility should forced... $ECHO_C" >&6
 
13565
    if test "$cross_compiling" = yes; then
 
13566
  enable_ethread_pre_pentium4_compatibility=no
 
13567
else
 
13568
  cat >conftest.$ac_ext <<_ACEOF
 
13569
 
 
13570
#if defined(__GNUC__)
 
13571
#  if defined(ETHR_PREFER_LIBATOMIC_OPS_NATIVE_IMPLS)
 
13572
#    define CHECK_LIBATOMIC_OPS__
 
13573
#  else
 
13574
#    define CHECK_GCC_ASM__
 
13575
#  endif
 
13576
#elif defined(ETHR_HAVE_LIBATOMIC_OPS)
 
13577
#  define CHECK_LIBATOMIC_OPS__
 
13578
#endif
 
13579
#if defined(CHECK_LIBATOMIC_OPS__)
 
13580
#include "atomic_ops.h"
 
13581
#endif
 
13582
int main(void)
 
13583
{
 
13584
#if defined(CHECK_GCC_ASM__)
 
13585
    __asm__ __volatile__("mfence" : : : "memory");
 
13586
#elif defined(CHECK_LIBATOMIC_OPS__)
 
13587
    AO_nop_full();
 
13588
#endif
 
13589
    return 0;
 
13590
}
 
13591
 
 
13592
_ACEOF
 
13593
rm -f conftest$ac_exeext
 
13594
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
13595
  (eval $ac_link) 2>&5
 
13596
  ac_status=$?
 
13597
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13598
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
13599
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13600
  (eval $ac_try) 2>&5
 
13601
  ac_status=$?
 
13602
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13603
  (exit $ac_status); }; }; then
 
13604
  enable_ethread_pre_pentium4_compatibility=no
 
13605
else
 
13606
  echo "$as_me: program exited with status $ac_status" >&5
 
13607
echo "$as_me: failed program was:" >&5
 
13608
sed 's/^/| /' conftest.$ac_ext >&5
 
13609
 
 
13610
( exit $ac_status )
 
13611
enable_ethread_pre_pentium4_compatibility=yes
 
13612
fi
 
13613
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
13614
fi
 
13615
    echo "$as_me:$LINENO: result: $enable_ethread_pre_pentium4_compatibility" >&5
 
13616
echo "${ECHO_T}$enable_ethread_pre_pentium4_compatibility" >&6;;
 
13617
  *)
 
13618
    ;;
 
13619
esac
 
13620
 
 
13621
test $enable_ethread_pre_pentium4_compatibility = yes &&
 
13622
 
 
13623
cat >>confdefs.h <<\_ACEOF
 
13624
#define ETHR_PRE_PENTIUM4_COMPAT 1
 
13625
_ACEOF
 
13626
 
8320
13627
 
8321
13628
 
8322
13629
cat >>confdefs.h <<\_ACEOF
8453
13760
#define ERTS_HAVE_SMP_EMU 1
8454
13761
_ACEOF
8455
13762
 
 
13763
 
 
13764
        case "$ethr_have_native_atomics-$ethr_have_native_spinlock" in
 
13765
          yes-*)
 
13766
                ;;
 
13767
 
 
13768
          no-yes)
 
13769
 
 
13770
                test -f "$ERL_TOP/erts/CONF_INFO" ||
 
13771
                    echo "" > "$ERL_TOP/erts/CONF_INFO"
 
13772
                cat >> $ERL_TOP/erts/CONF_INFO <<EOF
 
13773
 
 
13774
                 No native atomic implementation available.
 
13775
                 Fallbacks implemented using spinlocks will be
 
13776
                 used. Note that the performance of the SMP
 
13777
                 runtime system will suffer due to this.
 
13778
 
 
13779
EOF
 
13780
                ;;
 
13781
 
 
13782
          no-no)
 
13783
 
 
13784
                test -f "$ERL_TOP/erts/CONF_INFO" ||
 
13785
                    echo "" > "$ERL_TOP/erts/CONF_INFO"
 
13786
                cat >> "$ERL_TOP/erts/CONF_INFO" <<EOF
 
13787
 
 
13788
                 No native atomic implementation, nor no native
 
13789
                 spinlock implementation available. Fallbacks
 
13790
                 implemented using mutexes will be used. Note
 
13791
                 that the performance of the SMP runtime system
 
13792
                 will suffer much due to this.
 
13793
 
 
13794
EOF
 
13795
                ;;
 
13796
 
 
13797
        esac
 
13798
 
8456
13799
        enable_threads=force
8457
13800
fi
8458
13801
 
8459
13802
 
8460
13803
 
8461
13804
 
 
13805
for ac_func in posix_fadvise
 
13806
do
 
13807
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 
13808
echo "$as_me:$LINENO: checking for $ac_func" >&5
 
13809
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 
13810
if eval "test \"\${$as_ac_var+set}\" = set"; then
 
13811
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
13812
else
 
13813
  cat >conftest.$ac_ext <<_ACEOF
 
13814
/* confdefs.h.  */
 
13815
_ACEOF
 
13816
cat confdefs.h >>conftest.$ac_ext
 
13817
cat >>conftest.$ac_ext <<_ACEOF
 
13818
/* end confdefs.h.  */
 
13819
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 
13820
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 
13821
#define $ac_func innocuous_$ac_func
 
13822
 
 
13823
/* System header to define __stub macros and hopefully few prototypes,
 
13824
    which can conflict with char $ac_func (); below.
 
13825
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 
13826
    <limits.h> exists even on freestanding compilers.  */
 
13827
 
 
13828
#ifdef __STDC__
 
13829
# include <limits.h>
 
13830
#else
 
13831
# include <assert.h>
 
13832
#endif
 
13833
 
 
13834
#undef $ac_func
 
13835
 
 
13836
/* Override any gcc2 internal prototype to avoid an error.  */
 
13837
#ifdef __cplusplus
 
13838
extern "C"
 
13839
{
 
13840
#endif
 
13841
/* We use char because int might match the return type of a gcc2
 
13842
   builtin and then its argument prototype would still apply.  */
 
13843
char $ac_func ();
 
13844
/* The GNU C library defines this for functions which it implements
 
13845
    to always fail with ENOSYS.  Some functions are actually named
 
13846
    something starting with __ and the normal name is an alias.  */
 
13847
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 
13848
choke me
 
13849
#else
 
13850
char (*f) () = $ac_func;
 
13851
#endif
 
13852
#ifdef __cplusplus
 
13853
}
 
13854
#endif
 
13855
 
 
13856
int
 
13857
main ()
 
13858
{
 
13859
return f != $ac_func;
 
13860
  ;
 
13861
  return 0;
 
13862
}
 
13863
_ACEOF
 
13864
rm -f conftest.$ac_objext conftest$ac_exeext
 
13865
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
13866
  (eval $ac_link) 2>conftest.er1
 
13867
  ac_status=$?
 
13868
  grep -v '^ *+' conftest.er1 >conftest.err
 
13869
  rm -f conftest.er1
 
13870
  cat conftest.err >&5
 
13871
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13872
  (exit $ac_status); } &&
 
13873
         { ac_try='test -z "$ac_c_werror_flag"
 
13874
                         || test ! -s conftest.err'
 
13875
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13876
  (eval $ac_try) 2>&5
 
13877
  ac_status=$?
 
13878
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13879
  (exit $ac_status); }; } &&
 
13880
         { ac_try='test -s conftest$ac_exeext'
 
13881
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
13882
  (eval $ac_try) 2>&5
 
13883
  ac_status=$?
 
13884
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
13885
  (exit $ac_status); }; }; then
 
13886
  eval "$as_ac_var=yes"
 
13887
else
 
13888
  echo "$as_me: failed program was:" >&5
 
13889
sed 's/^/| /' conftest.$ac_ext >&5
 
13890
 
 
13891
eval "$as_ac_var=no"
 
13892
fi
 
13893
rm -f conftest.err conftest.$ac_objext \
 
13894
      conftest$ac_exeext conftest.$ac_ext
 
13895
fi
 
13896
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
 
13897
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 
13898
if test `eval echo '${'$as_ac_var'}'` = yes; then
 
13899
  cat >>confdefs.h <<_ACEOF
 
13900
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 
13901
_ACEOF
 
13902
 
 
13903
fi
 
13904
done
 
13905
 
 
13906
 
8462
13907
 
8463
13908
#
8464
13909
# Figure out if the emulator should use threads. The default is set above
8571
14016
                enable_child_waiter_thread=yes
8572
14017
                ;;
8573
14018
            linux*)
8574
 
 
8575
 
cat >>confdefs.h <<\_ACEOF
8576
 
#define USE_RECURSIVE_MALLOC_MUTEX 1
8577
 
_ACEOF
8578
 
 
8579
14019
                echo "$as_me:$LINENO: checking whether dlopen() needs to be called before first call to dlerror()" >&5
8580
14020
echo $ECHO_N "checking whether dlopen() needs to be called before first call to dlerror()... $ECHO_C" >&6
8581
 
                if test "x$ETHR_THR_LIB_BASE_NAME" != "xnptl"; then
 
14021
                if test "x$ETHR_THR_LIB_BASE_TYPE" != "xposix_nptl"; then
8582
14022
 
8583
14023
cat >>confdefs.h <<\_ACEOF
8584
14024
#define ERTS_NEED_DLOPEN_BEFORE_DLERROR 1
8590
14030
                        echo "$as_me:$LINENO: result: no" >&5
8591
14031
echo "${ECHO_T}no" >&6
8592
14032
                fi
8593
 
                if test "x$ETHR_THR_LIB_BASE_NAME" != "xnptl"; then
 
14033
                if test "x$ETHR_THR_LIB_BASE_TYPE" != "xposix_nptl"; then
8594
14034
                    # Child waiter thread cannot be enabled
8595
14035
                    disable_child_waiter_thread=yes
8596
14036
                    enable_child_waiter_thread=no
8663
14103
 
8664
14104
 
8665
14105
 
 
14106
 
 
14107
 
8666
14108
ERTS_INTERNAL_X_LIBS=
8667
14109
 
8668
14110
echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
8741
14183
 
8742
14184
 
8743
14185
 
 
14186
 
 
14187
 
8744
14188
THR_LIBS=$ETHR_X_LIBS
8745
14189
THR_DEFS=$ETHR_DEFS
8746
14190
 
10502
15946
 
10503
15947
 
10504
15948
 
 
15949
 
 
15950
 
 
15951
 
10505
15952
for ac_header in fcntl.h limits.h unistd.h syslog.h dlfcn.h ieeefp.h \
10506
 
                 sys/stropts.h sys/sysctl.h \
 
15953
                 sys/types.h sys/stropts.h sys/sysctl.h \
10507
15954
                 sys/ioctl.h sys/time.h sys/uio.h \
10508
15955
                 sys/socket.h sys/sockio.h sys/socketio.h \
10509
15956
                 net/errno.h malloc.h mach-o/dyld.h arpa/nameser.h \
10510
 
                 pty.h util.h utmp.h langinfo.h
 
15957
                 pty.h util.h utmp.h langinfo.h poll.h sdkddkver.h
10511
15958
do
10512
15959
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10513
15960
if eval "test \"\${$as_ac_Header+set}\" = set"; then
11448
16895
 
11449
16896
 
11450
16897
 
11451
 
if test "x$enable_sctp" == "xyes" ; then
 
16898
if test "x$enable_sctp" = "xyes" ; then
11452
16899
    echo "$as_me:$LINENO: checking for netinet/sctp.h" >&5
11453
16900
echo $ECHO_N "checking for netinet/sctp.h... $ECHO_C" >&6
11454
16901
if test "${ac_cv_header_netinet_sctp_h+set}" = set; then
16141
21588
_ACEOF
16142
21589
 
16143
21590
 
 
21591
echo "$as_me:$LINENO: checking for size_t" >&5
 
21592
echo $ECHO_N "checking for size_t... $ECHO_C" >&6
 
21593
if test "${ac_cv_type_size_t+set}" = set; then
 
21594
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
21595
else
 
21596
  cat >conftest.$ac_ext <<_ACEOF
 
21597
/* confdefs.h.  */
 
21598
_ACEOF
 
21599
cat confdefs.h >>conftest.$ac_ext
 
21600
cat >>conftest.$ac_ext <<_ACEOF
 
21601
/* end confdefs.h.  */
 
21602
$ac_includes_default
 
21603
int
 
21604
main ()
 
21605
{
 
21606
if ((size_t *) 0)
 
21607
  return 0;
 
21608
if (sizeof (size_t))
 
21609
  return 0;
 
21610
  ;
 
21611
  return 0;
 
21612
}
 
21613
_ACEOF
 
21614
rm -f conftest.$ac_objext
 
21615
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
21616
  (eval $ac_compile) 2>conftest.er1
 
21617
  ac_status=$?
 
21618
  grep -v '^ *+' conftest.er1 >conftest.err
 
21619
  rm -f conftest.er1
 
21620
  cat conftest.err >&5
 
21621
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21622
  (exit $ac_status); } &&
 
21623
         { ac_try='test -z "$ac_c_werror_flag"
 
21624
                         || test ! -s conftest.err'
 
21625
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21626
  (eval $ac_try) 2>&5
 
21627
  ac_status=$?
 
21628
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21629
  (exit $ac_status); }; } &&
 
21630
         { ac_try='test -s conftest.$ac_objext'
 
21631
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21632
  (eval $ac_try) 2>&5
 
21633
  ac_status=$?
 
21634
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21635
  (exit $ac_status); }; }; then
 
21636
  ac_cv_type_size_t=yes
 
21637
else
 
21638
  echo "$as_me: failed program was:" >&5
 
21639
sed 's/^/| /' conftest.$ac_ext >&5
 
21640
 
 
21641
ac_cv_type_size_t=no
 
21642
fi
 
21643
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
21644
fi
 
21645
echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
 
21646
echo "${ECHO_T}$ac_cv_type_size_t" >&6
 
21647
 
 
21648
echo "$as_me:$LINENO: checking size of size_t" >&5
 
21649
echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
 
21650
if test "${ac_cv_sizeof_size_t+set}" = set; then
 
21651
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
21652
else
 
21653
  if test "$ac_cv_type_size_t" = yes; then
 
21654
  # The cast to unsigned long works around a bug in the HP C Compiler
 
21655
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 
21656
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 
21657
  # This bug is HP SR number 8606223364.
 
21658
  if test "$cross_compiling" = yes; then
 
21659
  # Depending upon the size, compute the lo and hi bounds.
 
21660
cat >conftest.$ac_ext <<_ACEOF
 
21661
/* confdefs.h.  */
 
21662
_ACEOF
 
21663
cat confdefs.h >>conftest.$ac_ext
 
21664
cat >>conftest.$ac_ext <<_ACEOF
 
21665
/* end confdefs.h.  */
 
21666
$ac_includes_default
 
21667
int
 
21668
main ()
 
21669
{
 
21670
static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
 
21671
test_array [0] = 0
 
21672
 
 
21673
  ;
 
21674
  return 0;
 
21675
}
 
21676
_ACEOF
 
21677
rm -f conftest.$ac_objext
 
21678
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
21679
  (eval $ac_compile) 2>conftest.er1
 
21680
  ac_status=$?
 
21681
  grep -v '^ *+' conftest.er1 >conftest.err
 
21682
  rm -f conftest.er1
 
21683
  cat conftest.err >&5
 
21684
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21685
  (exit $ac_status); } &&
 
21686
         { ac_try='test -z "$ac_c_werror_flag"
 
21687
                         || test ! -s conftest.err'
 
21688
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21689
  (eval $ac_try) 2>&5
 
21690
  ac_status=$?
 
21691
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21692
  (exit $ac_status); }; } &&
 
21693
         { ac_try='test -s conftest.$ac_objext'
 
21694
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21695
  (eval $ac_try) 2>&5
 
21696
  ac_status=$?
 
21697
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21698
  (exit $ac_status); }; }; then
 
21699
  ac_lo=0 ac_mid=0
 
21700
  while :; do
 
21701
    cat >conftest.$ac_ext <<_ACEOF
 
21702
/* confdefs.h.  */
 
21703
_ACEOF
 
21704
cat confdefs.h >>conftest.$ac_ext
 
21705
cat >>conftest.$ac_ext <<_ACEOF
 
21706
/* end confdefs.h.  */
 
21707
$ac_includes_default
 
21708
int
 
21709
main ()
 
21710
{
 
21711
static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
 
21712
test_array [0] = 0
 
21713
 
 
21714
  ;
 
21715
  return 0;
 
21716
}
 
21717
_ACEOF
 
21718
rm -f conftest.$ac_objext
 
21719
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
21720
  (eval $ac_compile) 2>conftest.er1
 
21721
  ac_status=$?
 
21722
  grep -v '^ *+' conftest.er1 >conftest.err
 
21723
  rm -f conftest.er1
 
21724
  cat conftest.err >&5
 
21725
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21726
  (exit $ac_status); } &&
 
21727
         { ac_try='test -z "$ac_c_werror_flag"
 
21728
                         || test ! -s conftest.err'
 
21729
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21730
  (eval $ac_try) 2>&5
 
21731
  ac_status=$?
 
21732
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21733
  (exit $ac_status); }; } &&
 
21734
         { ac_try='test -s conftest.$ac_objext'
 
21735
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21736
  (eval $ac_try) 2>&5
 
21737
  ac_status=$?
 
21738
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21739
  (exit $ac_status); }; }; then
 
21740
  ac_hi=$ac_mid; break
 
21741
else
 
21742
  echo "$as_me: failed program was:" >&5
 
21743
sed 's/^/| /' conftest.$ac_ext >&5
 
21744
 
 
21745
ac_lo=`expr $ac_mid + 1`
 
21746
                    if test $ac_lo -le $ac_mid; then
 
21747
                      ac_lo= ac_hi=
 
21748
                      break
 
21749
                    fi
 
21750
                    ac_mid=`expr 2 '*' $ac_mid + 1`
 
21751
fi
 
21752
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
21753
  done
 
21754
else
 
21755
  echo "$as_me: failed program was:" >&5
 
21756
sed 's/^/| /' conftest.$ac_ext >&5
 
21757
 
 
21758
cat >conftest.$ac_ext <<_ACEOF
 
21759
/* confdefs.h.  */
 
21760
_ACEOF
 
21761
cat confdefs.h >>conftest.$ac_ext
 
21762
cat >>conftest.$ac_ext <<_ACEOF
 
21763
/* end confdefs.h.  */
 
21764
$ac_includes_default
 
21765
int
 
21766
main ()
 
21767
{
 
21768
static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
 
21769
test_array [0] = 0
 
21770
 
 
21771
  ;
 
21772
  return 0;
 
21773
}
 
21774
_ACEOF
 
21775
rm -f conftest.$ac_objext
 
21776
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
21777
  (eval $ac_compile) 2>conftest.er1
 
21778
  ac_status=$?
 
21779
  grep -v '^ *+' conftest.er1 >conftest.err
 
21780
  rm -f conftest.er1
 
21781
  cat conftest.err >&5
 
21782
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21783
  (exit $ac_status); } &&
 
21784
         { ac_try='test -z "$ac_c_werror_flag"
 
21785
                         || test ! -s conftest.err'
 
21786
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21787
  (eval $ac_try) 2>&5
 
21788
  ac_status=$?
 
21789
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21790
  (exit $ac_status); }; } &&
 
21791
         { ac_try='test -s conftest.$ac_objext'
 
21792
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21793
  (eval $ac_try) 2>&5
 
21794
  ac_status=$?
 
21795
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21796
  (exit $ac_status); }; }; then
 
21797
  ac_hi=-1 ac_mid=-1
 
21798
  while :; do
 
21799
    cat >conftest.$ac_ext <<_ACEOF
 
21800
/* confdefs.h.  */
 
21801
_ACEOF
 
21802
cat confdefs.h >>conftest.$ac_ext
 
21803
cat >>conftest.$ac_ext <<_ACEOF
 
21804
/* end confdefs.h.  */
 
21805
$ac_includes_default
 
21806
int
 
21807
main ()
 
21808
{
 
21809
static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
 
21810
test_array [0] = 0
 
21811
 
 
21812
  ;
 
21813
  return 0;
 
21814
}
 
21815
_ACEOF
 
21816
rm -f conftest.$ac_objext
 
21817
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
21818
  (eval $ac_compile) 2>conftest.er1
 
21819
  ac_status=$?
 
21820
  grep -v '^ *+' conftest.er1 >conftest.err
 
21821
  rm -f conftest.er1
 
21822
  cat conftest.err >&5
 
21823
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21824
  (exit $ac_status); } &&
 
21825
         { ac_try='test -z "$ac_c_werror_flag"
 
21826
                         || test ! -s conftest.err'
 
21827
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21828
  (eval $ac_try) 2>&5
 
21829
  ac_status=$?
 
21830
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21831
  (exit $ac_status); }; } &&
 
21832
         { ac_try='test -s conftest.$ac_objext'
 
21833
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21834
  (eval $ac_try) 2>&5
 
21835
  ac_status=$?
 
21836
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21837
  (exit $ac_status); }; }; then
 
21838
  ac_lo=$ac_mid; break
 
21839
else
 
21840
  echo "$as_me: failed program was:" >&5
 
21841
sed 's/^/| /' conftest.$ac_ext >&5
 
21842
 
 
21843
ac_hi=`expr '(' $ac_mid ')' - 1`
 
21844
                       if test $ac_mid -le $ac_hi; then
 
21845
                         ac_lo= ac_hi=
 
21846
                         break
 
21847
                       fi
 
21848
                       ac_mid=`expr 2 '*' $ac_mid`
 
21849
fi
 
21850
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
21851
  done
 
21852
else
 
21853
  echo "$as_me: failed program was:" >&5
 
21854
sed 's/^/| /' conftest.$ac_ext >&5
 
21855
 
 
21856
ac_lo= ac_hi=
 
21857
fi
 
21858
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
21859
fi
 
21860
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
21861
# Binary search between lo and hi bounds.
 
21862
while test "x$ac_lo" != "x$ac_hi"; do
 
21863
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
 
21864
  cat >conftest.$ac_ext <<_ACEOF
 
21865
/* confdefs.h.  */
 
21866
_ACEOF
 
21867
cat confdefs.h >>conftest.$ac_ext
 
21868
cat >>conftest.$ac_ext <<_ACEOF
 
21869
/* end confdefs.h.  */
 
21870
$ac_includes_default
 
21871
int
 
21872
main ()
 
21873
{
 
21874
static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
 
21875
test_array [0] = 0
 
21876
 
 
21877
  ;
 
21878
  return 0;
 
21879
}
 
21880
_ACEOF
 
21881
rm -f conftest.$ac_objext
 
21882
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
21883
  (eval $ac_compile) 2>conftest.er1
 
21884
  ac_status=$?
 
21885
  grep -v '^ *+' conftest.er1 >conftest.err
 
21886
  rm -f conftest.er1
 
21887
  cat conftest.err >&5
 
21888
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21889
  (exit $ac_status); } &&
 
21890
         { ac_try='test -z "$ac_c_werror_flag"
 
21891
                         || test ! -s conftest.err'
 
21892
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21893
  (eval $ac_try) 2>&5
 
21894
  ac_status=$?
 
21895
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21896
  (exit $ac_status); }; } &&
 
21897
         { ac_try='test -s conftest.$ac_objext'
 
21898
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21899
  (eval $ac_try) 2>&5
 
21900
  ac_status=$?
 
21901
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21902
  (exit $ac_status); }; }; then
 
21903
  ac_hi=$ac_mid
 
21904
else
 
21905
  echo "$as_me: failed program was:" >&5
 
21906
sed 's/^/| /' conftest.$ac_ext >&5
 
21907
 
 
21908
ac_lo=`expr '(' $ac_mid ')' + 1`
 
21909
fi
 
21910
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
21911
done
 
21912
case $ac_lo in
 
21913
?*) ac_cv_sizeof_size_t=$ac_lo;;
 
21914
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
 
21915
See \`config.log' for more details." >&5
 
21916
echo "$as_me: error: cannot compute sizeof (size_t), 77
 
21917
See \`config.log' for more details." >&2;}
 
21918
   { (exit 1); exit 1; }; } ;;
 
21919
esac
 
21920
else
 
21921
  if test "$cross_compiling" = yes; then
 
21922
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
 
21923
See \`config.log' for more details." >&5
 
21924
echo "$as_me: error: cannot run test program while cross compiling
 
21925
See \`config.log' for more details." >&2;}
 
21926
   { (exit 1); exit 1; }; }
 
21927
else
 
21928
  cat >conftest.$ac_ext <<_ACEOF
 
21929
/* confdefs.h.  */
 
21930
_ACEOF
 
21931
cat confdefs.h >>conftest.$ac_ext
 
21932
cat >>conftest.$ac_ext <<_ACEOF
 
21933
/* end confdefs.h.  */
 
21934
$ac_includes_default
 
21935
long longval () { return (long) (sizeof (size_t)); }
 
21936
unsigned long ulongval () { return (long) (sizeof (size_t)); }
 
21937
#include <stdio.h>
 
21938
#include <stdlib.h>
 
21939
int
 
21940
main ()
 
21941
{
 
21942
 
 
21943
  FILE *f = fopen ("conftest.val", "w");
 
21944
  if (! f)
 
21945
    exit (1);
 
21946
  if (((long) (sizeof (size_t))) < 0)
 
21947
    {
 
21948
      long i = longval ();
 
21949
      if (i != ((long) (sizeof (size_t))))
 
21950
        exit (1);
 
21951
      fprintf (f, "%ld\n", i);
 
21952
    }
 
21953
  else
 
21954
    {
 
21955
      unsigned long i = ulongval ();
 
21956
      if (i != ((long) (sizeof (size_t))))
 
21957
        exit (1);
 
21958
      fprintf (f, "%lu\n", i);
 
21959
    }
 
21960
  exit (ferror (f) || fclose (f) != 0);
 
21961
 
 
21962
  ;
 
21963
  return 0;
 
21964
}
 
21965
_ACEOF
 
21966
rm -f conftest$ac_exeext
 
21967
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
21968
  (eval $ac_link) 2>&5
 
21969
  ac_status=$?
 
21970
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21971
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
21972
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
21973
  (eval $ac_try) 2>&5
 
21974
  ac_status=$?
 
21975
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
21976
  (exit $ac_status); }; }; then
 
21977
  ac_cv_sizeof_size_t=`cat conftest.val`
 
21978
else
 
21979
  echo "$as_me: program exited with status $ac_status" >&5
 
21980
echo "$as_me: failed program was:" >&5
 
21981
sed 's/^/| /' conftest.$ac_ext >&5
 
21982
 
 
21983
( exit $ac_status )
 
21984
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
 
21985
See \`config.log' for more details." >&5
 
21986
echo "$as_me: error: cannot compute sizeof (size_t), 77
 
21987
See \`config.log' for more details." >&2;}
 
21988
   { (exit 1); exit 1; }; }
 
21989
fi
 
21990
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
21991
fi
 
21992
fi
 
21993
rm -f conftest.val
 
21994
else
 
21995
  ac_cv_sizeof_size_t=0
 
21996
fi
 
21997
fi
 
21998
echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
 
21999
echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
 
22000
cat >>confdefs.h <<_ACEOF
 
22001
#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
 
22002
_ACEOF
 
22003
 
 
22004
 
 
22005
echo "$as_me:$LINENO: checking for off_t" >&5
 
22006
echo $ECHO_N "checking for off_t... $ECHO_C" >&6
 
22007
if test "${ac_cv_type_off_t+set}" = set; then
 
22008
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
22009
else
 
22010
  cat >conftest.$ac_ext <<_ACEOF
 
22011
/* confdefs.h.  */
 
22012
_ACEOF
 
22013
cat confdefs.h >>conftest.$ac_ext
 
22014
cat >>conftest.$ac_ext <<_ACEOF
 
22015
/* end confdefs.h.  */
 
22016
$ac_includes_default
 
22017
int
 
22018
main ()
 
22019
{
 
22020
if ((off_t *) 0)
 
22021
  return 0;
 
22022
if (sizeof (off_t))
 
22023
  return 0;
 
22024
  ;
 
22025
  return 0;
 
22026
}
 
22027
_ACEOF
 
22028
rm -f conftest.$ac_objext
 
22029
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
22030
  (eval $ac_compile) 2>conftest.er1
 
22031
  ac_status=$?
 
22032
  grep -v '^ *+' conftest.er1 >conftest.err
 
22033
  rm -f conftest.er1
 
22034
  cat conftest.err >&5
 
22035
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22036
  (exit $ac_status); } &&
 
22037
         { ac_try='test -z "$ac_c_werror_flag"
 
22038
                         || test ! -s conftest.err'
 
22039
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22040
  (eval $ac_try) 2>&5
 
22041
  ac_status=$?
 
22042
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22043
  (exit $ac_status); }; } &&
 
22044
         { ac_try='test -s conftest.$ac_objext'
 
22045
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22046
  (eval $ac_try) 2>&5
 
22047
  ac_status=$?
 
22048
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22049
  (exit $ac_status); }; }; then
 
22050
  ac_cv_type_off_t=yes
 
22051
else
 
22052
  echo "$as_me: failed program was:" >&5
 
22053
sed 's/^/| /' conftest.$ac_ext >&5
 
22054
 
 
22055
ac_cv_type_off_t=no
 
22056
fi
 
22057
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
22058
fi
 
22059
echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
 
22060
echo "${ECHO_T}$ac_cv_type_off_t" >&6
 
22061
 
 
22062
echo "$as_me:$LINENO: checking size of off_t" >&5
 
22063
echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
 
22064
if test "${ac_cv_sizeof_off_t+set}" = set; then
 
22065
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
22066
else
 
22067
  if test "$ac_cv_type_off_t" = yes; then
 
22068
  # The cast to unsigned long works around a bug in the HP C Compiler
 
22069
  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 
22070
  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 
22071
  # This bug is HP SR number 8606223364.
 
22072
  if test "$cross_compiling" = yes; then
 
22073
  # Depending upon the size, compute the lo and hi bounds.
 
22074
cat >conftest.$ac_ext <<_ACEOF
 
22075
/* confdefs.h.  */
 
22076
_ACEOF
 
22077
cat confdefs.h >>conftest.$ac_ext
 
22078
cat >>conftest.$ac_ext <<_ACEOF
 
22079
/* end confdefs.h.  */
 
22080
$ac_includes_default
 
22081
int
 
22082
main ()
 
22083
{
 
22084
static int test_array [1 - 2 * !(((long) (sizeof (off_t))) >= 0)];
 
22085
test_array [0] = 0
 
22086
 
 
22087
  ;
 
22088
  return 0;
 
22089
}
 
22090
_ACEOF
 
22091
rm -f conftest.$ac_objext
 
22092
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
22093
  (eval $ac_compile) 2>conftest.er1
 
22094
  ac_status=$?
 
22095
  grep -v '^ *+' conftest.er1 >conftest.err
 
22096
  rm -f conftest.er1
 
22097
  cat conftest.err >&5
 
22098
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22099
  (exit $ac_status); } &&
 
22100
         { ac_try='test -z "$ac_c_werror_flag"
 
22101
                         || test ! -s conftest.err'
 
22102
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22103
  (eval $ac_try) 2>&5
 
22104
  ac_status=$?
 
22105
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22106
  (exit $ac_status); }; } &&
 
22107
         { ac_try='test -s conftest.$ac_objext'
 
22108
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22109
  (eval $ac_try) 2>&5
 
22110
  ac_status=$?
 
22111
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22112
  (exit $ac_status); }; }; then
 
22113
  ac_lo=0 ac_mid=0
 
22114
  while :; do
 
22115
    cat >conftest.$ac_ext <<_ACEOF
 
22116
/* confdefs.h.  */
 
22117
_ACEOF
 
22118
cat confdefs.h >>conftest.$ac_ext
 
22119
cat >>conftest.$ac_ext <<_ACEOF
 
22120
/* end confdefs.h.  */
 
22121
$ac_includes_default
 
22122
int
 
22123
main ()
 
22124
{
 
22125
static int test_array [1 - 2 * !(((long) (sizeof (off_t))) <= $ac_mid)];
 
22126
test_array [0] = 0
 
22127
 
 
22128
  ;
 
22129
  return 0;
 
22130
}
 
22131
_ACEOF
 
22132
rm -f conftest.$ac_objext
 
22133
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
22134
  (eval $ac_compile) 2>conftest.er1
 
22135
  ac_status=$?
 
22136
  grep -v '^ *+' conftest.er1 >conftest.err
 
22137
  rm -f conftest.er1
 
22138
  cat conftest.err >&5
 
22139
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22140
  (exit $ac_status); } &&
 
22141
         { ac_try='test -z "$ac_c_werror_flag"
 
22142
                         || test ! -s conftest.err'
 
22143
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22144
  (eval $ac_try) 2>&5
 
22145
  ac_status=$?
 
22146
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22147
  (exit $ac_status); }; } &&
 
22148
         { ac_try='test -s conftest.$ac_objext'
 
22149
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22150
  (eval $ac_try) 2>&5
 
22151
  ac_status=$?
 
22152
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22153
  (exit $ac_status); }; }; then
 
22154
  ac_hi=$ac_mid; break
 
22155
else
 
22156
  echo "$as_me: failed program was:" >&5
 
22157
sed 's/^/| /' conftest.$ac_ext >&5
 
22158
 
 
22159
ac_lo=`expr $ac_mid + 1`
 
22160
                    if test $ac_lo -le $ac_mid; then
 
22161
                      ac_lo= ac_hi=
 
22162
                      break
 
22163
                    fi
 
22164
                    ac_mid=`expr 2 '*' $ac_mid + 1`
 
22165
fi
 
22166
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
22167
  done
 
22168
else
 
22169
  echo "$as_me: failed program was:" >&5
 
22170
sed 's/^/| /' conftest.$ac_ext >&5
 
22171
 
 
22172
cat >conftest.$ac_ext <<_ACEOF
 
22173
/* confdefs.h.  */
 
22174
_ACEOF
 
22175
cat confdefs.h >>conftest.$ac_ext
 
22176
cat >>conftest.$ac_ext <<_ACEOF
 
22177
/* end confdefs.h.  */
 
22178
$ac_includes_default
 
22179
int
 
22180
main ()
 
22181
{
 
22182
static int test_array [1 - 2 * !(((long) (sizeof (off_t))) < 0)];
 
22183
test_array [0] = 0
 
22184
 
 
22185
  ;
 
22186
  return 0;
 
22187
}
 
22188
_ACEOF
 
22189
rm -f conftest.$ac_objext
 
22190
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
22191
  (eval $ac_compile) 2>conftest.er1
 
22192
  ac_status=$?
 
22193
  grep -v '^ *+' conftest.er1 >conftest.err
 
22194
  rm -f conftest.er1
 
22195
  cat conftest.err >&5
 
22196
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22197
  (exit $ac_status); } &&
 
22198
         { ac_try='test -z "$ac_c_werror_flag"
 
22199
                         || test ! -s conftest.err'
 
22200
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22201
  (eval $ac_try) 2>&5
 
22202
  ac_status=$?
 
22203
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22204
  (exit $ac_status); }; } &&
 
22205
         { ac_try='test -s conftest.$ac_objext'
 
22206
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22207
  (eval $ac_try) 2>&5
 
22208
  ac_status=$?
 
22209
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22210
  (exit $ac_status); }; }; then
 
22211
  ac_hi=-1 ac_mid=-1
 
22212
  while :; do
 
22213
    cat >conftest.$ac_ext <<_ACEOF
 
22214
/* confdefs.h.  */
 
22215
_ACEOF
 
22216
cat confdefs.h >>conftest.$ac_ext
 
22217
cat >>conftest.$ac_ext <<_ACEOF
 
22218
/* end confdefs.h.  */
 
22219
$ac_includes_default
 
22220
int
 
22221
main ()
 
22222
{
 
22223
static int test_array [1 - 2 * !(((long) (sizeof (off_t))) >= $ac_mid)];
 
22224
test_array [0] = 0
 
22225
 
 
22226
  ;
 
22227
  return 0;
 
22228
}
 
22229
_ACEOF
 
22230
rm -f conftest.$ac_objext
 
22231
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
22232
  (eval $ac_compile) 2>conftest.er1
 
22233
  ac_status=$?
 
22234
  grep -v '^ *+' conftest.er1 >conftest.err
 
22235
  rm -f conftest.er1
 
22236
  cat conftest.err >&5
 
22237
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22238
  (exit $ac_status); } &&
 
22239
         { ac_try='test -z "$ac_c_werror_flag"
 
22240
                         || test ! -s conftest.err'
 
22241
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22242
  (eval $ac_try) 2>&5
 
22243
  ac_status=$?
 
22244
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22245
  (exit $ac_status); }; } &&
 
22246
         { ac_try='test -s conftest.$ac_objext'
 
22247
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22248
  (eval $ac_try) 2>&5
 
22249
  ac_status=$?
 
22250
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22251
  (exit $ac_status); }; }; then
 
22252
  ac_lo=$ac_mid; break
 
22253
else
 
22254
  echo "$as_me: failed program was:" >&5
 
22255
sed 's/^/| /' conftest.$ac_ext >&5
 
22256
 
 
22257
ac_hi=`expr '(' $ac_mid ')' - 1`
 
22258
                       if test $ac_mid -le $ac_hi; then
 
22259
                         ac_lo= ac_hi=
 
22260
                         break
 
22261
                       fi
 
22262
                       ac_mid=`expr 2 '*' $ac_mid`
 
22263
fi
 
22264
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
22265
  done
 
22266
else
 
22267
  echo "$as_me: failed program was:" >&5
 
22268
sed 's/^/| /' conftest.$ac_ext >&5
 
22269
 
 
22270
ac_lo= ac_hi=
 
22271
fi
 
22272
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
22273
fi
 
22274
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
22275
# Binary search between lo and hi bounds.
 
22276
while test "x$ac_lo" != "x$ac_hi"; do
 
22277
  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
 
22278
  cat >conftest.$ac_ext <<_ACEOF
 
22279
/* confdefs.h.  */
 
22280
_ACEOF
 
22281
cat confdefs.h >>conftest.$ac_ext
 
22282
cat >>conftest.$ac_ext <<_ACEOF
 
22283
/* end confdefs.h.  */
 
22284
$ac_includes_default
 
22285
int
 
22286
main ()
 
22287
{
 
22288
static int test_array [1 - 2 * !(((long) (sizeof (off_t))) <= $ac_mid)];
 
22289
test_array [0] = 0
 
22290
 
 
22291
  ;
 
22292
  return 0;
 
22293
}
 
22294
_ACEOF
 
22295
rm -f conftest.$ac_objext
 
22296
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
22297
  (eval $ac_compile) 2>conftest.er1
 
22298
  ac_status=$?
 
22299
  grep -v '^ *+' conftest.er1 >conftest.err
 
22300
  rm -f conftest.er1
 
22301
  cat conftest.err >&5
 
22302
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22303
  (exit $ac_status); } &&
 
22304
         { ac_try='test -z "$ac_c_werror_flag"
 
22305
                         || test ! -s conftest.err'
 
22306
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22307
  (eval $ac_try) 2>&5
 
22308
  ac_status=$?
 
22309
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22310
  (exit $ac_status); }; } &&
 
22311
         { ac_try='test -s conftest.$ac_objext'
 
22312
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22313
  (eval $ac_try) 2>&5
 
22314
  ac_status=$?
 
22315
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22316
  (exit $ac_status); }; }; then
 
22317
  ac_hi=$ac_mid
 
22318
else
 
22319
  echo "$as_me: failed program was:" >&5
 
22320
sed 's/^/| /' conftest.$ac_ext >&5
 
22321
 
 
22322
ac_lo=`expr '(' $ac_mid ')' + 1`
 
22323
fi
 
22324
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
22325
done
 
22326
case $ac_lo in
 
22327
?*) ac_cv_sizeof_off_t=$ac_lo;;
 
22328
'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t), 77
 
22329
See \`config.log' for more details." >&5
 
22330
echo "$as_me: error: cannot compute sizeof (off_t), 77
 
22331
See \`config.log' for more details." >&2;}
 
22332
   { (exit 1); exit 1; }; } ;;
 
22333
esac
 
22334
else
 
22335
  if test "$cross_compiling" = yes; then
 
22336
  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
 
22337
See \`config.log' for more details." >&5
 
22338
echo "$as_me: error: cannot run test program while cross compiling
 
22339
See \`config.log' for more details." >&2;}
 
22340
   { (exit 1); exit 1; }; }
 
22341
else
 
22342
  cat >conftest.$ac_ext <<_ACEOF
 
22343
/* confdefs.h.  */
 
22344
_ACEOF
 
22345
cat confdefs.h >>conftest.$ac_ext
 
22346
cat >>conftest.$ac_ext <<_ACEOF
 
22347
/* end confdefs.h.  */
 
22348
$ac_includes_default
 
22349
long longval () { return (long) (sizeof (off_t)); }
 
22350
unsigned long ulongval () { return (long) (sizeof (off_t)); }
 
22351
#include <stdio.h>
 
22352
#include <stdlib.h>
 
22353
int
 
22354
main ()
 
22355
{
 
22356
 
 
22357
  FILE *f = fopen ("conftest.val", "w");
 
22358
  if (! f)
 
22359
    exit (1);
 
22360
  if (((long) (sizeof (off_t))) < 0)
 
22361
    {
 
22362
      long i = longval ();
 
22363
      if (i != ((long) (sizeof (off_t))))
 
22364
        exit (1);
 
22365
      fprintf (f, "%ld\n", i);
 
22366
    }
 
22367
  else
 
22368
    {
 
22369
      unsigned long i = ulongval ();
 
22370
      if (i != ((long) (sizeof (off_t))))
 
22371
        exit (1);
 
22372
      fprintf (f, "%lu\n", i);
 
22373
    }
 
22374
  exit (ferror (f) || fclose (f) != 0);
 
22375
 
 
22376
  ;
 
22377
  return 0;
 
22378
}
 
22379
_ACEOF
 
22380
rm -f conftest$ac_exeext
 
22381
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
22382
  (eval $ac_link) 2>&5
 
22383
  ac_status=$?
 
22384
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22385
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
22386
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22387
  (eval $ac_try) 2>&5
 
22388
  ac_status=$?
 
22389
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22390
  (exit $ac_status); }; }; then
 
22391
  ac_cv_sizeof_off_t=`cat conftest.val`
 
22392
else
 
22393
  echo "$as_me: program exited with status $ac_status" >&5
 
22394
echo "$as_me: failed program was:" >&5
 
22395
sed 's/^/| /' conftest.$ac_ext >&5
 
22396
 
 
22397
( exit $ac_status )
 
22398
{ { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t), 77
 
22399
See \`config.log' for more details." >&5
 
22400
echo "$as_me: error: cannot compute sizeof (off_t), 77
 
22401
See \`config.log' for more details." >&2;}
 
22402
   { (exit 1); exit 1; }; }
 
22403
fi
 
22404
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
22405
fi
 
22406
fi
 
22407
rm -f conftest.val
 
22408
else
 
22409
  ac_cv_sizeof_off_t=0
 
22410
fi
 
22411
fi
 
22412
echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
 
22413
echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
 
22414
cat >>confdefs.h <<_ACEOF
 
22415
#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
 
22416
_ACEOF
 
22417
 
 
22418
 
16144
22419
 
16145
22420
BITS64=
16146
22421
 
16218
22493
echo "$as_me:$LINENO: checking for broken gcc-4.3.0 compiler" >&5
16219
22494
echo $ECHO_N "checking for broken gcc-4.3.0 compiler... $ECHO_C" >&6
16220
22495
if test "$cross_compiling" = yes; then
16221
 
  echo "$as_me:$LINENO: result: no" >&5
16222
 
echo "${ECHO_T}no" >&6
 
22496
  gcc_4_3_0_bug=cross
16223
22497
else
16224
22498
  cat >conftest.$ac_ext <<_ACEOF
16225
22499
/* confdefs.h.  */
16273
22547
  ac_status=$?
16274
22548
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16275
22549
  (exit $ac_status); }; }; then
16276
 
  echo "$as_me:$LINENO: result: no" >&5
16277
 
echo "${ECHO_T}no" >&6
16278
 
 
 
22550
  gcc_4_3_0_bug=no
16279
22551
else
16280
22552
  echo "$as_me: program exited with status $ac_status" >&5
16281
22553
echo "$as_me: failed program was:" >&5
16282
22554
sed 's/^/| /' conftest.$ac_ext >&5
16283
22555
 
16284
22556
( exit $ac_status )
16285
 
echo "$as_me:$LINENO: result: yes" >&5
16286
 
echo "${ECHO_T}yes" >&6
16287
 
{ { echo "$as_me:$LINENO: error: This gcc miscompiles the Erlang runtime system; please use a different version" >&5
 
22557
gcc_4_3_0_bug=yes
 
22558
fi
 
22559
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 
22560
fi
 
22561
 
 
22562
case $gcc_4_3_0_bug in
 
22563
        yes|no)
 
22564
                gcc_4_3_0_bug_result=$gcc_4_3_0_bug;;
 
22565
        cross)
 
22566
                gcc_dumped_vsn=`$CC -dumpversion 2>/dev/null`
 
22567
                case gcc-$gcc_dumped_vsn in
 
22568
                        gcc-4.3.0) gcc_4_3_0_bug=yes;;
 
22569
                        *) gcc_4_3_0_bug=no;;
 
22570
                esac
 
22571
                gcc_4_3_0_bug_result="$gcc_4_3_0_bug; could not run test since cross compiling, checked version number ($gcc_dumped_vsn) instead";;
 
22572
esac
 
22573
 
 
22574
echo "$as_me:$LINENO: result: $gcc_4_3_0_bug_result" >&5
 
22575
echo "${ECHO_T}$gcc_4_3_0_bug_result" >&6
 
22576
if test $gcc_4_3_0_bug = yes; then
 
22577
        { { echo "$as_me:$LINENO: error: This gcc miscompiles the Erlang runtime system; please use a different version" >&5
16288
22578
echo "$as_me: error: This gcc miscompiles the Erlang runtime system; please use a different version" >&2;}
16289
22579
   { (exit 1); exit 1; }; }
16290
 
 
16291
 
fi
16292
 
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16293
 
fi
16294
 
fi
16295
 
 
16296
 
echo "$as_me:$LINENO: checking size of size_t" >&5
16297
 
echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
16298
 
if test "${ac_cv_sizeof_size_t+set}" = set; then
16299
 
  echo $ECHO_N "(cached) $ECHO_C" >&6
16300
 
else
16301
 
  if test "$cross_compiling" = yes; then
16302
 
  ac_cv_sizeof_size_t=$erl_xcomp_sizeof_size_t
16303
 
else
16304
 
  cat >conftest.$ac_ext <<_ACEOF
16305
 
/* confdefs.h.  */
16306
 
_ACEOF
16307
 
cat confdefs.h >>conftest.$ac_ext
16308
 
cat >>conftest.$ac_ext <<_ACEOF
16309
 
/* end confdefs.h.  */
16310
 
 
16311
 
#include <sys/types.h>
16312
 
#include <stdio.h>
16313
 
#include <stdlib.h>
16314
 
#include <stddef.h>
16315
 
int main(int argc, char **argv) {
16316
 
    FILE *f = fopen("conftestval", "w");
16317
 
    if (! f)
16318
 
        exit(1); /* Failed */
16319
 
    fprintf(f, "%d\n", (int) sizeof(size_t));
16320
 
    exit(0); /* OK */
16321
 
}
16322
 
 
16323
 
_ACEOF
16324
 
rm -f conftest$ac_exeext
16325
 
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16326
 
  (eval $ac_link) 2>&5
16327
 
  ac_status=$?
16328
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16329
 
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16330
 
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16331
 
  (eval $ac_try) 2>&5
16332
 
  ac_status=$?
16333
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16334
 
  (exit $ac_status); }; }; then
16335
 
  ac_cv_sizeof_size_t=`cat conftestval`
16336
 
 
16337
 
else
16338
 
  echo "$as_me: program exited with status $ac_status" >&5
16339
 
echo "$as_me: failed program was:" >&5
16340
 
sed 's/^/| /' conftest.$ac_ext >&5
16341
 
 
16342
 
( exit $ac_status )
16343
 
ac_cv_sizeof_size_t=0
16344
 
 
16345
 
fi
16346
 
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16347
 
fi
16348
 
fi
16349
 
echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
16350
 
echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
16351
 
 
16352
 
cat >>confdefs.h <<_ACEOF
16353
 
#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16354
 
_ACEOF
16355
 
 
16356
 
 
16357
 
echo "$as_me:$LINENO: checking size of off_t" >&5
16358
 
echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
16359
 
if test "${ac_cv_sizeof_off_t+set}" = set; then
16360
 
  echo $ECHO_N "(cached) $ECHO_C" >&6
16361
 
else
16362
 
  if test "$cross_compiling" = yes; then
16363
 
  ac_cv_sizeof_off_t=$erl_xcomp_sizeof_off_t
16364
 
else
16365
 
  cat >conftest.$ac_ext <<_ACEOF
16366
 
/* confdefs.h.  */
16367
 
_ACEOF
16368
 
cat confdefs.h >>conftest.$ac_ext
16369
 
cat >>conftest.$ac_ext <<_ACEOF
16370
 
/* end confdefs.h.  */
16371
 
 
16372
 
#include <sys/types.h>
16373
 
#include <stdio.h>
16374
 
#include <stdlib.h>
16375
 
#include <stddef.h>
16376
 
int main(int argc, char **argv) {
16377
 
    FILE *f = fopen("conftestval", "w");
16378
 
    if (! f)
16379
 
        exit(1); /* Failed */
16380
 
    fprintf(f, "%d\n", (int) sizeof(off_t));
16381
 
    exit(0); /* OK */
16382
 
}
16383
 
 
16384
 
_ACEOF
16385
 
rm -f conftest$ac_exeext
16386
 
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16387
 
  (eval $ac_link) 2>&5
16388
 
  ac_status=$?
16389
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16390
 
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16391
 
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16392
 
  (eval $ac_try) 2>&5
16393
 
  ac_status=$?
16394
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16395
 
  (exit $ac_status); }; }; then
16396
 
  ac_cv_sizeof_off_t=`cat conftestval`
16397
 
 
16398
 
else
16399
 
  echo "$as_me: program exited with status $ac_status" >&5
16400
 
echo "$as_me: failed program was:" >&5
16401
 
sed 's/^/| /' conftest.$ac_ext >&5
16402
 
 
16403
 
( exit $ac_status )
16404
 
ac_cv_sizeof_off_t=0
16405
 
 
16406
 
fi
16407
 
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16408
 
fi
16409
 
fi
16410
 
echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
16411
 
echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
16412
 
 
16413
 
cat >>confdefs.h <<_ACEOF
16414
 
#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
16415
 
_ACEOF
16416
 
 
16417
 
 
16418
 
echo "$as_me:$LINENO: checking int/long/void*/size_t sizes" >&5
16419
 
echo $ECHO_N "checking int/long/void*/size_t sizes... $ECHO_C" >&6
16420
 
if test "$cross_compiling" = yes; then
16421
 
  echo "$as_me:$LINENO: result: ok" >&5
16422
 
echo "${ECHO_T}ok" >&6
16423
 
else
16424
 
  cat >conftest.$ac_ext <<_ACEOF
16425
 
/* confdefs.h.  */
16426
 
_ACEOF
16427
 
cat confdefs.h >>conftest.$ac_ext
16428
 
cat >>conftest.$ac_ext <<_ACEOF
16429
 
/* end confdefs.h.  */
16430
 
 
16431
 
#include <stdlib.h>
16432
 
#include <stddef.h>
16433
 
int main(int argc, char **argv) {
16434
 
    if (sizeof(void *) >= 4 &&
16435
 
        sizeof(void *) == sizeof(size_t) &&
16436
 
        (sizeof(void *) == sizeof(int) || sizeof(void *) == sizeof(long))) {
16437
 
        exit(0); /* OK */
16438
 
    }
16439
 
    exit(1); /* Failed */
16440
 
}
16441
 
 
16442
 
_ACEOF
16443
 
rm -f conftest$ac_exeext
16444
 
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16445
 
  (eval $ac_link) 2>&5
16446
 
  ac_status=$?
16447
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16448
 
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16449
 
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16450
 
  (eval $ac_try) 2>&5
16451
 
  ac_status=$?
16452
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16453
 
  (exit $ac_status); }; }; then
16454
 
  echo "$as_me:$LINENO: result: ok" >&5
16455
 
echo "${ECHO_T}ok" >&6
16456
 
 
16457
 
else
16458
 
  echo "$as_me: program exited with status $ac_status" >&5
16459
 
echo "$as_me: failed program was:" >&5
16460
 
sed 's/^/| /' conftest.$ac_ext >&5
16461
 
 
16462
 
( exit $ac_status )
16463
 
echo "$as_me:$LINENO: result: failed" >&5
16464
 
echo "${ECHO_T}failed" >&6
16465
 
{ { echo "$as_me:$LINENO: error: Cannot handle this combination of int/long/void*/size_t sizes" >&5
16466
 
echo "$as_me: error: Cannot handle this combination of int/long/void*/size_t sizes" >&2;}
16467
 
   { (exit 1); exit 1; }; }
16468
 
 
16469
 
fi
16470
 
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16471
 
fi
16472
 
 
16473
 
if test "x$erl_xcomp_bigendian" != "x"; then
16474
 
        ac_cv_c_bigendian=$erl_xcomp_bigendian
16475
 
fi
 
22580
fi
 
22581
 
 
22582
fi
 
22583
 
 
22584
case X$erl_xcomp_bigendian in
 
22585
    X) ;;
 
22586
    Xyes|Xno) ac_cv_c_bigendian=$erl_xcomp_bigendian;;
 
22587
    *) { { echo "$as_me:$LINENO: error: Bad erl_xcomp_bigendian value: $erl_xcomp_bigendian" >&5
 
22588
echo "$as_me: error: Bad erl_xcomp_bigendian value: $erl_xcomp_bigendian" >&2;}
 
22589
   { (exit 1); exit 1; }; };;
 
22590
esac
16476
22591
 
16477
22592
echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
16478
22593
echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
16711
22826
saved_libs=$LIBS
16712
22827
LIBS="$LIBS $EMU_THR_X_LIBS"
16713
22828
 
 
22829
 
 
22830
for ac_header in windows.h
 
22831
do
 
22832
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 
22833
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
22834
  echo "$as_me:$LINENO: checking for $ac_header" >&5
 
22835
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 
22836
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
22837
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
22838
fi
 
22839
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
22840
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
22841
else
 
22842
  # Is the header compilable?
 
22843
echo "$as_me:$LINENO: checking $ac_header usability" >&5
 
22844
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
 
22845
cat >conftest.$ac_ext <<_ACEOF
 
22846
/* confdefs.h.  */
 
22847
_ACEOF
 
22848
cat confdefs.h >>conftest.$ac_ext
 
22849
cat >>conftest.$ac_ext <<_ACEOF
 
22850
/* end confdefs.h.  */
 
22851
$ac_includes_default
 
22852
#include <$ac_header>
 
22853
_ACEOF
 
22854
rm -f conftest.$ac_objext
 
22855
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
22856
  (eval $ac_compile) 2>conftest.er1
 
22857
  ac_status=$?
 
22858
  grep -v '^ *+' conftest.er1 >conftest.err
 
22859
  rm -f conftest.er1
 
22860
  cat conftest.err >&5
 
22861
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22862
  (exit $ac_status); } &&
 
22863
         { ac_try='test -z "$ac_c_werror_flag"
 
22864
                         || test ! -s conftest.err'
 
22865
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22866
  (eval $ac_try) 2>&5
 
22867
  ac_status=$?
 
22868
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22869
  (exit $ac_status); }; } &&
 
22870
         { ac_try='test -s conftest.$ac_objext'
 
22871
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
22872
  (eval $ac_try) 2>&5
 
22873
  ac_status=$?
 
22874
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22875
  (exit $ac_status); }; }; then
 
22876
  ac_header_compiler=yes
 
22877
else
 
22878
  echo "$as_me: failed program was:" >&5
 
22879
sed 's/^/| /' conftest.$ac_ext >&5
 
22880
 
 
22881
ac_header_compiler=no
 
22882
fi
 
22883
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
22884
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
22885
echo "${ECHO_T}$ac_header_compiler" >&6
 
22886
 
 
22887
# Is the header present?
 
22888
echo "$as_me:$LINENO: checking $ac_header presence" >&5
 
22889
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
 
22890
cat >conftest.$ac_ext <<_ACEOF
 
22891
/* confdefs.h.  */
 
22892
_ACEOF
 
22893
cat confdefs.h >>conftest.$ac_ext
 
22894
cat >>conftest.$ac_ext <<_ACEOF
 
22895
/* end confdefs.h.  */
 
22896
#include <$ac_header>
 
22897
_ACEOF
 
22898
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
22899
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
22900
  ac_status=$?
 
22901
  grep -v '^ *+' conftest.er1 >conftest.err
 
22902
  rm -f conftest.er1
 
22903
  cat conftest.err >&5
 
22904
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
22905
  (exit $ac_status); } >/dev/null; then
 
22906
  if test -s conftest.err; then
 
22907
    ac_cpp_err=$ac_c_preproc_warn_flag
 
22908
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
22909
  else
 
22910
    ac_cpp_err=
 
22911
  fi
 
22912
else
 
22913
  ac_cpp_err=yes
 
22914
fi
 
22915
if test -z "$ac_cpp_err"; then
 
22916
  ac_header_preproc=yes
 
22917
else
 
22918
  echo "$as_me: failed program was:" >&5
 
22919
sed 's/^/| /' conftest.$ac_ext >&5
 
22920
 
 
22921
  ac_header_preproc=no
 
22922
fi
 
22923
rm -f conftest.err conftest.$ac_ext
 
22924
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
22925
echo "${ECHO_T}$ac_header_preproc" >&6
 
22926
 
 
22927
# So?  What about this header?
 
22928
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
22929
  yes:no: )
 
22930
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
22931
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
22932
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
 
22933
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
 
22934
    ac_header_preproc=yes
 
22935
    ;;
 
22936
  no:yes:* )
 
22937
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
 
22938
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
 
22939
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
 
22940
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
 
22941
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
 
22942
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
 
22943
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
 
22944
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
22945
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
 
22946
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
 
22947
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 
22948
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 
22949
    (
 
22950
      cat <<\_ASBOX
 
22951
## ------------------------------------------ ##
 
22952
## Report this to the AC_PACKAGE_NAME lists.  ##
 
22953
## ------------------------------------------ ##
 
22954
_ASBOX
 
22955
    ) |
 
22956
      sed "s/^/$as_me: WARNING:     /" >&2
 
22957
    ;;
 
22958
esac
 
22959
echo "$as_me:$LINENO: checking for $ac_header" >&5
 
22960
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 
22961
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
22962
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
22963
else
 
22964
  eval "$as_ac_Header=\$ac_header_preproc"
 
22965
fi
 
22966
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
22967
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
22968
 
 
22969
fi
 
22970
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
22971
  cat >>confdefs.h <<_ACEOF
 
22972
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 
22973
_ACEOF
 
22974
 
 
22975
fi
 
22976
 
 
22977
done
 
22978
 
 
22979
 
 
22980
for ac_header in winsock2.h
 
22981
do
 
22982
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 
22983
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
22984
  echo "$as_me:$LINENO: checking for $ac_header" >&5
 
22985
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 
22986
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
22987
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
22988
fi
 
22989
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
22990
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
22991
else
 
22992
  # Is the header compilable?
 
22993
echo "$as_me:$LINENO: checking $ac_header usability" >&5
 
22994
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
 
22995
cat >conftest.$ac_ext <<_ACEOF
 
22996
/* confdefs.h.  */
 
22997
_ACEOF
 
22998
cat confdefs.h >>conftest.$ac_ext
 
22999
cat >>conftest.$ac_ext <<_ACEOF
 
23000
/* end confdefs.h.  */
 
23001
$ac_includes_default
 
23002
#include <$ac_header>
 
23003
_ACEOF
 
23004
rm -f conftest.$ac_objext
 
23005
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
23006
  (eval $ac_compile) 2>conftest.er1
 
23007
  ac_status=$?
 
23008
  grep -v '^ *+' conftest.er1 >conftest.err
 
23009
  rm -f conftest.er1
 
23010
  cat conftest.err >&5
 
23011
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23012
  (exit $ac_status); } &&
 
23013
         { ac_try='test -z "$ac_c_werror_flag"
 
23014
                         || test ! -s conftest.err'
 
23015
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
23016
  (eval $ac_try) 2>&5
 
23017
  ac_status=$?
 
23018
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23019
  (exit $ac_status); }; } &&
 
23020
         { ac_try='test -s conftest.$ac_objext'
 
23021
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
23022
  (eval $ac_try) 2>&5
 
23023
  ac_status=$?
 
23024
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23025
  (exit $ac_status); }; }; then
 
23026
  ac_header_compiler=yes
 
23027
else
 
23028
  echo "$as_me: failed program was:" >&5
 
23029
sed 's/^/| /' conftest.$ac_ext >&5
 
23030
 
 
23031
ac_header_compiler=no
 
23032
fi
 
23033
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
23034
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
23035
echo "${ECHO_T}$ac_header_compiler" >&6
 
23036
 
 
23037
# Is the header present?
 
23038
echo "$as_me:$LINENO: checking $ac_header presence" >&5
 
23039
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
 
23040
cat >conftest.$ac_ext <<_ACEOF
 
23041
/* confdefs.h.  */
 
23042
_ACEOF
 
23043
cat confdefs.h >>conftest.$ac_ext
 
23044
cat >>conftest.$ac_ext <<_ACEOF
 
23045
/* end confdefs.h.  */
 
23046
#include <$ac_header>
 
23047
_ACEOF
 
23048
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
23049
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
23050
  ac_status=$?
 
23051
  grep -v '^ *+' conftest.er1 >conftest.err
 
23052
  rm -f conftest.er1
 
23053
  cat conftest.err >&5
 
23054
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23055
  (exit $ac_status); } >/dev/null; then
 
23056
  if test -s conftest.err; then
 
23057
    ac_cpp_err=$ac_c_preproc_warn_flag
 
23058
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
23059
  else
 
23060
    ac_cpp_err=
 
23061
  fi
 
23062
else
 
23063
  ac_cpp_err=yes
 
23064
fi
 
23065
if test -z "$ac_cpp_err"; then
 
23066
  ac_header_preproc=yes
 
23067
else
 
23068
  echo "$as_me: failed program was:" >&5
 
23069
sed 's/^/| /' conftest.$ac_ext >&5
 
23070
 
 
23071
  ac_header_preproc=no
 
23072
fi
 
23073
rm -f conftest.err conftest.$ac_ext
 
23074
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
23075
echo "${ECHO_T}$ac_header_preproc" >&6
 
23076
 
 
23077
# So?  What about this header?
 
23078
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
23079
  yes:no: )
 
23080
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
23081
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
23082
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
 
23083
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
 
23084
    ac_header_preproc=yes
 
23085
    ;;
 
23086
  no:yes:* )
 
23087
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
 
23088
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
 
23089
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
 
23090
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
 
23091
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
 
23092
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
 
23093
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
 
23094
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
23095
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
 
23096
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
 
23097
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 
23098
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 
23099
    (
 
23100
      cat <<\_ASBOX
 
23101
## ------------------------------------------ ##
 
23102
## Report this to the AC_PACKAGE_NAME lists.  ##
 
23103
## ------------------------------------------ ##
 
23104
_ASBOX
 
23105
    ) |
 
23106
      sed "s/^/$as_me: WARNING:     /" >&2
 
23107
    ;;
 
23108
esac
 
23109
echo "$as_me:$LINENO: checking for $ac_header" >&5
 
23110
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 
23111
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
23112
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
23113
else
 
23114
  eval "$as_ac_Header=\$ac_header_preproc"
 
23115
fi
 
23116
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
23117
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
23118
 
 
23119
fi
 
23120
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
23121
  cat >>confdefs.h <<_ACEOF
 
23122
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 
23123
_ACEOF
 
23124
 
 
23125
fi
 
23126
 
 
23127
done
 
23128
 
 
23129
 
 
23130
for ac_header in ws2tcpip.h
 
23131
do
 
23132
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 
23133
echo "$as_me:$LINENO: checking for $ac_header" >&5
 
23134
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 
23135
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
23136
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
23137
else
 
23138
  cat >conftest.$ac_ext <<_ACEOF
 
23139
/* confdefs.h.  */
 
23140
_ACEOF
 
23141
cat confdefs.h >>conftest.$ac_ext
 
23142
cat >>conftest.$ac_ext <<_ACEOF
 
23143
/* end confdefs.h.  */
 
23144
 
 
23145
#ifdef HAVE_WINSOCK2_H
 
23146
#include <winsock2.h>
 
23147
#endif
 
23148
#ifdef HAVE_WINDOWS_H
 
23149
#include <windows.h>
 
23150
#endif
 
23151
 
 
23152
 
 
23153
#include <$ac_header>
 
23154
_ACEOF
 
23155
rm -f conftest.$ac_objext
 
23156
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
23157
  (eval $ac_compile) 2>conftest.er1
 
23158
  ac_status=$?
 
23159
  grep -v '^ *+' conftest.er1 >conftest.err
 
23160
  rm -f conftest.er1
 
23161
  cat conftest.err >&5
 
23162
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23163
  (exit $ac_status); } &&
 
23164
         { ac_try='test -z "$ac_c_werror_flag"
 
23165
                         || test ! -s conftest.err'
 
23166
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
23167
  (eval $ac_try) 2>&5
 
23168
  ac_status=$?
 
23169
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23170
  (exit $ac_status); }; } &&
 
23171
         { ac_try='test -s conftest.$ac_objext'
 
23172
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
23173
  (eval $ac_try) 2>&5
 
23174
  ac_status=$?
 
23175
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23176
  (exit $ac_status); }; }; then
 
23177
  eval "$as_ac_Header=yes"
 
23178
else
 
23179
  echo "$as_me: failed program was:" >&5
 
23180
sed 's/^/| /' conftest.$ac_ext >&5
 
23181
 
 
23182
eval "$as_ac_Header=no"
 
23183
fi
 
23184
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
23185
fi
 
23186
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
23187
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
23188
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
23189
  cat >>confdefs.h <<_ACEOF
 
23190
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 
23191
_ACEOF
 
23192
 
 
23193
fi
 
23194
 
 
23195
done
 
23196
 
16714
23197
echo "$as_me:$LINENO: checking for getaddrinfo" >&5
16715
23198
echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
16716
 
if test "${ac_cv_func_getaddrinfo+set}" = set; then
16717
 
  echo $ECHO_N "(cached) $ECHO_C" >&6
16718
 
else
16719
 
  cat >conftest.$ac_ext <<_ACEOF
 
23199
cat >conftest.$ac_ext <<_ACEOF
16720
23200
/* confdefs.h.  */
16721
23201
_ACEOF
16722
23202
cat confdefs.h >>conftest.$ac_ext
16723
23203
cat >>conftest.$ac_ext <<_ACEOF
16724
23204
/* end confdefs.h.  */
16725
 
/* Define getaddrinfo to an innocuous variant, in case <limits.h> declares getaddrinfo.
16726
 
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16727
 
#define getaddrinfo innocuous_getaddrinfo
16728
 
 
16729
 
/* System header to define __stub macros and hopefully few prototypes,
16730
 
    which can conflict with char getaddrinfo (); below.
16731
 
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16732
 
    <limits.h> exists even on freestanding compilers.  */
16733
 
 
16734
 
#ifdef __STDC__
16735
 
# include <limits.h>
16736
 
#else
16737
 
# include <assert.h>
16738
 
#endif
16739
 
 
16740
 
#undef getaddrinfo
16741
 
 
16742
 
/* Override any gcc2 internal prototype to avoid an error.  */
16743
 
#ifdef __cplusplus
16744
 
extern "C"
16745
 
{
16746
 
#endif
16747
 
/* We use char because int might match the return type of a gcc2
16748
 
   builtin and then its argument prototype would still apply.  */
16749
 
char getaddrinfo ();
16750
 
/* The GNU C library defines this for functions which it implements
16751
 
    to always fail with ENOSYS.  Some functions are actually named
16752
 
    something starting with __ and the normal name is an alias.  */
16753
 
#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo)
16754
 
choke me
16755
 
#else
16756
 
char (*f) () = getaddrinfo;
16757
 
#endif
16758
 
#ifdef __cplusplus
16759
 
}
 
23205
 
 
23206
#include <stdlib.h>
 
23207
#include <string.h>
 
23208
#ifdef HAVE_WINSOCK2_H
 
23209
#include <winsock2.h>
 
23210
#endif
 
23211
#ifdef HAVE_WINDOWS_H
 
23212
#include <windows.h>
 
23213
#endif
 
23214
#ifdef HAVE_WS2TCPIP_H
 
23215
#include <ws2tcpip.h>
 
23216
#endif
 
23217
#ifndef __WIN32__
 
23218
#include <sys/socket.h>
 
23219
#include <netdb.h>
16760
23220
#endif
16761
23221
 
16762
23222
int
16763
23223
main ()
16764
23224
{
16765
 
return f != getaddrinfo;
 
23225
 
 
23226
getaddrinfo("","",NULL,NULL);
 
23227
 
16766
23228
  ;
16767
23229
  return 0;
16768
23230
}
16789
23251
  ac_status=$?
16790
23252
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16791
23253
  (exit $ac_status); }; }; then
16792
 
  ac_cv_func_getaddrinfo=yes
16793
 
else
16794
 
  echo "$as_me: failed program was:" >&5
16795
 
sed 's/^/| /' conftest.$ac_ext >&5
16796
 
 
16797
 
ac_cv_func_getaddrinfo=no
16798
 
fi
16799
 
rm -f conftest.err conftest.$ac_objext \
16800
 
      conftest$ac_exeext conftest.$ac_ext
16801
 
fi
16802
 
echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5
16803
 
echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6
16804
 
if test $ac_cv_func_getaddrinfo = yes; then
16805
23254
  have_getaddrinfo=yes
16806
23255
else
16807
 
  have_getaddrinfo=no
 
23256
  echo "$as_me: failed program was:" >&5
 
23257
sed 's/^/| /' conftest.$ac_ext >&5
 
23258
 
 
23259
have_getaddrinfo=no
16808
23260
fi
16809
 
 
 
23261
rm -f conftest.err conftest.$ac_objext \
 
23262
      conftest$ac_exeext conftest.$ac_ext
16810
23263
if test $have_getaddrinfo = yes; then
 
23264
        echo "$as_me:$LINENO: result: yes" >&5
 
23265
echo "${ECHO_T}yes" >&6
16811
23266
        echo "$as_me:$LINENO: checking whether getaddrinfo accepts enough flags" >&5
16812
23267
echo $ECHO_N "checking whether getaddrinfo accepts enough flags... $ECHO_C" >&6
16813
 
        if test "$cross_compiling" = yes; then
16814
 
  if test "x$erl_xcomp_getaddrinfo" != "x"; then
16815
 
            have_getaddrinfo=$erl_xcomp_getaddrinfo
16816
 
        else
16817
 
            have_getaddrinfo=no
16818
 
        fi
16819
 
else
16820
 
  cat >conftest.$ac_ext <<_ACEOF
 
23268
        cat >conftest.$ac_ext <<_ACEOF
16821
23269
/* confdefs.h.  */
16822
23270
_ACEOF
16823
23271
cat confdefs.h >>conftest.$ac_ext
16826
23274
 
16827
23275
#include <stdlib.h>
16828
23276
#include <string.h>
 
23277
#ifdef HAVE_WINSOCK2_H
 
23278
#include <winsock2.h>
 
23279
#endif
 
23280
#ifdef HAVE_WINDOWS_H
 
23281
#include <windows.h>
 
23282
#endif
 
23283
#ifdef HAVE_WS2TCPIP_H
 
23284
#include <ws2tcpip.h>
 
23285
#endif
 
23286
#ifndef __WIN32__
16829
23287
#include <sys/socket.h>
16830
23288
#include <netdb.h>
16831
 
int main(int argc, char **argv) {
 
23289
#endif
 
23290
 
 
23291
int
 
23292
main ()
 
23293
{
 
23294
 
16832
23295
    struct addrinfo hints, *ai;
16833
23296
    memset(&hints, 0, sizeof(hints));
16834
 
    hints.ai_flags = (AI_CANONNAME|AI_V4MAPPED|AI_ADDRCONFIG);
 
23297
    hints.ai_flags = AI_CANONNAME;
16835
23298
    hints.ai_socktype = SOCK_STREAM;
16836
23299
    hints.ai_family = AF_INET6;
16837
23300
    if (getaddrinfo("::", NULL, &hints, &ai) == 0) {
16840
23303
    } else {
16841
23304
        exit(1);
16842
23305
    }
 
23306
 
 
23307
  ;
 
23308
  return 0;
16843
23309
}
16844
 
 
16845
23310
_ACEOF
16846
 
rm -f conftest$ac_exeext
16847
 
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16848
 
  (eval $ac_link) 2>&5
16849
 
  ac_status=$?
16850
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
16851
 
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 
23311
rm -f conftest.$ac_objext
 
23312
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
23313
  (eval $ac_compile) 2>conftest.er1
 
23314
  ac_status=$?
 
23315
  grep -v '^ *+' conftest.er1 >conftest.err
 
23316
  rm -f conftest.er1
 
23317
  cat conftest.err >&5
 
23318
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23319
  (exit $ac_status); } &&
 
23320
         { ac_try='test -z "$ac_c_werror_flag"
 
23321
                         || test ! -s conftest.err'
 
23322
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
23323
  (eval $ac_try) 2>&5
 
23324
  ac_status=$?
 
23325
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23326
  (exit $ac_status); }; } &&
 
23327
         { ac_try='test -s conftest.$ac_objext'
16852
23328
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16853
23329
  (eval $ac_try) 2>&5
16854
23330
  ac_status=$?
16856
23332
  (exit $ac_status); }; }; then
16857
23333
  :
16858
23334
else
16859
 
  echo "$as_me: program exited with status $ac_status" >&5
16860
 
echo "$as_me: failed program was:" >&5
 
23335
  echo "$as_me: failed program was:" >&5
16861
23336
sed 's/^/| /' conftest.$ac_ext >&5
16862
23337
 
16863
 
( exit $ac_status )
16864
23338
have_getaddrinfo=no
16865
23339
fi
16866
 
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16867
 
fi
16868
 
        if test $have_getaddrinfo = yes; then
16869
 
                echo "$as_me:$LINENO: result: yes" >&5
16870
 
echo "${ECHO_T}yes" >&6
 
23340
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
23341
        echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
 
23342
echo "${ECHO_T}$have_getaddrinfo" >&6
 
23343
        case $have_getaddrinfo in
 
23344
            yes)
16871
23345
 
16872
23346
cat >>confdefs.h <<\_ACEOF
16873
23347
#define HAVE_GETADDRINFO 1
16874
23348
_ACEOF
16875
 
 
16876
 
        else
16877
 
                echo "$as_me:$LINENO: result: no" >&5
16878
 
echo "${ECHO_T}no" >&6
16879
 
        fi
16880
 
fi
16881
 
 
16882
 
 
16883
 
 
16884
 
 
16885
 
for ac_func in getnameinfo getipnodebyname getipnodebyaddr gethostbyname2
 
23349
;;
 
23350
            *) ;;
 
23351
        esac
 
23352
else
 
23353
    echo "$as_me:$LINENO: result: no" >&5
 
23354
echo "${ECHO_T}no" >&6
 
23355
fi
 
23356
echo "$as_me:$LINENO: checking for getnameinfo" >&5
 
23357
echo $ECHO_N "checking for getnameinfo... $ECHO_C" >&6
 
23358
cat >conftest.$ac_ext <<_ACEOF
 
23359
/* confdefs.h.  */
 
23360
_ACEOF
 
23361
cat confdefs.h >>conftest.$ac_ext
 
23362
cat >>conftest.$ac_ext <<_ACEOF
 
23363
/* end confdefs.h.  */
 
23364
 
 
23365
#include <stdlib.h>
 
23366
#include <string.h>
 
23367
#ifdef HAVE_WINSOCK2_H
 
23368
#include <winsock2.h>
 
23369
#endif
 
23370
#ifdef HAVE_WINDOWS_H
 
23371
#include <windows.h>
 
23372
#endif
 
23373
#ifdef HAVE_WS2TCPIP_H
 
23374
#include <ws2tcpip.h>
 
23375
#endif
 
23376
#ifndef __WIN32__
 
23377
#include <sys/socket.h>
 
23378
#include <netdb.h>
 
23379
#endif
 
23380
 
 
23381
int
 
23382
main ()
 
23383
{
 
23384
 
 
23385
getnameinfo(NULL,0,NULL,0,NULL,0,0);
 
23386
 
 
23387
  ;
 
23388
  return 0;
 
23389
}
 
23390
_ACEOF
 
23391
rm -f conftest.$ac_objext conftest$ac_exeext
 
23392
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
23393
  (eval $ac_link) 2>conftest.er1
 
23394
  ac_status=$?
 
23395
  grep -v '^ *+' conftest.er1 >conftest.err
 
23396
  rm -f conftest.er1
 
23397
  cat conftest.err >&5
 
23398
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23399
  (exit $ac_status); } &&
 
23400
         { ac_try='test -z "$ac_c_werror_flag"
 
23401
                         || test ! -s conftest.err'
 
23402
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
23403
  (eval $ac_try) 2>&5
 
23404
  ac_status=$?
 
23405
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23406
  (exit $ac_status); }; } &&
 
23407
         { ac_try='test -s conftest$ac_exeext'
 
23408
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
23409
  (eval $ac_try) 2>&5
 
23410
  ac_status=$?
 
23411
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23412
  (exit $ac_status); }; }; then
 
23413
  have_getnameinfo=yes
 
23414
else
 
23415
  echo "$as_me: failed program was:" >&5
 
23416
sed 's/^/| /' conftest.$ac_ext >&5
 
23417
 
 
23418
have_getnameinfo=no
 
23419
fi
 
23420
rm -f conftest.err conftest.$ac_objext \
 
23421
      conftest$ac_exeext conftest.$ac_ext
 
23422
if test $have_getnameinfo = yes; then
 
23423
        echo "$as_me:$LINENO: result: yes" >&5
 
23424
echo "${ECHO_T}yes" >&6
 
23425
 
 
23426
cat >>confdefs.h <<\_ACEOF
 
23427
#define HAVE_GETNAMEINFO 1
 
23428
_ACEOF
 
23429
 
 
23430
else
 
23431
        echo "$as_me:$LINENO: result: no" >&5
 
23432
echo "${ECHO_T}no" >&6
 
23433
fi
 
23434
 
 
23435
 
 
23436
 
 
23437
 
 
23438
 
 
23439
for ac_func in getipnodebyname getipnodebyaddr gethostbyname2
16886
23440
do
16887
23441
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16888
23442
echo "$as_me:$LINENO: checking for $ac_func" >&5
17018
23572
 
17019
23573
 
17020
23574
 
 
23575
 
 
23576
 
17021
23577
for ac_func in ieee_handler fpsetmask finite isnan isinf res_gethostbyname dlopen \
17022
23578
                pread pwrite writev memmove strerror strerror_r strncasecmp \
17023
 
                gethrtime localtime_r gmtime_r mremap memcpy mallopt \
 
23579
                gethrtime localtime_r gmtime_r mmap mremap memcpy mallopt \
17024
23580
                sbrk _sbrk __sbrk brk _brk __brk \
17025
 
                flockfile fstat strlcpy strlcat setsid posix2time setlocale nl_langinfo
 
23581
                flockfile fstat strlcpy strlcat setsid posix2time setlocale nl_langinfo poll
17026
23582
do
17027
23583
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17028
23584
echo "$as_me:$LINENO: checking for $ac_func" >&5
17123
23679
fi
17124
23680
done
17125
23681
 
 
23682
 
 
23683
echo "$as_me:$LINENO: checking whether posix2time is declared" >&5
 
23684
echo $ECHO_N "checking whether posix2time is declared... $ECHO_C" >&6
 
23685
if test "${ac_cv_have_decl_posix2time+set}" = set; then
 
23686
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
23687
else
 
23688
  cat >conftest.$ac_ext <<_ACEOF
 
23689
/* confdefs.h.  */
 
23690
_ACEOF
 
23691
cat confdefs.h >>conftest.$ac_ext
 
23692
cat >>conftest.$ac_ext <<_ACEOF
 
23693
/* end confdefs.h.  */
 
23694
#include <time.h>
 
23695
 
 
23696
int
 
23697
main ()
 
23698
{
 
23699
#ifndef posix2time
 
23700
  char *p = (char *) posix2time;
 
23701
#endif
 
23702
 
 
23703
  ;
 
23704
  return 0;
 
23705
}
 
23706
_ACEOF
 
23707
rm -f conftest.$ac_objext
 
23708
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
23709
  (eval $ac_compile) 2>conftest.er1
 
23710
  ac_status=$?
 
23711
  grep -v '^ *+' conftest.er1 >conftest.err
 
23712
  rm -f conftest.er1
 
23713
  cat conftest.err >&5
 
23714
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23715
  (exit $ac_status); } &&
 
23716
         { ac_try='test -z "$ac_c_werror_flag"
 
23717
                         || test ! -s conftest.err'
 
23718
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
23719
  (eval $ac_try) 2>&5
 
23720
  ac_status=$?
 
23721
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23722
  (exit $ac_status); }; } &&
 
23723
         { ac_try='test -s conftest.$ac_objext'
 
23724
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
23725
  (eval $ac_try) 2>&5
 
23726
  ac_status=$?
 
23727
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
23728
  (exit $ac_status); }; }; then
 
23729
  ac_cv_have_decl_posix2time=yes
 
23730
else
 
23731
  echo "$as_me: failed program was:" >&5
 
23732
sed 's/^/| /' conftest.$ac_ext >&5
 
23733
 
 
23734
ac_cv_have_decl_posix2time=no
 
23735
fi
 
23736
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
23737
fi
 
23738
echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix2time" >&5
 
23739
echo "${ECHO_T}$ac_cv_have_decl_posix2time" >&6
 
23740
if test $ac_cv_have_decl_posix2time = yes; then
 
23741
 
 
23742
cat >>confdefs.h <<_ACEOF
 
23743
#define HAVE_DECL_POSIX2TIME 1
 
23744
_ACEOF
 
23745
 
 
23746
 
 
23747
else
 
23748
  cat >>confdefs.h <<_ACEOF
 
23749
#define HAVE_DECL_POSIX2TIME 0
 
23750
_ACEOF
 
23751
 
 
23752
 
 
23753
fi
 
23754
 
 
23755
 
 
23756
 
17126
23757
if test "X$host" = "Xwin32"; then
17127
23758
        ac_cv_func_setvbuf_reversed=yes
17128
23759
fi
18025
24656
 
18026
24657
 
18027
24658
 
18028
 
 
18029
 
for ac_header in stdlib.h unistd.h
18030
 
do
18031
 
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18032
 
if eval "test \"\${$as_ac_Header+set}\" = set"; then
18033
 
  echo "$as_me:$LINENO: checking for $ac_header" >&5
18034
 
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18035
 
if eval "test \"\${$as_ac_Header+set}\" = set"; then
18036
 
  echo $ECHO_N "(cached) $ECHO_C" >&6
18037
 
fi
18038
 
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18039
 
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18040
 
else
18041
 
  # Is the header compilable?
18042
 
echo "$as_me:$LINENO: checking $ac_header usability" >&5
18043
 
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18044
 
cat >conftest.$ac_ext <<_ACEOF
18045
 
/* confdefs.h.  */
18046
 
_ACEOF
18047
 
cat confdefs.h >>conftest.$ac_ext
18048
 
cat >>conftest.$ac_ext <<_ACEOF
18049
 
/* end confdefs.h.  */
18050
 
$ac_includes_default
18051
 
#include <$ac_header>
18052
 
_ACEOF
18053
 
rm -f conftest.$ac_objext
18054
 
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18055
 
  (eval $ac_compile) 2>conftest.er1
18056
 
  ac_status=$?
18057
 
  grep -v '^ *+' conftest.er1 >conftest.err
18058
 
  rm -f conftest.er1
18059
 
  cat conftest.err >&5
18060
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18061
 
  (exit $ac_status); } &&
18062
 
         { ac_try='test -z "$ac_c_werror_flag"
18063
 
                         || test ! -s conftest.err'
18064
 
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18065
 
  (eval $ac_try) 2>&5
18066
 
  ac_status=$?
18067
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18068
 
  (exit $ac_status); }; } &&
18069
 
         { ac_try='test -s conftest.$ac_objext'
18070
 
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18071
 
  (eval $ac_try) 2>&5
18072
 
  ac_status=$?
18073
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18074
 
  (exit $ac_status); }; }; then
18075
 
  ac_header_compiler=yes
18076
 
else
18077
 
  echo "$as_me: failed program was:" >&5
18078
 
sed 's/^/| /' conftest.$ac_ext >&5
18079
 
 
18080
 
ac_header_compiler=no
18081
 
fi
18082
 
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18083
 
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18084
 
echo "${ECHO_T}$ac_header_compiler" >&6
18085
 
 
18086
 
# Is the header present?
18087
 
echo "$as_me:$LINENO: checking $ac_header presence" >&5
18088
 
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18089
 
cat >conftest.$ac_ext <<_ACEOF
18090
 
/* confdefs.h.  */
18091
 
_ACEOF
18092
 
cat confdefs.h >>conftest.$ac_ext
18093
 
cat >>conftest.$ac_ext <<_ACEOF
18094
 
/* end confdefs.h.  */
18095
 
#include <$ac_header>
18096
 
_ACEOF
18097
 
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18098
 
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18099
 
  ac_status=$?
18100
 
  grep -v '^ *+' conftest.er1 >conftest.err
18101
 
  rm -f conftest.er1
18102
 
  cat conftest.err >&5
18103
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18104
 
  (exit $ac_status); } >/dev/null; then
18105
 
  if test -s conftest.err; then
18106
 
    ac_cpp_err=$ac_c_preproc_warn_flag
18107
 
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18108
 
  else
18109
 
    ac_cpp_err=
18110
 
  fi
18111
 
else
18112
 
  ac_cpp_err=yes
18113
 
fi
18114
 
if test -z "$ac_cpp_err"; then
18115
 
  ac_header_preproc=yes
18116
 
else
18117
 
  echo "$as_me: failed program was:" >&5
18118
 
sed 's/^/| /' conftest.$ac_ext >&5
18119
 
 
18120
 
  ac_header_preproc=no
18121
 
fi
18122
 
rm -f conftest.err conftest.$ac_ext
18123
 
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18124
 
echo "${ECHO_T}$ac_header_preproc" >&6
18125
 
 
18126
 
# So?  What about this header?
18127
 
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18128
 
  yes:no: )
18129
 
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18130
 
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18131
 
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18132
 
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18133
 
    ac_header_preproc=yes
18134
 
    ;;
18135
 
  no:yes:* )
18136
 
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18137
 
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18138
 
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18139
 
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18140
 
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18141
 
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18142
 
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18143
 
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18144
 
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18145
 
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18146
 
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18147
 
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18148
 
    (
18149
 
      cat <<\_ASBOX
18150
 
## ------------------------------------------ ##
18151
 
## Report this to the AC_PACKAGE_NAME lists.  ##
18152
 
## ------------------------------------------ ##
18153
 
_ASBOX
18154
 
    ) |
18155
 
      sed "s/^/$as_me: WARNING:     /" >&2
18156
 
    ;;
18157
 
esac
18158
 
echo "$as_me:$LINENO: checking for $ac_header" >&5
18159
 
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18160
 
if eval "test \"\${$as_ac_Header+set}\" = set"; then
18161
 
  echo $ECHO_N "(cached) $ECHO_C" >&6
18162
 
else
18163
 
  eval "$as_ac_Header=\$ac_header_preproc"
18164
 
fi
18165
 
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18166
 
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18167
 
 
18168
 
fi
18169
 
if test `eval echo '${'$as_ac_Header'}'` = yes; then
18170
 
  cat >>confdefs.h <<_ACEOF
18171
 
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18172
 
_ACEOF
18173
 
 
18174
 
fi
18175
 
 
18176
 
done
18177
 
 
18178
 
 
18179
 
for ac_func in getpagesize
18180
 
do
18181
 
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18182
 
echo "$as_me:$LINENO: checking for $ac_func" >&5
18183
 
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18184
 
if eval "test \"\${$as_ac_var+set}\" = set"; then
18185
 
  echo $ECHO_N "(cached) $ECHO_C" >&6
18186
 
else
18187
 
  cat >conftest.$ac_ext <<_ACEOF
18188
 
/* confdefs.h.  */
18189
 
_ACEOF
18190
 
cat confdefs.h >>conftest.$ac_ext
18191
 
cat >>conftest.$ac_ext <<_ACEOF
18192
 
/* end confdefs.h.  */
18193
 
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18194
 
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
18195
 
#define $ac_func innocuous_$ac_func
18196
 
 
18197
 
/* System header to define __stub macros and hopefully few prototypes,
18198
 
    which can conflict with char $ac_func (); below.
18199
 
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18200
 
    <limits.h> exists even on freestanding compilers.  */
18201
 
 
18202
 
#ifdef __STDC__
18203
 
# include <limits.h>
18204
 
#else
18205
 
# include <assert.h>
18206
 
#endif
18207
 
 
18208
 
#undef $ac_func
18209
 
 
18210
 
/* Override any gcc2 internal prototype to avoid an error.  */
18211
 
#ifdef __cplusplus
18212
 
extern "C"
18213
 
{
18214
 
#endif
18215
 
/* We use char because int might match the return type of a gcc2
18216
 
   builtin and then its argument prototype would still apply.  */
18217
 
char $ac_func ();
18218
 
/* The GNU C library defines this for functions which it implements
18219
 
    to always fail with ENOSYS.  Some functions are actually named
18220
 
    something starting with __ and the normal name is an alias.  */
18221
 
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18222
 
choke me
18223
 
#else
18224
 
char (*f) () = $ac_func;
18225
 
#endif
18226
 
#ifdef __cplusplus
18227
 
}
18228
 
#endif
18229
 
 
18230
 
int
18231
 
main ()
18232
 
{
18233
 
return f != $ac_func;
18234
 
  ;
18235
 
  return 0;
18236
 
}
18237
 
_ACEOF
18238
 
rm -f conftest.$ac_objext conftest$ac_exeext
18239
 
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18240
 
  (eval $ac_link) 2>conftest.er1
18241
 
  ac_status=$?
18242
 
  grep -v '^ *+' conftest.er1 >conftest.err
18243
 
  rm -f conftest.er1
18244
 
  cat conftest.err >&5
18245
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18246
 
  (exit $ac_status); } &&
18247
 
         { ac_try='test -z "$ac_c_werror_flag"
18248
 
                         || test ! -s conftest.err'
18249
 
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18250
 
  (eval $ac_try) 2>&5
18251
 
  ac_status=$?
18252
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18253
 
  (exit $ac_status); }; } &&
18254
 
         { ac_try='test -s conftest$ac_exeext'
18255
 
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18256
 
  (eval $ac_try) 2>&5
18257
 
  ac_status=$?
18258
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18259
 
  (exit $ac_status); }; }; then
18260
 
  eval "$as_ac_var=yes"
18261
 
else
18262
 
  echo "$as_me: failed program was:" >&5
18263
 
sed 's/^/| /' conftest.$ac_ext >&5
18264
 
 
18265
 
eval "$as_ac_var=no"
18266
 
fi
18267
 
rm -f conftest.err conftest.$ac_objext \
18268
 
      conftest$ac_exeext conftest.$ac_ext
18269
 
fi
18270
 
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18271
 
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18272
 
if test `eval echo '${'$as_ac_var'}'` = yes; then
18273
 
  cat >>confdefs.h <<_ACEOF
18274
 
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18275
 
_ACEOF
18276
 
 
18277
 
fi
18278
 
done
18279
 
 
18280
 
echo "$as_me:$LINENO: checking for working mmap" >&5
18281
 
echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
18282
 
if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
18283
 
  echo $ECHO_N "(cached) $ECHO_C" >&6
18284
 
else
18285
 
  if test "$cross_compiling" = yes; then
18286
 
  ac_cv_func_mmap_fixed_mapped=no
18287
 
else
18288
 
  cat >conftest.$ac_ext <<_ACEOF
18289
 
/* confdefs.h.  */
18290
 
_ACEOF
18291
 
cat confdefs.h >>conftest.$ac_ext
18292
 
cat >>conftest.$ac_ext <<_ACEOF
18293
 
/* end confdefs.h.  */
18294
 
$ac_includes_default
18295
 
/* malloc might have been renamed as rpl_malloc. */
18296
 
#undef malloc
18297
 
 
18298
 
/* Thanks to Mike Haertel and Jim Avera for this test.
18299
 
   Here is a matrix of mmap possibilities:
18300
 
        mmap private not fixed
18301
 
        mmap private fixed at somewhere currently unmapped
18302
 
        mmap private fixed at somewhere already mapped
18303
 
        mmap shared not fixed
18304
 
        mmap shared fixed at somewhere currently unmapped
18305
 
        mmap shared fixed at somewhere already mapped
18306
 
   For private mappings, we should verify that changes cannot be read()
18307
 
   back from the file, nor mmap's back from the file at a different
18308
 
   address.  (There have been systems where private was not correctly
18309
 
   implemented like the infamous i386 svr4.0, and systems where the
18310
 
   VM page cache was not coherent with the file system buffer cache
18311
 
   like early versions of FreeBSD and possibly contemporary NetBSD.)
18312
 
   For shared mappings, we should conversely verify that changes get
18313
 
   propagated back to all the places they're supposed to be.
18314
 
 
18315
 
   Grep wants private fixed already mapped.
18316
 
   The main things grep needs to know about mmap are:
18317
 
   * does it exist and is it safe to write into the mmap'd area
18318
 
   * how to use it (BSD variants)  */
18319
 
 
18320
 
#include <fcntl.h>
18321
 
#include <sys/mman.h>
18322
 
 
18323
 
#if !STDC_HEADERS && !HAVE_STDLIB_H
18324
 
char *malloc ();
18325
 
#endif
18326
 
 
18327
 
/* This mess was copied from the GNU getpagesize.h.  */
18328
 
#if !HAVE_GETPAGESIZE
18329
 
/* Assume that all systems that can run configure have sys/param.h.  */
18330
 
# if !HAVE_SYS_PARAM_H
18331
 
#  define HAVE_SYS_PARAM_H 1
18332
 
# endif
18333
 
 
18334
 
# ifdef _SC_PAGESIZE
18335
 
#  define getpagesize() sysconf(_SC_PAGESIZE)
18336
 
# else /* no _SC_PAGESIZE */
18337
 
#  if HAVE_SYS_PARAM_H
18338
 
#   include <sys/param.h>
18339
 
#   ifdef EXEC_PAGESIZE
18340
 
#    define getpagesize() EXEC_PAGESIZE
18341
 
#   else /* no EXEC_PAGESIZE */
18342
 
#    ifdef NBPG
18343
 
#     define getpagesize() NBPG * CLSIZE
18344
 
#     ifndef CLSIZE
18345
 
#      define CLSIZE 1
18346
 
#     endif /* no CLSIZE */
18347
 
#    else /* no NBPG */
18348
 
#     ifdef NBPC
18349
 
#      define getpagesize() NBPC
18350
 
#     else /* no NBPC */
18351
 
#      ifdef PAGESIZE
18352
 
#       define getpagesize() PAGESIZE
18353
 
#      endif /* PAGESIZE */
18354
 
#     endif /* no NBPC */
18355
 
#    endif /* no NBPG */
18356
 
#   endif /* no EXEC_PAGESIZE */
18357
 
#  else /* no HAVE_SYS_PARAM_H */
18358
 
#   define getpagesize() 8192   /* punt totally */
18359
 
#  endif /* no HAVE_SYS_PARAM_H */
18360
 
# endif /* no _SC_PAGESIZE */
18361
 
 
18362
 
#endif /* no HAVE_GETPAGESIZE */
18363
 
 
18364
 
int
18365
 
main ()
18366
 
{
18367
 
  char *data, *data2, *data3;
18368
 
  int i, pagesize;
18369
 
  int fd;
18370
 
 
18371
 
  pagesize = getpagesize ();
18372
 
 
18373
 
  /* First, make a file with some known garbage in it. */
18374
 
  data = (char *) malloc (pagesize);
18375
 
  if (!data)
18376
 
    exit (1);
18377
 
  for (i = 0; i < pagesize; ++i)
18378
 
    *(data + i) = rand ();
18379
 
  umask (0);
18380
 
  fd = creat ("conftest.mmap", 0600);
18381
 
  if (fd < 0)
18382
 
    exit (1);
18383
 
  if (write (fd, data, pagesize) != pagesize)
18384
 
    exit (1);
18385
 
  close (fd);
18386
 
 
18387
 
  /* Next, try to mmap the file at a fixed address which already has
18388
 
     something else allocated at it.  If we can, also make sure that
18389
 
     we see the same garbage.  */
18390
 
  fd = open ("conftest.mmap", O_RDWR);
18391
 
  if (fd < 0)
18392
 
    exit (1);
18393
 
  data2 = (char *) malloc (2 * pagesize);
18394
 
  if (!data2)
18395
 
    exit (1);
18396
 
  data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
18397
 
  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
18398
 
                     MAP_PRIVATE | MAP_FIXED, fd, 0L))
18399
 
    exit (1);
18400
 
  for (i = 0; i < pagesize; ++i)
18401
 
    if (*(data + i) != *(data2 + i))
18402
 
      exit (1);
18403
 
 
18404
 
  /* Finally, make sure that changes to the mapped area do not
18405
 
     percolate back to the file as seen by read().  (This is a bug on
18406
 
     some variants of i386 svr4.0.)  */
18407
 
  for (i = 0; i < pagesize; ++i)
18408
 
    *(data2 + i) = *(data2 + i) + 1;
18409
 
  data3 = (char *) malloc (pagesize);
18410
 
  if (!data3)
18411
 
    exit (1);
18412
 
  if (read (fd, data3, pagesize) != pagesize)
18413
 
    exit (1);
18414
 
  for (i = 0; i < pagesize; ++i)
18415
 
    if (*(data + i) != *(data3 + i))
18416
 
      exit (1);
18417
 
  close (fd);
18418
 
  exit (0);
18419
 
}
18420
 
_ACEOF
18421
 
rm -f conftest$ac_exeext
18422
 
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18423
 
  (eval $ac_link) 2>&5
18424
 
  ac_status=$?
18425
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18426
 
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18427
 
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18428
 
  (eval $ac_try) 2>&5
18429
 
  ac_status=$?
18430
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
18431
 
  (exit $ac_status); }; }; then
18432
 
  ac_cv_func_mmap_fixed_mapped=yes
18433
 
else
18434
 
  echo "$as_me: program exited with status $ac_status" >&5
18435
 
echo "$as_me: failed program was:" >&5
18436
 
sed 's/^/| /' conftest.$ac_ext >&5
18437
 
 
18438
 
( exit $ac_status )
18439
 
ac_cv_func_mmap_fixed_mapped=no
18440
 
fi
18441
 
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18442
 
fi
18443
 
fi
18444
 
echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
18445
 
echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
18446
 
if test $ac_cv_func_mmap_fixed_mapped = yes; then
18447
 
 
18448
 
cat >>confdefs.h <<\_ACEOF
18449
 
#define HAVE_MMAP 1
18450
 
_ACEOF
18451
 
 
18452
 
fi
18453
 
rm -f conftest.mmap
18454
 
 
18455
 
 
18456
24659
echo "$as_me:$LINENO: checking for conflicting declaration of fread" >&5
18457
24660
echo $ECHO_N "checking for conflicting declaration of fread... $ECHO_C" >&6
18458
24661
if test "${ac_cv_func_decl_fread+set}" = set; then
18750
24953
 
18751
24954
 
18752
24955
 
 
24956
for ac_func in fdatasync
 
24957
do
 
24958
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 
24959
echo "$as_me:$LINENO: checking for $ac_func" >&5
 
24960
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 
24961
if eval "test \"\${$as_ac_var+set}\" = set"; then
 
24962
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
24963
else
 
24964
  cat >conftest.$ac_ext <<_ACEOF
 
24965
/* confdefs.h.  */
 
24966
_ACEOF
 
24967
cat confdefs.h >>conftest.$ac_ext
 
24968
cat >>conftest.$ac_ext <<_ACEOF
 
24969
/* end confdefs.h.  */
 
24970
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 
24971
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 
24972
#define $ac_func innocuous_$ac_func
 
24973
 
 
24974
/* System header to define __stub macros and hopefully few prototypes,
 
24975
    which can conflict with char $ac_func (); below.
 
24976
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 
24977
    <limits.h> exists even on freestanding compilers.  */
 
24978
 
 
24979
#ifdef __STDC__
 
24980
# include <limits.h>
 
24981
#else
 
24982
# include <assert.h>
 
24983
#endif
 
24984
 
 
24985
#undef $ac_func
 
24986
 
 
24987
/* Override any gcc2 internal prototype to avoid an error.  */
 
24988
#ifdef __cplusplus
 
24989
extern "C"
 
24990
{
 
24991
#endif
 
24992
/* We use char because int might match the return type of a gcc2
 
24993
   builtin and then its argument prototype would still apply.  */
 
24994
char $ac_func ();
 
24995
/* The GNU C library defines this for functions which it implements
 
24996
    to always fail with ENOSYS.  Some functions are actually named
 
24997
    something starting with __ and the normal name is an alias.  */
 
24998
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 
24999
choke me
 
25000
#else
 
25001
char (*f) () = $ac_func;
 
25002
#endif
 
25003
#ifdef __cplusplus
 
25004
}
 
25005
#endif
 
25006
 
 
25007
int
 
25008
main ()
 
25009
{
 
25010
return f != $ac_func;
 
25011
  ;
 
25012
  return 0;
 
25013
}
 
25014
_ACEOF
 
25015
rm -f conftest.$ac_objext conftest$ac_exeext
 
25016
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
25017
  (eval $ac_link) 2>conftest.er1
 
25018
  ac_status=$?
 
25019
  grep -v '^ *+' conftest.er1 >conftest.err
 
25020
  rm -f conftest.er1
 
25021
  cat conftest.err >&5
 
25022
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25023
  (exit $ac_status); } &&
 
25024
         { ac_try='test -z "$ac_c_werror_flag"
 
25025
                         || test ! -s conftest.err'
 
25026
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25027
  (eval $ac_try) 2>&5
 
25028
  ac_status=$?
 
25029
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25030
  (exit $ac_status); }; } &&
 
25031
         { ac_try='test -s conftest$ac_exeext'
 
25032
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25033
  (eval $ac_try) 2>&5
 
25034
  ac_status=$?
 
25035
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25036
  (exit $ac_status); }; }; then
 
25037
  eval "$as_ac_var=yes"
 
25038
else
 
25039
  echo "$as_me: failed program was:" >&5
 
25040
sed 's/^/| /' conftest.$ac_ext >&5
 
25041
 
 
25042
eval "$as_ac_var=no"
 
25043
fi
 
25044
rm -f conftest.err conftest.$ac_objext \
 
25045
      conftest$ac_exeext conftest.$ac_ext
 
25046
fi
 
25047
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
 
25048
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 
25049
if test `eval echo '${'$as_ac_var'}'` = yes; then
 
25050
  cat >>confdefs.h <<_ACEOF
 
25051
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 
25052
_ACEOF
 
25053
 
 
25054
fi
 
25055
done
 
25056
 
 
25057
 
 
25058
echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
 
25059
echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
 
25060
if test "${ac_cv_search_fdatasync+set}" = set; then
 
25061
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
25062
else
 
25063
  ac_func_search_save_LIBS=$LIBS
 
25064
ac_cv_search_fdatasync=no
 
25065
cat >conftest.$ac_ext <<_ACEOF
 
25066
/* confdefs.h.  */
 
25067
_ACEOF
 
25068
cat confdefs.h >>conftest.$ac_ext
 
25069
cat >>conftest.$ac_ext <<_ACEOF
 
25070
/* end confdefs.h.  */
 
25071
 
 
25072
/* Override any gcc2 internal prototype to avoid an error.  */
 
25073
#ifdef __cplusplus
 
25074
extern "C"
 
25075
#endif
 
25076
/* We use char because int might match the return type of a gcc2
 
25077
   builtin and then its argument prototype would still apply.  */
 
25078
char fdatasync ();
 
25079
int
 
25080
main ()
 
25081
{
 
25082
fdatasync ();
 
25083
  ;
 
25084
  return 0;
 
25085
}
 
25086
_ACEOF
 
25087
rm -f conftest.$ac_objext conftest$ac_exeext
 
25088
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
25089
  (eval $ac_link) 2>conftest.er1
 
25090
  ac_status=$?
 
25091
  grep -v '^ *+' conftest.er1 >conftest.err
 
25092
  rm -f conftest.er1
 
25093
  cat conftest.err >&5
 
25094
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25095
  (exit $ac_status); } &&
 
25096
         { ac_try='test -z "$ac_c_werror_flag"
 
25097
                         || test ! -s conftest.err'
 
25098
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25099
  (eval $ac_try) 2>&5
 
25100
  ac_status=$?
 
25101
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25102
  (exit $ac_status); }; } &&
 
25103
         { ac_try='test -s conftest$ac_exeext'
 
25104
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25105
  (eval $ac_try) 2>&5
 
25106
  ac_status=$?
 
25107
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25108
  (exit $ac_status); }; }; then
 
25109
  ac_cv_search_fdatasync="none required"
 
25110
else
 
25111
  echo "$as_me: failed program was:" >&5
 
25112
sed 's/^/| /' conftest.$ac_ext >&5
 
25113
 
 
25114
fi
 
25115
rm -f conftest.err conftest.$ac_objext \
 
25116
      conftest$ac_exeext conftest.$ac_ext
 
25117
if test "$ac_cv_search_fdatasync" = no; then
 
25118
  for ac_lib in rt; do
 
25119
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
 
25120
    cat >conftest.$ac_ext <<_ACEOF
 
25121
/* confdefs.h.  */
 
25122
_ACEOF
 
25123
cat confdefs.h >>conftest.$ac_ext
 
25124
cat >>conftest.$ac_ext <<_ACEOF
 
25125
/* end confdefs.h.  */
 
25126
 
 
25127
/* Override any gcc2 internal prototype to avoid an error.  */
 
25128
#ifdef __cplusplus
 
25129
extern "C"
 
25130
#endif
 
25131
/* We use char because int might match the return type of a gcc2
 
25132
   builtin and then its argument prototype would still apply.  */
 
25133
char fdatasync ();
 
25134
int
 
25135
main ()
 
25136
{
 
25137
fdatasync ();
 
25138
  ;
 
25139
  return 0;
 
25140
}
 
25141
_ACEOF
 
25142
rm -f conftest.$ac_objext conftest$ac_exeext
 
25143
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
25144
  (eval $ac_link) 2>conftest.er1
 
25145
  ac_status=$?
 
25146
  grep -v '^ *+' conftest.er1 >conftest.err
 
25147
  rm -f conftest.er1
 
25148
  cat conftest.err >&5
 
25149
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25150
  (exit $ac_status); } &&
 
25151
         { ac_try='test -z "$ac_c_werror_flag"
 
25152
                         || test ! -s conftest.err'
 
25153
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25154
  (eval $ac_try) 2>&5
 
25155
  ac_status=$?
 
25156
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25157
  (exit $ac_status); }; } &&
 
25158
         { ac_try='test -s conftest$ac_exeext'
 
25159
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25160
  (eval $ac_try) 2>&5
 
25161
  ac_status=$?
 
25162
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25163
  (exit $ac_status); }; }; then
 
25164
  ac_cv_search_fdatasync="-l$ac_lib"
 
25165
break
 
25166
else
 
25167
  echo "$as_me: failed program was:" >&5
 
25168
sed 's/^/| /' conftest.$ac_ext >&5
 
25169
 
 
25170
fi
 
25171
rm -f conftest.err conftest.$ac_objext \
 
25172
      conftest$ac_exeext conftest.$ac_ext
 
25173
  done
 
25174
fi
 
25175
LIBS=$ac_func_search_save_LIBS
 
25176
fi
 
25177
echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
 
25178
echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
 
25179
if test "$ac_cv_search_fdatasync" != no; then
 
25180
  test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
 
25181
 
 
25182
fi
 
25183
 
 
25184
 
 
25185
 
 
25186
 
 
25187
 
 
25188
for ac_header in net/if_dl.h ifaddrs.h netpacket/packet.h
 
25189
do
 
25190
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 
25191
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
25192
  echo "$as_me:$LINENO: checking for $ac_header" >&5
 
25193
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 
25194
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
25195
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
25196
fi
 
25197
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
25198
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
25199
else
 
25200
  # Is the header compilable?
 
25201
echo "$as_me:$LINENO: checking $ac_header usability" >&5
 
25202
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
 
25203
cat >conftest.$ac_ext <<_ACEOF
 
25204
/* confdefs.h.  */
 
25205
_ACEOF
 
25206
cat confdefs.h >>conftest.$ac_ext
 
25207
cat >>conftest.$ac_ext <<_ACEOF
 
25208
/* end confdefs.h.  */
 
25209
$ac_includes_default
 
25210
#include <$ac_header>
 
25211
_ACEOF
 
25212
rm -f conftest.$ac_objext
 
25213
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
25214
  (eval $ac_compile) 2>conftest.er1
 
25215
  ac_status=$?
 
25216
  grep -v '^ *+' conftest.er1 >conftest.err
 
25217
  rm -f conftest.er1
 
25218
  cat conftest.err >&5
 
25219
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25220
  (exit $ac_status); } &&
 
25221
         { ac_try='test -z "$ac_c_werror_flag"
 
25222
                         || test ! -s conftest.err'
 
25223
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25224
  (eval $ac_try) 2>&5
 
25225
  ac_status=$?
 
25226
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25227
  (exit $ac_status); }; } &&
 
25228
         { ac_try='test -s conftest.$ac_objext'
 
25229
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25230
  (eval $ac_try) 2>&5
 
25231
  ac_status=$?
 
25232
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25233
  (exit $ac_status); }; }; then
 
25234
  ac_header_compiler=yes
 
25235
else
 
25236
  echo "$as_me: failed program was:" >&5
 
25237
sed 's/^/| /' conftest.$ac_ext >&5
 
25238
 
 
25239
ac_header_compiler=no
 
25240
fi
 
25241
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
25242
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 
25243
echo "${ECHO_T}$ac_header_compiler" >&6
 
25244
 
 
25245
# Is the header present?
 
25246
echo "$as_me:$LINENO: checking $ac_header presence" >&5
 
25247
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
 
25248
cat >conftest.$ac_ext <<_ACEOF
 
25249
/* confdefs.h.  */
 
25250
_ACEOF
 
25251
cat confdefs.h >>conftest.$ac_ext
 
25252
cat >>conftest.$ac_ext <<_ACEOF
 
25253
/* end confdefs.h.  */
 
25254
#include <$ac_header>
 
25255
_ACEOF
 
25256
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
 
25257
  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
 
25258
  ac_status=$?
 
25259
  grep -v '^ *+' conftest.er1 >conftest.err
 
25260
  rm -f conftest.er1
 
25261
  cat conftest.err >&5
 
25262
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25263
  (exit $ac_status); } >/dev/null; then
 
25264
  if test -s conftest.err; then
 
25265
    ac_cpp_err=$ac_c_preproc_warn_flag
 
25266
    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
 
25267
  else
 
25268
    ac_cpp_err=
 
25269
  fi
 
25270
else
 
25271
  ac_cpp_err=yes
 
25272
fi
 
25273
if test -z "$ac_cpp_err"; then
 
25274
  ac_header_preproc=yes
 
25275
else
 
25276
  echo "$as_me: failed program was:" >&5
 
25277
sed 's/^/| /' conftest.$ac_ext >&5
 
25278
 
 
25279
  ac_header_preproc=no
 
25280
fi
 
25281
rm -f conftest.err conftest.$ac_ext
 
25282
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 
25283
echo "${ECHO_T}$ac_header_preproc" >&6
 
25284
 
 
25285
# So?  What about this header?
 
25286
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 
25287
  yes:no: )
 
25288
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
 
25289
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 
25290
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
 
25291
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
 
25292
    ac_header_preproc=yes
 
25293
    ;;
 
25294
  no:yes:* )
 
25295
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
 
25296
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
 
25297
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
 
25298
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
 
25299
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
 
25300
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
 
25301
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
 
25302
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
 
25303
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
 
25304
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
 
25305
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 
25306
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 
25307
    (
 
25308
      cat <<\_ASBOX
 
25309
## ------------------------------------------ ##
 
25310
## Report this to the AC_PACKAGE_NAME lists.  ##
 
25311
## ------------------------------------------ ##
 
25312
_ASBOX
 
25313
    ) |
 
25314
      sed "s/^/$as_me: WARNING:     /" >&2
 
25315
    ;;
 
25316
esac
 
25317
echo "$as_me:$LINENO: checking for $ac_header" >&5
 
25318
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 
25319
if eval "test \"\${$as_ac_Header+set}\" = set"; then
 
25320
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
25321
else
 
25322
  eval "$as_ac_Header=\$ac_header_preproc"
 
25323
fi
 
25324
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 
25325
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
25326
 
 
25327
fi
 
25328
if test `eval echo '${'$as_ac_Header'}'` = yes; then
 
25329
  cat >>confdefs.h <<_ACEOF
 
25330
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 
25331
_ACEOF
 
25332
 
 
25333
fi
 
25334
 
 
25335
done
 
25336
 
 
25337
 
 
25338
for ac_func in getifaddrs
 
25339
do
 
25340
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 
25341
echo "$as_me:$LINENO: checking for $ac_func" >&5
 
25342
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 
25343
if eval "test \"\${$as_ac_var+set}\" = set"; then
 
25344
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
25345
else
 
25346
  cat >conftest.$ac_ext <<_ACEOF
 
25347
/* confdefs.h.  */
 
25348
_ACEOF
 
25349
cat confdefs.h >>conftest.$ac_ext
 
25350
cat >>conftest.$ac_ext <<_ACEOF
 
25351
/* end confdefs.h.  */
 
25352
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 
25353
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
 
25354
#define $ac_func innocuous_$ac_func
 
25355
 
 
25356
/* System header to define __stub macros and hopefully few prototypes,
 
25357
    which can conflict with char $ac_func (); below.
 
25358
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 
25359
    <limits.h> exists even on freestanding compilers.  */
 
25360
 
 
25361
#ifdef __STDC__
 
25362
# include <limits.h>
 
25363
#else
 
25364
# include <assert.h>
 
25365
#endif
 
25366
 
 
25367
#undef $ac_func
 
25368
 
 
25369
/* Override any gcc2 internal prototype to avoid an error.  */
 
25370
#ifdef __cplusplus
 
25371
extern "C"
 
25372
{
 
25373
#endif
 
25374
/* We use char because int might match the return type of a gcc2
 
25375
   builtin and then its argument prototype would still apply.  */
 
25376
char $ac_func ();
 
25377
/* The GNU C library defines this for functions which it implements
 
25378
    to always fail with ENOSYS.  Some functions are actually named
 
25379
    something starting with __ and the normal name is an alias.  */
 
25380
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 
25381
choke me
 
25382
#else
 
25383
char (*f) () = $ac_func;
 
25384
#endif
 
25385
#ifdef __cplusplus
 
25386
}
 
25387
#endif
 
25388
 
 
25389
int
 
25390
main ()
 
25391
{
 
25392
return f != $ac_func;
 
25393
  ;
 
25394
  return 0;
 
25395
}
 
25396
_ACEOF
 
25397
rm -f conftest.$ac_objext conftest$ac_exeext
 
25398
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
25399
  (eval $ac_link) 2>conftest.er1
 
25400
  ac_status=$?
 
25401
  grep -v '^ *+' conftest.er1 >conftest.err
 
25402
  rm -f conftest.er1
 
25403
  cat conftest.err >&5
 
25404
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25405
  (exit $ac_status); } &&
 
25406
         { ac_try='test -z "$ac_c_werror_flag"
 
25407
                         || test ! -s conftest.err'
 
25408
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25409
  (eval $ac_try) 2>&5
 
25410
  ac_status=$?
 
25411
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25412
  (exit $ac_status); }; } &&
 
25413
         { ac_try='test -s conftest$ac_exeext'
 
25414
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25415
  (eval $ac_try) 2>&5
 
25416
  ac_status=$?
 
25417
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25418
  (exit $ac_status); }; }; then
 
25419
  eval "$as_ac_var=yes"
 
25420
else
 
25421
  echo "$as_me: failed program was:" >&5
 
25422
sed 's/^/| /' conftest.$ac_ext >&5
 
25423
 
 
25424
eval "$as_ac_var=no"
 
25425
fi
 
25426
rm -f conftest.err conftest.$ac_objext \
 
25427
      conftest$ac_exeext conftest.$ac_ext
 
25428
fi
 
25429
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
 
25430
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 
25431
if test `eval echo '${'$as_ac_var'}'` = yes; then
 
25432
  cat >>confdefs.h <<_ACEOF
 
25433
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 
25434
_ACEOF
 
25435
 
 
25436
fi
 
25437
done
 
25438
 
 
25439
 
 
25440
 
18753
25441
echo "$as_me:$LINENO: checking for sched_getaffinity/sched_setaffinity" >&5
18754
25442
echo $ECHO_N "checking for sched_getaffinity/sched_setaffinity... $ECHO_C" >&6
18755
25443
cat >conftest.$ac_ext <<_ACEOF
18948
25636
 
18949
25637
fi
18950
25638
 
 
25639
echo "$as_me:$LINENO: checking for cpuset_getaffinity/cpuset_setaffinity" >&5
 
25640
echo $ECHO_N "checking for cpuset_getaffinity/cpuset_setaffinity... $ECHO_C" >&6
 
25641
cat >conftest.$ac_ext <<_ACEOF
 
25642
/* confdefs.h.  */
 
25643
_ACEOF
 
25644
cat confdefs.h >>conftest.$ac_ext
 
25645
cat >>conftest.$ac_ext <<_ACEOF
 
25646
/* end confdefs.h.  */
 
25647
 
 
25648
#include <sys/param.h>
 
25649
#include <sys/cpuset.h>
 
25650
 
 
25651
int
 
25652
main ()
 
25653
{
 
25654
 
 
25655
        int res;
 
25656
        cpuset_t cpuset;
 
25657
        CPU_ZERO(&cpuset);
 
25658
        CPU_SET(1, &cpuset);
 
25659
        res = cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, sizeof(cpuset_t), &cpuset);
 
25660
        res = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, sizeof(cpuset_t), &cpuset);
 
25661
        res = CPU_ISSET(1, &cpuset);
 
25662
        CPU_CLR(1, &cpuset);
 
25663
 
 
25664
  ;
 
25665
  return 0;
 
25666
}
 
25667
_ACEOF
 
25668
rm -f conftest.$ac_objext
 
25669
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
25670
  (eval $ac_compile) 2>conftest.er1
 
25671
  ac_status=$?
 
25672
  grep -v '^ *+' conftest.er1 >conftest.err
 
25673
  rm -f conftest.er1
 
25674
  cat conftest.err >&5
 
25675
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25676
  (exit $ac_status); } &&
 
25677
         { ac_try='test -z "$ac_c_werror_flag"
 
25678
                         || test ! -s conftest.err'
 
25679
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25680
  (eval $ac_try) 2>&5
 
25681
  ac_status=$?
 
25682
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25683
  (exit $ac_status); }; } &&
 
25684
         { ac_try='test -s conftest.$ac_objext'
 
25685
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
25686
  (eval $ac_try) 2>&5
 
25687
  ac_status=$?
 
25688
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
25689
  (exit $ac_status); }; }; then
 
25690
  cpuset_xetaffinity=yes
 
25691
else
 
25692
  echo "$as_me: failed program was:" >&5
 
25693
sed 's/^/| /' conftest.$ac_ext >&5
 
25694
 
 
25695
cpuset_xetaffinity=no
 
25696
fi
 
25697
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
25698
echo "$as_me:$LINENO: result: $cpuset_xetaffinity" >&5
 
25699
echo "${ECHO_T}$cpuset_xetaffinity" >&6
 
25700
if test $cpuset_xetaffinity = yes; then
 
25701
 
 
25702
cat >>confdefs.h <<\_ACEOF
 
25703
#define HAVE_CPUSET_xETAFFINITY 1
 
25704
_ACEOF
 
25705
 
 
25706
fi
18951
25707
 
18952
25708
echo "$as_me:$LINENO: checking for 'end' symbol" >&5
18953
25709
echo $ECHO_N "checking for 'end' symbol... $ECHO_C" >&6
19079
25835
  echo $ECHO_N "(cached) $ECHO_C" >&6
19080
25836
else
19081
25837
  if test "$cross_compiling" = yes; then
19082
 
  if test "x$erl_xcomp_after_morecore_hook" != "x"; then
19083
 
                erts_cv___after_morecore_hook_can_track_malloc=$erl_xcomp_after_morecore_hook
19084
 
        fi
 
25838
 
 
25839
        case X$erl_xcomp_after_morecore_hook in
 
25840
            X) erts_cv___after_morecore_hook_can_track_malloc=cross;;
 
25841
            Xyes|Xno) erts_cv___after_morecore_hook_can_track_malloc=$erl_xcomp_after_morecore_hook;;
 
25842
            *) { { echo "$as_me:$LINENO: error: Bad erl_xcomp_after_morecore_hook value: $erl_xcomp_after_morecore_hook" >&5
 
25843
echo "$as_me: error: Bad erl_xcomp_after_morecore_hook value: $erl_xcomp_after_morecore_hook" >&2;}
 
25844
   { (exit 1); exit 1; }; };;
 
25845
        esac
 
25846
 
 
25847
 
19085
25848
else
19086
25849
  cat >conftest.$ac_ext <<_ACEOF
19087
25850
/* confdefs.h.  */
19242
26005
echo "$as_me:$LINENO: result: $erts_cv___after_morecore_hook_can_track_malloc" >&5
19243
26006
echo "${ECHO_T}$erts_cv___after_morecore_hook_can_track_malloc" >&6
19244
26007
 
19245
 
if test "x$erts_cv___after_morecore_hook_can_track_malloc" = "xyes"; then
19246
 
 
 
26008
case $erts_cv___after_morecore_hook_can_track_malloc in
 
26009
        yes)
19247
26010
cat >>confdefs.h <<\_ACEOF
19248
26011
#define ERTS___AFTER_MORECORE_HOOK_CAN_TRACK_MALLOC 1
19249
26012
_ACEOF
19250
 
 
19251
 
fi
 
26013
;;
 
26014
        cross) { echo "$as_me:$LINENO: WARNING: result no guessed because of cross compilation" >&5
 
26015
echo "$as_me: WARNING: result no guessed because of cross compilation" >&2;};;
 
26016
        *) ;;
 
26017
esac
19252
26018
 
19253
26019
if test "x$ac_cv_func_sbrk" = "xyes"; then
19254
26020
    echo "$as_me:$LINENO: checking types of sbrk()s return value and argument" >&5
19439
26205
  echo $ECHO_N "(cached) $ECHO_C" >&6
19440
26206
else
19441
26207
  if test "$cross_compiling" = yes; then
19442
 
  erts_cv_brk_wrappers_can_track_malloc=no
 
26208
 
 
26209
            case X$erl_xcomp_dlsym_brk_wrappers in
 
26210
                X) erts_cv_brk_wrappers_can_track_malloc=cross;;
 
26211
                Xyes|Xno) erts_cv_brk_wrappers_can_track_malloc=$erl_xcomp_dlsym_brk_wrappers;;
 
26212
                *) { { echo "$as_me:$LINENO: error: Bad erl_xcomp_dlsym_brk_wrappers value: $erl_xcomp_dlsym_brk_wrappers" >&5
 
26213
echo "$as_me: error: Bad erl_xcomp_dlsym_brk_wrappers value: $erl_xcomp_dlsym_brk_wrappers" >&2;}
 
26214
   { (exit 1); exit 1; }; };;
 
26215
            esac
 
26216
 
19443
26217
else
19444
26218
  cat >conftest.$ac_ext <<_ACEOF
19445
26219
/* confdefs.h.  */
19643
26417
fi
19644
26418
echo "$as_me:$LINENO: result: $erts_cv_brk_wrappers_can_track_malloc" >&5
19645
26419
echo "${ECHO_T}$erts_cv_brk_wrappers_can_track_malloc" >&6
19646
 
        if test $erts_cv_brk_wrappers_can_track_malloc = yes; then
 
26420
        case $erts_cv_brk_wrappers_can_track_malloc in
 
26421
            yes)
19647
26422
 
19648
26423
cat >>confdefs.h <<\_ACEOF
19649
26424
#define ERTS_BRK_WRAPPERS_CAN_TRACK_MALLOC 1
19650
26425
_ACEOF
19651
 
 
19652
 
        fi
 
26426
;;
 
26427
            cross)
 
26428
                { echo "$as_me:$LINENO: WARNING: result no guessed because of cross compilation" >&5
 
26429
echo "$as_me: WARNING: result no guessed because of cross compilation" >&2;};;
 
26430
            *) ;;
 
26431
        esac
19653
26432
fi
19654
26433
 
19655
26434
LIBS=$saved_libs
19668
26447
cat >>conftest.$ac_ext <<_ACEOF
19669
26448
/* end confdefs.h.  */
19670
26449
#include <sys/types.h>
 
26450
#ifdef __WIN32__
 
26451
#include <winsock2.h>
 
26452
#include <ws2tcpip.h>
 
26453
#else
19671
26454
#include <netinet/in.h>
 
26455
#endif
19672
26456
int
19673
26457
main ()
19674
26458
{
19718
26502
cat >>conftest.$ac_ext <<_ACEOF
19719
26503
/* end confdefs.h.  */
19720
26504
#include <sys/types.h>
 
26505
#ifdef __WIN32__
 
26506
#include <winsock2.h>
 
26507
#include <ws2tcpip.h>
 
26508
#else
19721
26509
#include <netinet/in.h>
 
26510
#endif
19722
26511
int
19723
26512
main ()
19724
26513
{
19997
26786
                        case $clock_gettime_correction in
19998
26787
                            unknown)
19999
26788
                                if test x$clock_gettime_compiles = xyes; then
20000
 
                                    linux_kernel_vsn_=`uname -r`
20001
 
                                    case $linux_kernel_vsn_ in
20002
 
                                        [0-1].*|2.[0-5]|2.[0-5].*)
20003
 
                                            erl_cv_time_correction=times ;;
20004
 
                                        *)
20005
 
                                            erl_cv_time_correction=clock_gettime;;
20006
 
                                    esac
 
26789
                                    if test X$cross_compiling != Xyes; then
 
26790
                                        linux_kernel_vsn_=`uname -r`
 
26791
                                        case $linux_kernel_vsn_ in
 
26792
                                            [0-1].*|2.[0-5]|2.[0-5].*)
 
26793
                                                erl_cv_time_correction=times ;;
 
26794
                                            *)
 
26795
                                                erl_cv_time_correction=clock_gettime;;
 
26796
                                        esac
 
26797
                                    else
 
26798
                                        case X$erl_xcomp_linux_clock_gettime_correction in
 
26799
                                            X)
 
26800
                                                erl_cv_time_correction=cross;;
 
26801
                                            Xyes|Xno)
 
26802
                                                if test $erl_xcomp_linux_clock_gettime_correction = yes; then
 
26803
                                                    erl_cv_time_correction=clock_gettime
 
26804
                                                else
 
26805
                                                    erl_cv_time_correction=times
 
26806
                                                fi;;
 
26807
                                            *)
 
26808
                                                { { echo "$as_me:$LINENO: error: Bad erl_xcomp_linux_clock_gettime_correction value: $erl_xcomp_linux_clock_gettime_correction" >&5
 
26809
echo "$as_me: error: Bad erl_xcomp_linux_clock_gettime_correction value: $erl_xcomp_linux_clock_gettime_correction" >&2;}
 
26810
   { (exit 1); exit 1; }; };;
 
26811
                                        esac
 
26812
                                    fi
20007
26813
                                else
20008
26814
                                    erl_cv_time_correction=times
20009
26815
                                fi
20023
26829
fi
20024
26830
echo "$as_me:$LINENO: result: $erl_cv_time_correction" >&5
20025
26831
echo "${ECHO_T}$erl_cv_time_correction" >&6
 
26832
 
20026
26833
xrtlib=""
20027
26834
case $erl_cv_time_correction in
20028
26835
  times)
20032
26839
_ACEOF
20033
26840
 
20034
26841
    ;;
20035
 
  clock_gettime)
 
26842
  clock_gettime|cross)
 
26843
    if test $erl_cv_time_correction = cross; then
 
26844
        erl_cv_time_correction=clock_gettime
 
26845
        { echo "$as_me:$LINENO: WARNING: result clock_gettime guessed because of cross compilation" >&5
 
26846
echo "$as_me: WARNING: result clock_gettime guessed because of cross compilation" >&2;}
 
26847
    fi
20036
26848
    xrtlib="-lrt"
20037
26849
 
20038
26850
cat >>confdefs.h <<\_ACEOF
20045
26857
echo "$as_me:$LINENO: checking if gethrvtime works and how to use it" >&5
20046
26858
echo $ECHO_N "checking if gethrvtime works and how to use it... $ECHO_C" >&6
20047
26859
if test "$cross_compiling" = yes; then
20048
 
  erl_gethrvtime=false
 
26860
 
 
26861
case X$erl_xcomp_gethrvtime_procfs_ioctl in
 
26862
    X)
 
26863
        erl_gethrvtime=cross;;
 
26864
    Xyes|Xno)
 
26865
        if test $erl_xcomp_gethrvtime_procfs_ioctl = yes; then
 
26866
            erl_gethrvtime=procfs_ioctl
 
26867
        else
 
26868
            erl_gethrvtime=false
 
26869
        fi;;
 
26870
    *)
 
26871
        { { echo "$as_me:$LINENO: error: Bad erl_xcomp_gethrvtime_procfs_ioctl value: $erl_xcomp_gethrvtime_procfs_ioctl" >&5
 
26872
echo "$as_me: error: Bad erl_xcomp_gethrvtime_procfs_ioctl value: $erl_xcomp_gethrvtime_procfs_ioctl" >&2;}
 
26873
   { (exit 1); exit 1; }; };;
 
26874
esac
 
26875
 
20049
26876
else
20050
26877
  cat >conftest.$ac_ext <<_ACEOF
20051
26878
/* confdefs.h.  */
20125
26952
fi
20126
26953
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20127
26954
fi
 
26955
 
20128
26956
case $erl_gethrvtime in
20129
26957
  procfs_ioctl)
20130
26958
 
20136
26964
echo "${ECHO_T}uses ioctl to procfs" >&6
20137
26965
        ;;
20138
26966
  *)
20139
 
        echo "$as_me:$LINENO: result: not working" >&5
 
26967
        if test $erl_gethrvtime = cross; then
 
26968
            erl_gethrvtime=false
 
26969
            echo "$as_me:$LINENO: result: cross" >&5
 
26970
echo "${ECHO_T}cross" >&6
 
26971
            { echo "$as_me:$LINENO: WARNING: result 'not working' guessed because of cross compilation" >&5
 
26972
echo "$as_me: WARNING: result 'not working' guessed because of cross compilation" >&2;}
 
26973
        else
 
26974
            echo "$as_me:$LINENO: result: not working" >&5
20140
26975
echo "${ECHO_T}not working" >&6
 
26976
        fi
20141
26977
 
20142
26978
 
20143
26979
        echo "$as_me:$LINENO: checking if clock_gettime can be used to get process CPU time" >&5
20145
26981
        save_libs=$LIBS
20146
26982
        LIBS="-lrt"
20147
26983
        if test "$cross_compiling" = yes; then
20148
 
  erl_clock_gettime=false
 
26984
 
 
26985
        case X$erl_xcomp_clock_gettime_cpu_time in
 
26986
            X) erl_clock_gettime=cross;;
 
26987
            Xyes|Xno) erl_clock_gettime=$erl_xcomp_clock_gettime_cpu_time;;
 
26988
            *) { { echo "$as_me:$LINENO: error: Bad erl_xcomp_clock_gettime_cpu_time value: $erl_xcomp_clock_gettime_cpu_time" >&5
 
26989
echo "$as_me: error: Bad erl_xcomp_clock_gettime_cpu_time value: $erl_xcomp_clock_gettime_cpu_time" >&2;}
 
26990
   { (exit 1); exit 1; }; };;
 
26991
        esac
 
26992
 
20149
26993
else
20150
26994
  cat >conftest.$ac_ext <<_ACEOF
20151
26995
/* confdefs.h.  */
20189
27033
  ac_status=$?
20190
27034
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
20191
27035
  (exit $ac_status); }; }; then
20192
 
  erl_clock_gettime=true
 
27036
  erl_clock_gettime=yes
20193
27037
else
20194
27038
  echo "$as_me: program exited with status $ac_status" >&5
20195
27039
echo "$as_me: failed program was:" >&5
20196
27040
sed 's/^/| /' conftest.$ac_ext >&5
20197
27041
 
20198
27042
( exit $ac_status )
20199
 
erl_clock_gettime=false
 
27043
erl_clock_gettime=no
20200
27044
fi
20201
27045
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20202
27046
fi
20203
27047
        LIBS=$save_libs
20204
27048
        case $host_os in
20205
27049
                linux*)
20206
 
                        echo "$as_me:$LINENO: result: not stable, disabled" >&5
20207
 
echo "${ECHO_T}not stable, disabled" >&6
 
27050
                        echo "$as_me:$LINENO: result: no; not stable" >&5
 
27051
echo "${ECHO_T}no; not stable" >&6
20208
27052
                        LIBRT=$xrtlib
20209
27053
                        ;;
20210
27054
                *)
 
27055
                        echo "$as_me:$LINENO: result: $erl_clock_gettime" >&5
 
27056
echo "${ECHO_T}$erl_clock_gettime" >&6
20211
27057
                        case $erl_clock_gettime in
20212
 
                                true)
 
27058
                                yes)
20213
27059
 
20214
27060
cat >>confdefs.h <<\_ACEOF
20215
27061
#define HAVE_CLOCK_GETTIME
20216
27062
_ACEOF
20217
27063
 
20218
 
                                        echo "$as_me:$LINENO: result: using clock_gettime" >&5
20219
 
echo "${ECHO_T}using clock_gettime" >&6
20220
27064
                                        LIBRT=-lrt
20221
27065
                                        ;;
 
27066
                                cross)
 
27067
                                        erl_clock_gettime=no
 
27068
                                        { echo "$as_me:$LINENO: WARNING: result no guessed because of cross compilation" >&5
 
27069
echo "$as_me: WARNING: result no guessed because of cross compilation" >&2;}
 
27070
                                        LIBRT=$xrtlib
 
27071
                                        ;;
20222
27072
                                *)
20223
 
                                        echo "$as_me:$LINENO: result: not working" >&5
20224
 
echo "${ECHO_T}not working" >&6
20225
27073
                                        LIBRT=$xrtlib
20226
27074
                                        ;;
20227
27075
                        esac
20266
27114
echo "${ECHO_T}no" >&6
20267
27115
fi
20268
27116
 
20269
 
if test X${enable_hipe} != Xno; then
 
27117
if test "$cross_compiling" != "yes" && test X${enable_hipe} != Xno; then
20270
27118
  if test -z "$M4"; then
20271
27119
        enable_hipe=no
20272
27120
        { echo "$as_me:$LINENO: HiPE disabled as no valid m4 is found in PATH" >&5
20273
27121
echo "$as_me: HiPE disabled as no valid m4 is found in PATH" >&6;}
20274
27122
  else
20275
27123
        case "$ARCH-$OPSYS" in
20276
 
            x86-linux|amd64-linux|ppc-linux|ppc-darwin|arm-linux|amd64-freebsd|x86-freebsd|x86-sol2|amd64-sol2|ultrasparc-linux)
 
27124
            x86-linux|amd64-linux|x86-darwin*|amd64-darwin*|ppc-linux|ppc-darwin|arm-linux|amd64-freebsd|x86-freebsd|x86-sol2|amd64-sol2|ultrasparc-linux)
20277
27125
                enable_hipe=yes
20278
27126
                ;;
20279
27127
        esac
20280
27128
  fi
20281
27129
fi
 
27130
 
 
27131
case $ARCH-$OPSYS in
 
27132
        amd64-darwin*|x86-darwin*)
 
27133
                echo "$as_me:$LINENO: checking For modern (leopard) style mcontext_t" >&5
 
27134
echo $ECHO_N "checking For modern (leopard) style mcontext_t... $ECHO_C" >&6
 
27135
                cat >conftest.$ac_ext <<_ACEOF
 
27136
/* confdefs.h.  */
 
27137
_ACEOF
 
27138
cat confdefs.h >>conftest.$ac_ext
 
27139
cat >>conftest.$ac_ext <<_ACEOF
 
27140
/* end confdefs.h.  */
 
27141
 
 
27142
                                #include <stdlib.h>
 
27143
                                #include <sys/types.h>
 
27144
                                #include <unistd.h>
 
27145
                                #include <mach/mach.h>
 
27146
                                #include <pthread.h>
 
27147
                                #include <machine/signal.h>
 
27148
                                #include <ucontext.h>
 
27149
 
 
27150
int
 
27151
main ()
 
27152
{
 
27153
 
 
27154
                                #if defined(__APPLE__) && defined(__MACH__) && !defined(__DARWIN__)
 
27155
                                #define __DARWIN__ 1
 
27156
                                #endif
 
27157
 
 
27158
                                #ifndef __DARWIN__
 
27159
                                #error inpossible
 
27160
                                #else
 
27161
 
 
27162
                                mcontext_t mc = NULL;
 
27163
                                int x = mc->__fs.__fpu_mxcsr;
 
27164
 
 
27165
                                #endif
 
27166
 
 
27167
  ;
 
27168
  return 0;
 
27169
}
 
27170
_ACEOF
 
27171
rm -f conftest.$ac_objext
 
27172
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
27173
  (eval $ac_compile) 2>conftest.er1
 
27174
  ac_status=$?
 
27175
  grep -v '^ *+' conftest.er1 >conftest.err
 
27176
  rm -f conftest.er1
 
27177
  cat conftest.err >&5
 
27178
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27179
  (exit $ac_status); } &&
 
27180
         { ac_try='test -z "$ac_c_werror_flag"
 
27181
                         || test ! -s conftest.err'
 
27182
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
27183
  (eval $ac_try) 2>&5
 
27184
  ac_status=$?
 
27185
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27186
  (exit $ac_status); }; } &&
 
27187
         { ac_try='test -s conftest.$ac_objext'
 
27188
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
27189
  (eval $ac_try) 2>&5
 
27190
  ac_status=$?
 
27191
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
27192
  (exit $ac_status); }; }; then
 
27193
  darwin_mcontext_leopard=yes
 
27194
else
 
27195
  echo "$as_me: failed program was:" >&5
 
27196
sed 's/^/| /' conftest.$ac_ext >&5
 
27197
 
 
27198
darwin_mcontext_leopard=no
 
27199
fi
 
27200
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
27201
                                if test X"$darwin_mcontext_leopard" = X"yes"; then
 
27202
 
 
27203
cat >>confdefs.h <<\_ACEOF
 
27204
#define DARWIN_MODERN_MCONTEXT
 
27205
_ACEOF
 
27206
 
 
27207
                                   echo "$as_me:$LINENO: result: yes" >&5
 
27208
echo "${ECHO_T}yes" >&6
 
27209
                                else
 
27210
                                   echo "$as_me:$LINENO: result: no" >&5
 
27211
echo "${ECHO_T}no" >&6
 
27212
                                fi
 
27213
                ;;
 
27214
        *)
 
27215
                darwin_mcontext_leopard=no
 
27216
                ;;
 
27217
esac
20282
27218
if test X${enable_fp_exceptions} = Xauto ; then
20283
27219
   if test X${enable_hipe} = Xyes; then
20284
27220
      enable_fp_exceptions=yes
20303
27239
 
20304
27240
 
20305
27241
    if test "$cross_compiling" = yes; then
20306
 
  erl_ok=unreliable
 
27242
 
 
27243
case X$erl_xcomp_reliable_fpe in
 
27244
    X) erl_ok=cross;;
 
27245
    Xyes|Xno) erl_ok=$erl_xcomp_reliable_fpe;;
 
27246
    *) { { echo "$as_me:$LINENO: error: Bad erl_xcomp_reliable_fpe value: $erl_xcomp_reliable_fpe" >&5
 
27247
echo "$as_me: error: Bad erl_xcomp_reliable_fpe value: $erl_xcomp_reliable_fpe" >&2;}
 
27248
   { (exit 1); exit 1; }; };;
 
27249
esac
 
27250
 
20307
27251
else
20308
27252
  cat >conftest.$ac_ext <<_ACEOF
20309
27253
/* confdefs.h.  */
20623
27567
 * Implement SIGFPE handler based on CPU/OS combination
20624
27568
 */
20625
27569
 
20626
 
#if (defined(__linux__) && (defined(__i386__) || defined(__x86_64__) || defined(__sparc__) || defined(__powerpc__))) || (defined(__DARWIN__) && (defined(__i386__) || defined(__x86_64__) || defined(__ppc__))) || (defined(__FreeBSD__) && (defined(__i386__) || defined(__x86_64__))) || (defined(__OpenBSD__) && defined(__x86_64__)) || (defined(__sun__) && defined(__x86_64__))
 
27570
#if (defined(__linux__) && (defined(__i386__) || defined(__x86_64__) || defined(__sparc__) || defined(__powerpc__))) || (defined(__DARWIN__) && (defined(__i386__) || defined(__x86_64__) || defined(__ppc__))) || (defined(__FreeBSD__) && (defined(__i386__) || defined(__x86_64__))) || ((defined(__OpenBSD__) || defined(__NetBSD__)) && defined(__x86_64__)) || (defined(__sun__) && defined(__x86_64__))
20627
27571
 
20628
27572
#if defined(__linux__) && defined(__i386__)
20629
27573
#if !defined(X86_FXSR_MAGIC)
20683
27627
    regs[PT_FPSCR] = 0x80|0x40|0x10;    /* VE, OE, ZE; not UE or XE */
20684
27628
#endif
20685
27629
#elif defined(__DARWIN__)
 
27630
#if defined(DARWIN_MODERN_MCONTEXT)
20686
27631
#if defined(__x86_64__)
20687
27632
    mcontext_t mc = uc->uc_mcontext;
20688
27633
    struct __darwin_x86_float_state64 *fpstate = &mc->__fs;
20698
27643
    mc->ss.srr0 += 4;
20699
27644
    mc->fs.fpscr = 0x80|0x40|0x10;
20700
27645
#endif
 
27646
#else
 
27647
#if defined(__x86_64__)
 
27648
    mcontext_t mc = uc->uc_mcontext;
 
27649
    struct x86_float_state64_t *fpstate = &mc->fs;
 
27650
    fpstate->fpu_mxcsr = 0x1F80;
 
27651
    *(unsigned short *)&fpstate->fpu_fsw &= ~0xFF;
 
27652
#elif defined(__i386__)
 
27653
    mcontext_t mc = uc->uc_mcontext;
 
27654
    x86_float_state32_t *fpstate = &mc->fs;
 
27655
    fpstate->fpu_mxcsr = 0x1F80;
 
27656
    *(unsigned short *)&fpstate->fpu_fsw &= ~0xFF;
 
27657
#elif defined(__ppc__)
 
27658
    mcontext_t mc = uc->uc_mcontext;
 
27659
    mc->ss.srr0 += 4;
 
27660
    mc->fs.fpscr = 0x80|0x40|0x10;
 
27661
#endif
 
27662
#endif
20701
27663
#elif defined(__FreeBSD__) && defined(__x86_64__)
20702
27664
    mcontext_t *mc = &uc->uc_mcontext;
20703
27665
    struct savefpu *savefpu = (struct savefpu*)&mc->mc_fpstate;
20719
27681
    struct fxsave64 *fxsave = uc->sc_fpstate;
20720
27682
    fxsave->fx_mxcsr = 0x1F80;
20721
27683
    fxsave->fx_fsw &= ~0xFF;
 
27684
#elif defined(__NetBSD__) && defined(__x86_64__)
 
27685
    mcontext_t *mc = &uc->uc_mcontext;
 
27686
    struct fxsave64 *fxsave = (struct fxsave64 *)&mc->__fpregs;
 
27687
    fxsave->fx_mxcsr = 0x1F80;
 
27688
    fxsave->fx_fsw &= ~0xFF;
20722
27689
#elif defined(__sun__) && defined(__x86_64__)
20723
27690
    mcontext_t *mc = &uc->uc_mcontext;
20724
27691
    struct fpchip_state *fpstate = &mc->fpregs.fp_reg_set.fpchip_state;
20805
27772
  ac_status=$?
20806
27773
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
20807
27774
  (exit $ac_status); }; }; then
20808
 
  erl_ok=reliable
 
27775
  erl_ok=yes
20809
27776
else
20810
27777
  echo "$as_me: program exited with status $ac_status" >&5
20811
27778
echo "$as_me: failed program was:" >&5
20812
27779
sed 's/^/| /' conftest.$ac_ext >&5
20813
27780
 
20814
27781
( exit $ac_status )
20815
 
erl_ok=unreliable
 
27782
erl_ok=no
20816
27783
fi
20817
27784
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20818
27785
fi
20819
 
    if test $erl_ok = unreliable; then
20820
 
 
20821
 
cat >>confdefs.h <<\_ACEOF
20822
 
#define NO_FPE_SIGNALS
20823
 
_ACEOF
20824
 
 
20825
 
        echo "$as_me:$LINENO: result: unreliable; testing in software instead" >&5
20826
 
echo "${ECHO_T}unreliable; testing in software instead" >&6
20827
 
        FPE=unreliable
20828
 
    else
 
27786
 
 
27787
    if test $erl_ok = yes; then
 
27788
        FPE=reliable
20829
27789
        echo "$as_me:$LINENO: result: reliable" >&5
20830
27790
echo "${ECHO_T}reliable" >&6
20831
 
        FPE=reliable
 
27791
    else
 
27792
        FPE=unreliable
 
27793
        echo "$as_me:$LINENO: result: unreliable; testing in software instead" >&5
 
27794
echo "${ECHO_T}unreliable; testing in software instead" >&6
 
27795
 
 
27796
cat >>confdefs.h <<\_ACEOF
 
27797
#define NO_FPE_SIGNALS
 
27798
_ACEOF
 
27799
 
 
27800
        if test $erl_ok = cross; then
 
27801
            { echo "$as_me:$LINENO: WARNING: result unreliable guessed because of cross compilation" >&5
 
27802
echo "$as_me: WARNING: result unreliable guessed because of cross compilation" >&2;}
 
27803
        fi
20832
27804
    fi
20833
27805
fi
20834
27806
 
20835
 
case $ARCH-$OPSYS in
20836
 
        amd64-darwin*|x86-darwin*)
20837
 
                echo "$as_me:$LINENO: checking For modern (leopard) style mcontext_t" >&5
20838
 
echo $ECHO_N "checking For modern (leopard) style mcontext_t... $ECHO_C" >&6
20839
 
                cat >conftest.$ac_ext <<_ACEOF
20840
 
/* confdefs.h.  */
20841
 
_ACEOF
20842
 
cat confdefs.h >>conftest.$ac_ext
20843
 
cat >>conftest.$ac_ext <<_ACEOF
20844
 
/* end confdefs.h.  */
20845
 
 
20846
 
                                #include <stdlib.h>
20847
 
                                #include <sys/types.h>
20848
 
                                #include <unistd.h>
20849
 
                                #include <mach/mach.h>
20850
 
                                #include <pthread.h>
20851
 
                                #include <machine/signal.h>
20852
 
                                #include <ucontext.h>
20853
 
 
20854
 
int
20855
 
main ()
20856
 
{
20857
 
 
20858
 
                                #if defined(__APPLE__) && defined(__MACH__) && !defined(__DARWIN__)
20859
 
                                #define __DARWIN__ 1
20860
 
                                #endif
20861
 
 
20862
 
                                #ifndef __DARWIN__
20863
 
                                #error inpossible
20864
 
                                #else
20865
 
 
20866
 
                                mcontext_t mc = NULL;
20867
 
                                int x = mc->__fs.__fpu_mxcsr;
20868
 
 
20869
 
                                #endif
20870
 
 
20871
 
  ;
20872
 
  return 0;
20873
 
}
20874
 
_ACEOF
20875
 
rm -f conftest.$ac_objext
20876
 
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20877
 
  (eval $ac_compile) 2>conftest.er1
20878
 
  ac_status=$?
20879
 
  grep -v '^ *+' conftest.er1 >conftest.err
20880
 
  rm -f conftest.er1
20881
 
  cat conftest.err >&5
20882
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
20883
 
  (exit $ac_status); } &&
20884
 
         { ac_try='test -z "$ac_c_werror_flag"
20885
 
                         || test ! -s conftest.err'
20886
 
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20887
 
  (eval $ac_try) 2>&5
20888
 
  ac_status=$?
20889
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
20890
 
  (exit $ac_status); }; } &&
20891
 
         { ac_try='test -s conftest.$ac_objext'
20892
 
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20893
 
  (eval $ac_try) 2>&5
20894
 
  ac_status=$?
20895
 
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
20896
 
  (exit $ac_status); }; }; then
20897
 
  darwin_mcontext_leopard=yes
20898
 
else
20899
 
  echo "$as_me: failed program was:" >&5
20900
 
sed 's/^/| /' conftest.$ac_ext >&5
20901
 
 
20902
 
darwin_mcontext_leopard=no
20903
 
fi
20904
 
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20905
 
                                if test X"$darwin_mcontext_leopard" = X"yes"; then
20906
 
 
20907
 
cat >>confdefs.h <<\_ACEOF
20908
 
#define DARWIN_MODERN_MCONTEXT
20909
 
_ACEOF
20910
 
 
20911
 
                                   echo "$as_me:$LINENO: result: yes" >&5
20912
 
echo "${ECHO_T}yes" >&6
20913
 
                                else
20914
 
                                   echo "$as_me:$LINENO: result: no" >&5
20915
 
echo "${ECHO_T}no" >&6
20916
 
                                fi
20917
 
                ;;
20918
 
        *)
20919
 
                darwin_mcontext_leopard=no
20920
 
                ;;
20921
 
esac
20922
27807
 
20923
27808
 
20924
27809
 
20972
27857
        echo "$as_me:$LINENO: result: no; disabled by user" >&5
20973
27858
echo "${ECHO_T}no; disabled by user" >&6
20974
27859
        ERTS_BUILD_HYBRID_EMU=no;;
20975
 
    *-win32|*-vxworks|*-ose) # vxworks and ose have their own "configure scripts"...
 
27860
    *-win32|*-vxworks) # vxworks have their own "configure scripts"...
20976
27861
        echo "$as_me:$LINENO: result: no; default on this platform" >&5
20977
27862
echo "${ECHO_T}no; default on this platform" >&6
20978
27863
        ERTS_BUILD_HYBRID_EMU=no;;
21116
28001
fi
21117
28002
 
21118
28003
#
21119
 
# Check if we should use elib_malloc.
21120
 
#
21121
 
 
21122
 
if test X${enable_elib_malloc} = Xyes; then
21123
 
 
21124
 
cat >>confdefs.h <<\_ACEOF
21125
 
#define ENABLE_ELIB_MALLOC
21126
 
_ACEOF
21127
 
 
21128
 
 
21129
 
cat >>confdefs.h <<\_ACEOF
21130
 
#define ELIB_HEAP_SBRK
21131
 
_ACEOF
21132
 
 
21133
 
 
21134
 
cat >>confdefs.h <<\_ACEOF
21135
 
#define ELIB_ALLOC_IS_CLIB
21136
 
_ACEOF
21137
 
 
21138
 
 
21139
 
cat >>confdefs.h <<\_ACEOF
21140
 
#define ELIB_SORTED_BLOCKS
21141
 
_ACEOF
21142
 
 
21143
 
fi
21144
 
 
21145
 
#
21146
28004
# Check for working poll().
21147
28005
#
21148
28006
echo "$as_me:$LINENO: checking for working poll()" >&5
21149
28007
echo $ECHO_N "checking for working poll()... $ECHO_C" >&6
21150
 
if test "x$erl_xcomp_poll" != "x"; then
21151
 
        poll_works=$erl_xcomp_poll
 
28008
if test "x$ac_cv_header_poll_h" != "xyes" -o "x$ac_cv_func_poll" != "xyes"; then
 
28009
 
 
28010
poll_works=no
 
28011
 
21152
28012
else
 
28013
 
21153
28014
if test "$cross_compiling" = yes; then
21154
 
  poll_works=false
 
28015
 
 
28016
case X$erl_xcomp_poll in
 
28017
    X) poll_works=cross;;
 
28018
    Xyes|Xno) poll_works=$erl_xcomp_poll;;
 
28019
    *) { { echo "$as_me:$LINENO: error: Bad erl_xcomp_poll value: $erl_xcomp_poll" >&5
 
28020
echo "$as_me: error: Bad erl_xcomp_poll value: $erl_xcomp_poll" >&2;}
 
28021
   { (exit 1); exit 1; }; };;
 
28022
esac
 
28023
 
21155
28024
else
21156
28025
  cat >conftest.$ac_ext <<_ACEOF
21157
28026
/* confdefs.h.  */
21191
28060
  ac_status=$?
21192
28061
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
21193
28062
  (exit $ac_status); }; }; then
21194
 
  poll_works=true
 
28063
  poll_works=yes
21195
28064
else
21196
28065
  echo "$as_me: program exited with status $ac_status" >&5
21197
28066
echo "$as_me: failed program was:" >&5
21198
28067
sed 's/^/| /' conftest.$ac_ext >&5
21199
28068
 
21200
28069
( exit $ac_status )
21201
 
poll_works=false
 
28070
poll_works=no
21202
28071
fi
21203
28072
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21204
28073
fi
 
28074
 
21205
28075
fi
21206
 
case $poll_works in
21207
 
true)
21208
 
 
21209
 
cat >>confdefs.h <<\_ACEOF
21210
 
#define ERTS_USE_POLL 1
21211
 
_ACEOF
21212
 
 
21213
 
        echo "$as_me:$LINENO: result: ok" >&5
21214
 
echo "${ECHO_T}ok" >&6
21215
 
        ;;
21216
 
*)
 
28076
 
 
28077
case $poll_works-$host_os in
 
28078
    no-*|cross-darwin*)
21217
28079
        #
21218
28080
        # The USE_SELECT define is used by the ssl application (should not
21219
28081
        # be used by erts).
21223
28085
#define USE_SELECT 1
21224
28086
_ACEOF
21225
28087
 
21226
 
        echo "$as_me:$LINENO: result: broken or based on select()" >&5
21227
 
echo "${ECHO_T}broken or based on select()" >&6
21228
 
        ;;
 
28088
        if test $poll_works = cross; then
 
28089
            echo "$as_me:$LINENO: result: cross" >&5
 
28090
echo "${ECHO_T}cross" >&6
 
28091
            { echo "$as_me:$LINENO: WARNING: result no guessed based on OS ($host_os) because of cross compilation" >&5
 
28092
echo "$as_me: WARNING: result no guessed based on OS ($host_os) because of cross compilation" >&2;}
 
28093
        else
 
28094
            echo "$as_me:$LINENO: result: no; non-existing, broken, or based on select()" >&5
 
28095
echo "${ECHO_T}no; non-existing, broken, or based on select()" >&6
 
28096
        fi
 
28097
        poll_works=no;;
 
28098
    yes-*|cross-*)
 
28099
 
 
28100
cat >>confdefs.h <<\_ACEOF
 
28101
#define ERTS_USE_POLL 1
 
28102
_ACEOF
 
28103
 
 
28104
        if test $poll_works = cross; then
 
28105
            echo "$as_me:$LINENO: result: cross" >&5
 
28106
echo "${ECHO_T}cross" >&6
 
28107
            { echo "$as_me:$LINENO: WARNING: result yes guessed based on OS ($host_os) because of cross compilation" >&5
 
28108
echo "$as_me: WARNING: result yes guessed based on OS ($host_os) because of cross compilation" >&2;}
 
28109
        else
 
28110
            echo "$as_me:$LINENO: result: yes" >&5
 
28111
echo "${ECHO_T}yes" >&6
 
28112
        fi
 
28113
        poll_works=yes;;
21229
28114
esac
21230
28115
 
21231
28116
#
21232
28117
# If kqueue() found, check that it can be selected or polled on...
21233
28118
#
21234
28119
if test $have_kernel_poll = kqueue; then
21235
 
        if test $poll_works = true; then
 
28120
        if test $poll_works = yes; then
21236
28121
                kqueue_with=poll
21237
28122
        else
21238
28123
                kqueue_with=select
21240
28125
        echo "$as_me:$LINENO: checking whether kqueue() fd can be ${kqueue_with}()ed on" >&5
21241
28126
echo $ECHO_N "checking whether kqueue() fd can be ${kqueue_with}()ed on... $ECHO_C" >&6
21242
28127
        if test "$cross_compiling" = yes; then
21243
 
  ok_kqueue=false
 
28128
 
 
28129
        case X$erl_xcomp_kqueue in
 
28130
            X) ok_kqueue=cross;;
 
28131
            Xyes|Xno) ok_kqueue=$erl_xcomp_kqueue;;
 
28132
            *) { { echo "$as_me:$LINENO: error: Bad erl_xcomp_kqueue value: $erl_xcomp_kqueue" >&5
 
28133
echo "$as_me: error: Bad erl_xcomp_kqueue value: $erl_xcomp_kqueue" >&2;}
 
28134
   { (exit 1); exit 1; }; };;
 
28135
        esac
 
28136
 
21244
28137
else
21245
28138
  cat >conftest.$ac_ext <<_ACEOF
21246
28139
/* confdefs.h.  */
21286
28179
  ac_status=$?
21287
28180
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
21288
28181
  (exit $ac_status); }; }; then
21289
 
  ok_kqueue=true
 
28182
  ok_kqueue=yes
21290
28183
else
21291
28184
  echo "$as_me: program exited with status $ac_status" >&5
21292
28185
echo "$as_me: failed program was:" >&5
21293
28186
sed 's/^/| /' conftest.$ac_ext >&5
21294
28187
 
21295
28188
( exit $ac_status )
21296
 
ok_kqueue=false
 
28189
ok_kqueue=no
21297
28190
fi
21298
28191
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21299
28192
fi
21300
 
        if test $ok_kqueue = true; then
21301
 
                echo "$as_me:$LINENO: result: yes" >&5
21302
 
echo "${ECHO_T}yes" >&6;
21303
 
        else
21304
 
                echo "$as_me:$LINENO: result: no" >&5
21305
 
echo "${ECHO_T}no" >&6;
 
28193
        echo "$as_me:$LINENO: result: $ok_kqueue" >&5
 
28194
echo "${ECHO_T}$ok_kqueue" >&6;
 
28195
        case $ok_kqueue in
 
28196
            yes)
 
28197
                ;;
 
28198
            cross)
21306
28199
                have_kernel_poll=no
21307
 
        fi
 
28200
                { echo "$as_me:$LINENO: WARNING: result no guessed because of cross compilation" >&5
 
28201
echo "$as_me: WARNING: result no guessed because of cross compilation" >&2;};;
 
28202
            *)
 
28203
                have_kernel_poll=no;;
 
28204
        esac
21308
28205
fi
21309
28206
 
21310
28207
#
21428
28325
echo "$as_me:$LINENO: checking whether putenv() stores a copy of the key-value pair" >&5
21429
28326
echo $ECHO_N "checking whether putenv() stores a copy of the key-value pair... $ECHO_C" >&6
21430
28327
if test "$cross_compiling" = yes; then
21431
 
  copying_putenv=no
 
28328
 
 
28329
case X$erl_xcomp_putenv_copy in
 
28330
    X) copying_putenv=cross;;
 
28331
    Xyes|Xno) copying_putenv=$erl_xcomp_putenv_copy;;
 
28332
    *) { { echo "$as_me:$LINENO: error: Bad erl_xcomp_putenv_copy value: $erl_xcomp_putenv_copy" >&5
 
28333
echo "$as_me: error: Bad erl_xcomp_putenv_copy value: $erl_xcomp_putenv_copy" >&2;}
 
28334
   { (exit 1); exit 1; }; };;
 
28335
esac
 
28336
 
21432
28337
else
21433
28338
  cat >conftest.$ac_ext <<_ACEOF
21434
28339
/* confdefs.h.  */
21490
28395
fi
21491
28396
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21492
28397
fi
21493
 
if test $copying_putenv = yes; then
21494
 
 
21495
 
cat >>confdefs.h <<\_ACEOF
21496
 
#define HAVE_COPYING_PUTENV 1
21497
 
_ACEOF
21498
 
 
21499
 
fi
 
28398
 
21500
28399
echo "$as_me:$LINENO: result: $copying_putenv" >&5
21501
28400
echo "${ECHO_T}$copying_putenv" >&6
 
28401
case $copying_putenv in
 
28402
    yes)
 
28403
 
 
28404
cat >>confdefs.h <<\_ACEOF
 
28405
#define HAVE_COPYING_PUTENV 1
 
28406
_ACEOF
 
28407
;;
 
28408
    cross)
 
28409
        { echo "$as_me:$LINENO: WARNING: result no guessed because of cross compilation" >&5
 
28410
echo "$as_me: WARNING: result no guessed because of cross compilation" >&2;};;
 
28411
    *) ;;
 
28412
esac
21502
28413
 
21503
28414
 
21504
28415
#--------------------------------------------------------------------
21522
28433
#
21523
28434
#--------------------------------------------------------------------
21524
28435
 
21525
 
DED_INCLUDE="-I${ERL_TOP}/erts/emulator/beam -I${ERL_TOP}/erts/include -I${ERL_TOP}/erts/include/$host"
 
28436
DED_SYS_INCLUDE="-I${ERL_TOP}/erts/emulator/beam -I${ERL_TOP}/erts/include -I${ERL_TOP}/erts/include/$host -I${ERL_TOP}/erts/include/internal -I${ERL_TOP}/erts/include/internal/$host -I${ERL_TOP}/erts/emulator/sys/$ERLANG_OSTYPE"
21526
28437
 
21527
 
DED_CFLAGS="$DED_INCLUDE $CFLAGS $CPPFLAGS $EMU_THR_DEFS"
 
28438
if test "X$ETHR_DEFS" = "X"; then
 
28439
    DED_THR_DEFS="-D_THREAD_SAFE -D_REENTRANT"
 
28440
else
 
28441
    DED_THR_DEFS="$ETHR_DEFS"
 
28442
fi
 
28443
DED_EMU_THR_DEFS=$EMU_THR_DEFS
 
28444
DED_CFLAGS="$CFLAGS $CPPFLAGS"
21528
28445
if test "x$GCC" = xyes; then
21529
28446
    DED_CFLAGS="$DED_CFLAGS -fPIC"
21530
28447
fi
21531
28448
 
21532
 
STATIC_CFLAGS=""
 
28449
DED_EXT=so
 
28450
case $host_os in
 
28451
    win32) DED_EXT=dll;;
 
28452
    darwin*)
 
28453
        DED_CFLAGS="$DED_CFLAGS -fno-common"
 
28454
        if test "X$STATIC_CFLAGS" = "X"; then
 
28455
            STATIC_CFLAGS="-mdynamic-no-pic"
 
28456
        fi;;
 
28457
    *)
 
28458
        ;;
 
28459
esac
21533
28460
 
21534
 
# If DED_LD is set in environment, we expect all DED variables to be specified
21535
 
# (cross compiling)
 
28461
# If DED_LD is set in environment, we expect all DED_LD* variables
 
28462
# to be specified (cross compiling)
21536
28463
if test "x$DED_LD" = "x"; then
21537
28464
 
21538
 
if test "x$LD" = "x"; then
21539
 
    DED_LD=ld
21540
 
else
21541
 
    DED_LD=$LD
21542
 
fi
21543
28465
DED_LD_FLAG_RUNTIME_LIBRARY_PATH="-R"
21544
 
 
21545
28466
case $host_os in
21546
28467
        win32)
21547
 
                DED_LD=ld.sh
 
28468
                DED_LD="ld.sh"
21548
28469
                DED_LDFLAGS="-dll"
21549
28470
                DED_LD_FLAG_RUNTIME_LIBRARY_PATH=
21550
28471
        ;;
21578
28499
                if test X${enable_darwin_universal} = Xyes; then
21579
28500
                        DED_LDFLAGS="-arch ppc -arch i386 $DED_LDFLAGS"
21580
28501
                fi
21581
 
                DED_CFLAGS="$DED_CFLAGS -fno-common"
21582
28502
                DED_LD="$CC"
21583
 
                DED_LD_FLAG_RUNTIME_LIBRARY_PATH=
21584
 
                STATIC_CFLAGS="-mdynamic-no-pic"
 
28503
                DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH"
21585
28504
        ;;
21586
28505
        linux*)
21587
28506
                DED_LD="$CC"
 
28507
                DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH"
21588
28508
                DED_LDFLAGS="-shared -Wl,-Bsymbolic"
21589
 
                DED_LD_FLAG_RUNTIME_LIBRARY_PATH=
21590
28509
                if test X${enable_m64_build} = Xyes; then
21591
28510
                        DED_LDFLAGS="-m64 $DED_LDFLAGS"
 
28511
                fi;
 
28512
                if test X${enable_m32_build} = Xyes; then
 
28513
                        DED_LDFLAGS="-m32 $DED_LDFLAGS"
21592
28514
                fi
21593
28515
        ;;
21594
28516
        freebsd*)
21595
28517
                DED_LD="$CC"
 
28518
                DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH"
21596
28519
                DED_LDFLAGS="-shared"
21597
28520
                if test X${enable_m64_build} = Xyes; then
21598
28521
                        DED_LDFLAGS="-m64 $DED_LDFLAGS"
 
28522
                fi;
 
28523
                if test X${enable_m32_build} = Xyes; then
 
28524
                        DED_LDFLAGS="-m32 $DED_LDFLAGS"
21599
28525
                fi
21600
28526
        ;;
21601
28527
        osf*)
21610
28536
        ;;
21611
28537
esac
21612
28538
 
21613
 
fi
 
28539
if test "$DED_LD" = "" && test "$USER_LD" != ""; then
 
28540
    DED_LD="$USER_LD"
 
28541
    DED_LDFLAGS="$USER_LDFLAGS $DED_LDFLAGS"
 
28542
fi
 
28543
 
 
28544
fi # "x$DED_LD" = "x"
 
28545
 
 
28546
if test -n "$ac_tool_prefix"; then
 
28547
  # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
 
28548
set dummy ${ac_tool_prefix}ld; ac_word=$2
 
28549
echo "$as_me:$LINENO: checking for $ac_word" >&5
 
28550
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 
28551
if test "${ac_cv_prog_DED_LD+set}" = set; then
 
28552
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
28553
else
 
28554
  if test -n "$DED_LD"; then
 
28555
  ac_cv_prog_DED_LD="$DED_LD" # Let the user override the test.
 
28556
else
 
28557
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
28558
for as_dir in $PATH
 
28559
do
 
28560
  IFS=$as_save_IFS
 
28561
  test -z "$as_dir" && as_dir=.
 
28562
  for ac_exec_ext in '' $ac_executable_extensions; do
 
28563
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
 
28564
    ac_cv_prog_DED_LD="${ac_tool_prefix}ld"
 
28565
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
 
28566
    break 2
 
28567
  fi
 
28568
done
 
28569
done
 
28570
 
 
28571
fi
 
28572
fi
 
28573
DED_LD=$ac_cv_prog_DED_LD
 
28574
if test -n "$DED_LD"; then
 
28575
  echo "$as_me:$LINENO: result: $DED_LD" >&5
 
28576
echo "${ECHO_T}$DED_LD" >&6
 
28577
else
 
28578
  echo "$as_me:$LINENO: result: no" >&5
 
28579
echo "${ECHO_T}no" >&6
 
28580
fi
 
28581
 
 
28582
fi
 
28583
if test -z "$ac_cv_prog_DED_LD"; then
 
28584
  ac_ct_DED_LD=$DED_LD
 
28585
  # Extract the first word of "ld", so it can be a program name with args.
 
28586
set dummy ld; ac_word=$2
 
28587
echo "$as_me:$LINENO: checking for $ac_word" >&5
 
28588
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 
28589
if test "${ac_cv_prog_ac_ct_DED_LD+set}" = set; then
 
28590
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
28591
else
 
28592
  if test -n "$ac_ct_DED_LD"; then
 
28593
  ac_cv_prog_ac_ct_DED_LD="$ac_ct_DED_LD" # Let the user override the test.
 
28594
else
 
28595
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
28596
for as_dir in $PATH
 
28597
do
 
28598
  IFS=$as_save_IFS
 
28599
  test -z "$as_dir" && as_dir=.
 
28600
  for ac_exec_ext in '' $ac_executable_extensions; do
 
28601
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
 
28602
    ac_cv_prog_ac_ct_DED_LD="ld"
 
28603
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
 
28604
    break 2
 
28605
  fi
 
28606
done
 
28607
done
 
28608
 
 
28609
  test -z "$ac_cv_prog_ac_ct_DED_LD" && ac_cv_prog_ac_ct_DED_LD="false"
 
28610
fi
 
28611
fi
 
28612
ac_ct_DED_LD=$ac_cv_prog_ac_ct_DED_LD
 
28613
if test -n "$ac_ct_DED_LD"; then
 
28614
  echo "$as_me:$LINENO: result: $ac_ct_DED_LD" >&5
 
28615
echo "${ECHO_T}$ac_ct_DED_LD" >&6
 
28616
else
 
28617
  echo "$as_me:$LINENO: result: no" >&5
 
28618
echo "${ECHO_T}no" >&6
 
28619
fi
 
28620
 
 
28621
  DED_LD=$ac_ct_DED_LD
 
28622
else
 
28623
  DED_LD="$ac_cv_prog_DED_LD"
 
28624
fi
 
28625
 
 
28626
test "$DED_LD" != "false" || { { echo "$as_me:$LINENO: error: No linker found" >&5
 
28627
echo "$as_me: error: No linker found" >&2;}
 
28628
   { (exit 1); exit 1; }; }
21614
28629
 
21615
28630
echo "$as_me:$LINENO: checking for compiler flags for loadable drivers" >&5
21616
28631
echo $ECHO_N "checking for compiler flags for loadable drivers... $ECHO_C" >&6
21641
28656
 
21642
28657
 
21643
28658
 
 
28659
 
 
28660
 
 
28661
 
 
28662
 
21644
28663
echo "$as_me:$LINENO: checking for a compiler that handles jumptables" >&5
21645
28664
echo $ECHO_N "checking for a compiler that handles jumptables... $ECHO_C" >&6
21646
28665
if test "${ac_cv_prog_emu_cc+set}" = set; then
21822
28841
 
21823
28842
 
21824
28843
 
 
28844
 
 
28845
std_ssl_locations="/usr/local /usr/sfw /opt/local /usr /usr/pkg /usr/local/openssl /usr/lib/openssl /usr/openssl /usr/local/ssl /usr/lib/ssl /usr/ssl"
 
28846
 
 
28847
 
21825
28848
# Check whether --with-ssl-zlib or --without-ssl-zlib was given.
21826
28849
if test "${with_ssl_zlib+set}" = set; then
21827
28850
  withval="$with_ssl_zlib"
21832
28855
if  test "x$with_ssl_zlib" = "xno"; then
21833
28856
        SSL_LINK_WITH_ZLIB=no
21834
28857
        STATIC_ZLIB_LIBS=
21835
 
elif test "x$with_ssl_zlib" = "xyes" -o "x$with_ssl_zlib" = "x" ;then
21836
 
        if  test "x$MIXED_CYGWIN" = "xyes"; then
 
28858
elif test "x$with_ssl_zlib" = "xyes" || test "x$with_ssl_zlib" = "x"; then
 
28859
        if test $erl_xcomp_without_sysroot = yes; then
 
28860
                { echo "$as_me:$LINENO: WARNING: Cannot search for zlib; missing cross system root (erl_xcomp_sysroot)." >&5
 
28861
echo "$as_me: WARNING: Cannot search for zlib; missing cross system root (erl_xcomp_sysroot)." >&2;}
 
28862
                SSL_LINK_WITH_ZLIB=no
 
28863
                STATIC_ZLIB_LIBS=
 
28864
        elif  test "x$MIXED_CYGWIN" = "xyes"; then
21837
28865
                SSL_LINK_WITH_ZLIB=no
21838
28866
                STATIC_ZLIB_LIBS=
21839
28867
        else
21841
28869
                STATIC_ZLIB_LIBS=
21842
28870
                echo "$as_me:$LINENO: checking for static ZLib to be used by SSL in standard locations" >&5
21843
28871
echo $ECHO_N "checking for static ZLib to be used by SSL in standard locations... $ECHO_C" >&6
21844
 
                for dir in /usr/local /usr/sfw /usr /usr/pkg \
21845
 
                /usr/local/openssl /usr/lib/openssl /usr/openssl \
21846
 
                /usr/local/ssl /usr/lib/ssl /usr/ssl
21847
 
                do
 
28872
                for rdir in $std_ssl_locations; do
 
28873
                        dir="$erl_xcomp_sysroot$rdir"
21848
28874
                        if test "x$ac_cv_sizeof_void_p" = "x8"; then
21849
28875
                                if test -f "$dir/lib64/libz.a"; then
21850
28876
                                        SSL_LINK_WITH_ZLIB=yes
21934
28960
 
21935
28961
SSL_DYNAMIC_ONLY=$enable_dynamic_ssl
21936
28962
 
21937
 
if test "x$with_ssl" = "xno"; then
 
28963
case "$erl_xcomp_without_sysroot-$with_ssl" in
 
28964
  yes-* | no-no)
21938
28965
    SSL_APP=
21939
28966
    CRYPTO_APP=
21940
28967
    SSH_APP=
 
28968
    if test "$with_ssl" = "no"; then
 
28969
        skip="User gave --without-ssl option"
 
28970
    else
 
28971
        skip="Cannot search for ssl; missing cross system root (erl_xcomp_sysroot)."
 
28972
    fi
21941
28973
    for a in ssl crypto ssh; do
21942
 
        echo "User gave --without-ssl option" > $ERL_TOP/lib/$a/SKIP
 
28974
        echo "$skip" > $ERL_TOP/lib/$a/SKIP
21943
28975
    done
21944
 
elif test "x$with_ssl" = "xyes" -o "x$with_ssl" = "x" ;then
 
28976
    ;;
 
28977
  no-yes | no- )
21945
28978
    # On windows, we could try to find the installation
21946
28979
    # of Shining Light OpenSSL, which can be found by poking in
21947
28980
    # the uninstall section in the registry, it's worth a try...
22004
29037
 
22005
29038
    echo "$as_me:$LINENO: checking for OpenSSL >= 0.9.7 in standard locations" >&5
22006
29039
echo $ECHO_N "checking for OpenSSL >= 0.9.7 in standard locations... $ECHO_C" >&6
22007
 
    for dir in $extra_dir /cygdrive/c/OpenSSL \
22008
 
                /usr/local /usr/sfw /opt/local /usr /usr/pkg \
22009
 
                /usr/local/openssl /usr/lib/openssl /usr/openssl \
22010
 
                /usr/local/ssl /usr/lib/ssl /usr/ssl
22011
 
        do
22012
 
       if test -f $dir/include/openssl/opensslv.h; then
 
29040
    for rdir in $extra_dir /cygdrive/c/OpenSSL $std_ssl_locations; do
 
29041
        dir="$erl_xcomp_sysroot$rdir"
 
29042
        if test -f "$erl_xcomp_isysroot$rdir/include/openssl/opensslv.h"; then
22013
29043
                is_real_ssl=yes
22014
29044
                SSL_ROOT="$dir"
22015
29045
                if test "x$MIXED_CYGWIN" = "xyes" ; then
22016
 
                        if test -f "$dir/lib/VC/ssleay32.lib" -o \
22017
 
                                -f "$dir/lib/VC/openssl.lib"; then
 
29046
                        if test -f "$dir/lib/VC/ssleay32.lib" || \
 
29047
                           test -f "$dir/lib/VC/openssl.lib"; then
 
29048
                                SSL_RUNTIME_LIBDIR="$rdir/lib/VC"
22018
29049
                                SSL_LIBDIR="$dir/lib/VC"
22019
 
                        elif test -f "$dir/lib/ssleay32.lib" -o \
22020
 
                                -f "$dir/lib/openssl.lib"; then
 
29050
                        elif test -f "$dir/lib/ssleay32.lib" || \
 
29051
                             test -f "$dir/lib/openssl.lib"; then
 
29052
                                SSL_RUNTIME_LIBDIR="$rdir/lib"
22021
29053
                                SSL_LIBDIR="$dir/lib"
22022
29054
                        else
22023
29055
                                is_real_ssl=no
22025
29057
                else
22026
29058
                        if test "x$ac_cv_sizeof_void_p" = "x8"; then
22027
29059
                                if test -f "$dir/lib64/libcrypto.a"; then
 
29060
                                        SSL_RUNTIME_LIBDIR="$rdir/lib64"
22028
29061
                                        SSL_LIBDIR="$dir/lib64"
22029
29062
                                elif test -f "$dir/lib/64/libcrypto.a"; then
 
29063
                                        SSL_RUNTIME_LIBDIR="$rdir/lib/64"
22030
29064
                                        SSL_LIBDIR="$dir/lib/64"
22031
29065
                                elif test -f "$dir/lib64/libcrypto.so"; then
 
29066
                                        SSL_RUNTIME_LIBDIR="$rdir/lib64"
22032
29067
                                        SSL_LIBDIR="$dir/lib64"
22033
29068
                                elif test -f "$dir/lib/64/libcrypto.so"; then
 
29069
                                        SSL_RUNTIME_LIBDIR="$rdir/lib/64"
22034
29070
                                        SSL_LIBDIR="$dir/lib/64"
22035
29071
                                else
 
29072
                                        SSL_RUNTIME_LIBDIR="$rdir/lib"
22036
29073
                                        SSL_LIBDIR="$dir/lib"
22037
29074
                                fi
22038
29075
                        else
 
29076
                                SSL_RUNTIME_LIBDIR="$rdir/lib"
22039
29077
                                SSL_LIBDIR="$dir/lib"
22040
29078
                        fi
22041
29079
                fi
22042
29080
                if test '!' -f $SSL_LIBDIR/libcrypto.a; then
22043
29081
                        SSL_DYNAMIC_ONLY=yes
22044
29082
                fi
22045
 
                SSL_BINDIR="$dir/bin"
22046
 
                if test -f "$SSL_BINDIR/openssl$EXEEXT"; then
22047
 
                        if "$SSL_BINDIR/openssl" version > /dev/null 2>&1; then
22048
 
                                OPENSSL_CMD="$SSL_BINDIR/openssl"
22049
 
                        else
22050
 
                                is_real_ssl=no
22051
 
                        fi
22052
 
                else
22053
 
                        is_real_ssl=no
22054
 
                fi
 
29083
                SSL_BINDIR="$rdir/bin"
22055
29084
                if test "x$is_real_ssl" = "xyes" ; then
22056
29085
                        SSL_INCLUDE="-I$dir/include"
22057
29086
                        old_CPPFLAGS=$CPPFLAGS
22149
29178
                                        LIBS="$saveLIBS"
22150
29179
                                fi
22151
29180
                        fi
22152
 
                        if test "x$ssl_found" = "xyes" -a "x$ssl_linkable" = "xyes"  ; then
 
29181
                        if test "x$ssl_found" = "xyes" && test "x$ssl_linkable" = "xyes"; then
22153
29182
                                echo "$as_me:$LINENO: result: $dir" >&5
22154
29183
echo "${ECHO_T}$dir" >&6
22155
29184
                                break;
22161
29190
    if test "x$ssl_found" != "xyes" ; then
22162
29191
                                case $host_os in
22163
29192
        openbsd*)
22164
 
               if test -f /usr/include/openssl/opensslv.h; then
 
29193
               if test -f "$erl_xcomp_isysroot/usr/include/openssl/opensslv.h"; then
22165
29194
                  # Trust OpenBSD to have everything the in the correct locations.
22166
29195
                  ssl_found=yes
22167
29196
                  ssl_linkable=yes
22168
 
                  SSL_ROOT="/usr/sbin"
 
29197
                  SSL_ROOT="$erl_xcomp_sysroot/usr"
22169
29198
                  echo "$as_me:$LINENO: result: $SSL_ROOT" >&5
22170
29199
echo "${ECHO_T}$SSL_ROOT" >&6
22171
 
                  SSL_LIB="/usr/lib"
 
29200
                  SSL_RUNTIME_LIB="/usr/lib"
 
29201
                  SSL_LIB="$erl_xcomp_sysroot/usr/lib"
22172
29202
                  SSL_BINDIR="/usr/sbin"
22173
 
                  OPENSSL_CMD="$SSL_BINDIR/openssl"
22174
29203
                                  SSL_DYNAMIC_ONLY="yes"
22175
29204
                fi
22176
29205
                ;;
22177
29206
        esac
22178
29207
    fi
22179
 
    if test "x$ssl_found" = "xyes" -a  "x$ssl_linkable" = "xyes" -a "x$SSL_DYNAMIC_ONLY" != "xyes" ; then
 
29208
    if test "$ssl_found" = "yes" && test "$ssl_linkable" = "yes" && test "$SSL_DYNAMIC_ONLY" != "yes"; then
22180
29209
        case $host_os in
22181
29210
                linux*)
22182
29211
                        saveCFLAGS="$CFLAGS"
22251
29280
 
22252
29281
 
22253
29282
 
22254
 
    if test "x$ssl_found" != "xyes" -o  "x$ssl_linkable" != "xyes"; then
 
29283
    if test "x$ssl_found" != "xyes" || test  "x$ssl_linkable" != "xyes"; then
22255
29284
       if test "x$ssl_found" = "xyes"; then
22256
29285
                echo "$as_me:$LINENO: result: found; but not usable" >&5
22257
29286
echo "${ECHO_T}found; but not usable" >&6
22269
29298
           echo "No usable OpenSSL found" > $ERL_TOP/lib/$a/SKIP
22270
29299
       done
22271
29300
    fi
22272
 
else
 
29301
    ;;
 
29302
  *)
22273
29303
    # Option given with PATH to package
22274
29304
    if test ! -d "$with_ssl" ; then
22275
29305
       { { echo "$as_me:$LINENO: error: Invalid path to option --with-ssl=PATH" >&5
22277
29307
   { (exit 1); exit 1; }; }
22278
29308
    fi
22279
29309
    SSL_ROOT="$with_ssl"
22280
 
    if test "x$MIXED_CYGWIN" = "xyes" -a -d "$with_ssl/lib/VC"; then
 
29310
    if test "x$MIXED_CYGWIN" = "xyes" && test -d "$with_ssl/lib/VC"; then
22281
29311
        SSL_LIBDIR="$with_ssl/lib/VC"
22282
29312
    elif test "x$ac_cv_sizeof_void_p" = "x8"; then
22283
29313
        if test -f "$with_ssl/lib64/libcrypto.a"; then
22298
29328
        SSL_DYNAMIC_ONLY=yes
22299
29329
    fi
22300
29330
    SSL_INCLUDE="-I$with_ssl/include"
22301
 
    OPENSSL_CMD="$with_ssl/bin/openssl"
22302
29331
    SSL_APP=ssl
22303
29332
    CRYPTO_APP=crypto
22304
29333
    SSH_APP=ssh
22305
 
fi
 
29334
    if test "$cross_compiling" = "yes"; then
 
29335
        SSL_RUNTIME_LIBDIR=`echo "$SSL_LIBDIR" | sed -n "s|^$erl_xcomp_sysroot\(.*\)\$|\1|p"`
 
29336
    else
 
29337
        SSL_RUNTIME_LIBDIR="$SSL_LIBDIR"
 
29338
    fi
 
29339
esac
22306
29340
 
22307
29341
if test "x$SSL_APP" != "x" ; then
22308
29342
        echo "$as_me:$LINENO: checking for OpenSSL kerberos 5 support" >&5
22329
29363
echo "${ECHO_T}yes" >&6
22330
29364
      ssl_krb5_enabled=yes
22331
29365
      if test "x$SSL_DYNAMIC_ONLY" != "xyes"; then
22332
 
          if test -f $SSL_LIBDIR/libkrb5.a; then
 
29366
          if test -f "$SSL_LIBDIR/libkrb5.a"; then
22333
29367
              SSL_LINK_WITH_KERBEROS=yes
22334
29368
              STATIC_KERBEROS_LIBS="$SSL_LIBDIR/libkrb5.a"
22335
 
              if test -f $SSL_LIBDIR/libkrb5support.a; then
 
29369
              if test -f "$SSL_LIBDIR/libkrb5support.a"; then
22336
29370
                  STATIC_KERBEROS_LIBS="$STATIC_KERBEROS_LIBS $SSL_LIBDIR/libkrb5support.a"
22337
29371
              fi
22338
 
              if test -f $SSL_LIBDIR/libk5crypto.a; then
 
29372
              if test -f "$SSL_LIBDIR/libk5crypto.a"; then
22339
29373
                  STATIC_KERBEROS_LIBS="$STATIC_KERBEROS_LIBS $SSL_LIBDIR/libk5crypto.a"
22340
29374
              fi
22341
 
              if test -f $SSL_LIBDIR/libresolv.a; then
 
29375
              if test -f "$SSL_LIBDIR/libresolv.a"; then
22342
29376
                  STATIC_KERBEROS_LIBS="$STATIC_KERBEROS_LIBS $SSL_LIBDIR/libresolv.a"
22343
29377
              fi
22344
 
              if test -f $SSL_LIBDIR/libcom_err.a; then
 
29378
              if test -f "$SSL_LIBDIR/libcom_err.a"; then
22345
29379
                  STATIC_KERBEROS_LIBS="$STATIC_KERBEROS_LIBS $SSL_LIBDIR/libcom_err.a"
22346
29380
              fi
22347
29381
          else
22376
29410
    if test "x$ssl_krb5_enabled" = "xyes" ; then
22377
29411
        echo "$as_me:$LINENO: checking for krb5.h in standard locations" >&5
22378
29412
echo $ECHO_N "checking for krb5.h in standard locations... $ECHO_C" >&6
22379
 
        for dir in $extra_dir $SSL_ROOT/include $SSL_ROOT/include/openssl \
22380
 
                $SSL_ROOT/include/kerberos /cygdrive/c/kerberos/include \
22381
 
                /usr/local/kerberos/include /usr/kerberos/include \
22382
 
                /usr/include
 
29413
        for dir in $extra_dir "$SSL_ROOT/include" "$SSL_ROOT/include/openssl" \
 
29414
                "$SSL_ROOT/include/kerberos" \
 
29415
                "$erl_xcomp_isysroot/cygdrive/c/kerberos/include" \
 
29416
                "$erl_xcomp_isysroot/usr/local/kerberos/include" \
 
29417
                "$erl_xcomp_isysroot/usr/kerberos/include" \
 
29418
                "$erl_xcomp_isysroot/usr/include"
22383
29419
        do
22384
29420
            if test -f "$dir/krb5.h" ; then
22385
29421
                SSL_KRB5_INCLUDE="$dir"
22407
29443
 
22408
29444
done # while test ssl_done != yes
22409
29445
 
 
29446
SSL_CC_RUNTIME_LIBRARY_PATH=
 
29447
SSL_LD_RUNTIME_LIBRARY_PATH=
 
29448
SSL_DED_LD_RUNTIME_LIBRARY_PATH=
 
29449
cc_rflg="$CFLAG_RUNTIME_LIBRARY_PATH"
 
29450
ld_rflg="$LDFLAG_RUNTIME_LIBRARY_PATH"
 
29451
ded_ld_rflg="$DED_LD_FLAG_RUNTIME_LIBRARY_PATH"
 
29452
 
 
29453
if test "$SSL_APP" != "" && test "$SSL_DYNAMIC_ONLY" = "yes" && \
 
29454
   { test "$cc_rflg" != "" || test "$ld_rflg" != "" || test "$ded_ld_rflg" != ""; } ; then
 
29455
 
 
29456
    echo "$as_me:$LINENO: checking for ssl runtime library path to use" >&5
 
29457
echo $ECHO_N "checking for ssl runtime library path to use... $ECHO_C" >&6
 
29458
 
 
29459
    libdirs="/lib"
 
29460
 
 
29461
    if test "$ac_cv_sizeof_void_p" = "8"; then
 
29462
        dir_lib64=no
 
29463
        dir_lib_64=no
 
29464
 
 
29465
        case "$SSL_RUNTIME_LIBDIR" in
 
29466
            */lib/64 | */lib/64/ ) dir_lib_64=yes;;
 
29467
            */lib64 | */lib64/ ) dir_lib64=yes;;
 
29468
            *) ;;
 
29469
        esac
 
29470
 
 
29471
        for dir in $std_ssl_locations; do
 
29472
            test $dir_lib_64 = no &&
 
29473
                test -d "$erl_xcomp_sysroot$dir/lib/64" &&
 
29474
                    dir_lib_64=yes
 
29475
            test $dir_lib64 = no &&
 
29476
                test -d "$erl_xcomp_sysroot$dir/lib64" &&
 
29477
                    dir_lib64=yes
 
29478
        done
 
29479
 
 
29480
        test $dir_lib_64 = yes && libdirs="/lib/64 $libdirs"
 
29481
        test $dir_lib64 = yes && libdirs="/lib64 $libdirs"
 
29482
    fi
 
29483
 
 
29484
    for type in std x_std curr; do
 
29485
 
 
29486
        cc_rpath="$cc_rflg$SSL_RUNTIME_LIBDIR"
 
29487
        ld_rpath="$ld_rflg$SSL_RUNTIME_LIBDIR"
 
29488
        ded_ld_rpath="$ded_ld_rflg$SSL_RUNTIME_LIBDIR"
 
29489
        rpath="$SSL_RUNTIME_LIBDIR"
 
29490
 
 
29491
        if test $type != curr; then
 
29492
            for ldir in $libdirs; do
 
29493
                for dir in $std_ssl_locations; do
 
29494
                    test "$SSL_LIBDIR" != "$dir$ldir" || continue
 
29495
                    test $type != x_std || test -d "$dir$ldir" || continue
 
29496
                    test "$cc_rflg" = "" ||
 
29497
                        cc_rpath="$cc_rpath $cc_rflg$dir$ldir"
 
29498
                    test "$ld_rflg" = "" ||
 
29499
                        ld_rpath="$ld_rpath $ld_rflg$dir$ldir"
 
29500
                    test "$ded_ld_rflg" = "" ||
 
29501
                        ded_ld_rpath="$ded_ld_rpath $ded_ld_rflg$dir$ldir"
 
29502
                    rpath="$rpath:$dir$ldir"
 
29503
                done
 
29504
            done
 
29505
        fi
 
29506
 
 
29507
        saveCFLAGS="$CFLAGS"
 
29508
        saveLDFLAGS="$LDFLAGS"
 
29509
        saveLIBS="$LIBS"
 
29510
        CFLAGS="$CFLAGS $SSL_INCLUDE"
 
29511
        LDFLAGS="$LDFLAGS $ld_rpath -L$SSL_LIBDIR"
 
29512
        LIBS="-lcrypto"
 
29513
        cat >conftest.$ac_ext <<_ACEOF
 
29514
/* confdefs.h.  */
 
29515
_ACEOF
 
29516
cat confdefs.h >>conftest.$ac_ext
 
29517
cat >>conftest.$ac_ext <<_ACEOF
 
29518
/* end confdefs.h.  */
 
29519
 
 
29520
                         #include <stdio.h>
 
29521
                         #include <openssl/hmac.h>
 
29522
 
 
29523
int
 
29524
main ()
 
29525
{
 
29526
 
 
29527
                         HMAC_CTX hc;
 
29528
                         HMAC_CTX_init(&hc);
 
29529
 
 
29530
  ;
 
29531
  return 0;
 
29532
}
 
29533
_ACEOF
 
29534
rm -f conftest.$ac_objext conftest$ac_exeext
 
29535
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 
29536
  (eval $ac_link) 2>conftest.er1
 
29537
  ac_status=$?
 
29538
  grep -v '^ *+' conftest.er1 >conftest.err
 
29539
  rm -f conftest.er1
 
29540
  cat conftest.err >&5
 
29541
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29542
  (exit $ac_status); } &&
 
29543
         { ac_try='test -z "$ac_c_werror_flag"
 
29544
                         || test ! -s conftest.err'
 
29545
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
29546
  (eval $ac_try) 2>&5
 
29547
  ac_status=$?
 
29548
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29549
  (exit $ac_status); }; } &&
 
29550
         { ac_try='test -s conftest$ac_exeext'
 
29551
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
 
29552
  (eval $ac_try) 2>&5
 
29553
  ac_status=$?
 
29554
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
 
29555
  (exit $ac_status); }; }; then
 
29556
  rpath_success=yes
 
29557
else
 
29558
  echo "$as_me: failed program was:" >&5
 
29559
sed 's/^/| /' conftest.$ac_ext >&5
 
29560
 
 
29561
rpath_success=no
 
29562
fi
 
29563
rm -f conftest.err conftest.$ac_objext \
 
29564
      conftest$ac_exeext conftest.$ac_ext
 
29565
        CFLAGS="$saveCFLAGS"
 
29566
        LDFLAGS="$saveLDFLAGS"
 
29567
        LIBS="$saveLIBS"
 
29568
 
 
29569
        test "$rpath_success" = "yes" && break
 
29570
    done
 
29571
 
 
29572
    test "$rpath_success" = "yes" || { cc_rpath=; ld_rpath=; ded_ld_rpath=; rpath=; }
 
29573
 
 
29574
    SSL_CC_RUNTIME_LIBRARY_PATH="$cc_rpath"
 
29575
    SSL_LD_RUNTIME_LIBRARY_PATH="$ld_rpath"
 
29576
    SSL_DED_LD_RUNTIME_LIBRARY_PATH="$ded_ld_rpath"
 
29577
 
 
29578
    echo "$as_me:$LINENO: result: $rpath" >&5
 
29579
echo "${ECHO_T}$rpath" >&6
 
29580
    test "$rpath" != "" || { echo "$as_me:$LINENO: WARNING: Cannot set run path during linking" >&5
 
29581
echo "$as_me: WARNING: Cannot set run path during linking" >&2;}
 
29582
fi
 
29583
 
22410
29584
#--------------------------------------------------------------------
22411
29585
# Os mon stuff.
22412
29586
#--------------------------------------------------------------------
22493
29667
esac
22494
29668
 
22495
29669
 
 
29670
 
 
29671
# Check whether --with-javac or --without-javac was given.
 
29672
if test "${with_javac+set}" = set; then
 
29673
  withval="$with_javac"
 
29674
 
 
29675
fi;
 
29676
 
22496
29677
need_java="jinterface ic/java_src"
22497
29678
 
22498
29679
# Remove all SKIP files from previous runs
22500
29681
  /bin/rm -f $ERL_TOP/lib/$a/SKIP
22501
29682
done
22502
29683
 
22503
 
for ac_prog in javac.sh javac guavac gcj jikes bock
 
29684
if test "X$with_javac" = "Xno"; then
 
29685
  for a in $need_java ; do
 
29686
        echo "Java compiler disabled by user" > $ERL_TOP/lib/$a/SKIP
 
29687
  done
 
29688
 
 
29689
else # begin - try to find javac
 
29690
 
 
29691
if test "X$with_javac" != "Xyes" -a "X$with_javac" != "X"; then
 
29692
    check_javac=$with_javac
 
29693
else
 
29694
  check_javac="javac.sh javac guavac gcj jikes bock"
 
29695
fi
 
29696
 
 
29697
for ac_prog in $check_javac
22504
29698
do
22505
29699
  # Extract the first word of "$ac_prog", so it can be a program name with args.
22506
29700
set dummy $ac_prog; ac_word=$2
22576
29770
  fi
22577
29771
fi
22578
29772
if test -z "$JAVAC"; then
 
29773
 
 
29774
  if test "X$with_javac" != "X"; then
 
29775
        { { echo "$as_me:$LINENO: error: No java compiler found in PATH (checked for $check_javac)" >&5
 
29776
echo "$as_me: error: No java compiler found in PATH (checked for $check_javac)" >&2;}
 
29777
   { (exit 1); exit 1; }; }
 
29778
  fi
 
29779
 
22579
29780
  { echo "$as_me:$LINENO: WARNING: Could not find any usable java compiler, will skip: jinterface" >&5
22580
29781
echo "$as_me: WARNING: Could not find any usable java compiler, will skip: jinterface" >&2;}
22581
29782
 
22584
29785
  done
22585
29786
fi
22586
29787
 
22587
 
CXXFLAGS=
22588
 
 
22589
 
for ac_prog in $CCC c++ g++ CC cxx cc++ cl
22590
 
do
22591
 
  # Extract the first word of "$ac_prog", so it can be a program name with args.
22592
 
set dummy $ac_prog; ac_word=$2
 
29788
fi # end - try to find javac
 
29789
 
 
29790
 
 
29791
if test -n "$ac_tool_prefix"; then
 
29792
  for ac_prog in $CCC c++ g++ CC cxx cc++ cl
 
29793
  do
 
29794
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 
29795
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22593
29796
echo "$as_me:$LINENO: checking for $ac_word" >&5
22594
29797
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22595
29798
if test "${ac_cv_prog_CXX+set}" = set; then
22605
29808
  test -z "$as_dir" && as_dir=.
22606
29809
  for ac_exec_ext in '' $ac_executable_extensions; do
22607
29810
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22608
 
    ac_cv_prog_CXX="$ac_prog"
 
29811
    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
22609
29812
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22610
29813
    break 2
22611
29814
  fi
22623
29826
echo "${ECHO_T}no" >&6
22624
29827
fi
22625
29828
 
22626
 
  test -n "$CXX" && break
22627
 
done
22628
 
test -n "$CXX" || CXX="false"
 
29829
    test -n "$CXX" && break
 
29830
  done
 
29831
fi
 
29832
if test -z "$CXX"; then
 
29833
  ac_ct_CXX=$CXX
 
29834
  for ac_prog in $CCC c++ g++ CC cxx cc++ cl
 
29835
do
 
29836
  # Extract the first word of "$ac_prog", so it can be a program name with args.
 
29837
set dummy $ac_prog; ac_word=$2
 
29838
echo "$as_me:$LINENO: checking for $ac_word" >&5
 
29839
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 
29840
if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
 
29841
  echo $ECHO_N "(cached) $ECHO_C" >&6
 
29842
else
 
29843
  if test -n "$ac_ct_CXX"; then
 
29844
  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
 
29845
else
 
29846
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
29847
for as_dir in $PATH
 
29848
do
 
29849
  IFS=$as_save_IFS
 
29850
  test -z "$as_dir" && as_dir=.
 
29851
  for ac_exec_ext in '' $ac_executable_extensions; do
 
29852
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
 
29853
    ac_cv_prog_ac_ct_CXX="$ac_prog"
 
29854
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
 
29855
    break 2
 
29856
  fi
 
29857
done
 
29858
done
 
29859
 
 
29860
fi
 
29861
fi
 
29862
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
 
29863
if test -n "$ac_ct_CXX"; then
 
29864
  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
 
29865
echo "${ECHO_T}$ac_ct_CXX" >&6
 
29866
else
 
29867
  echo "$as_me:$LINENO: result: no" >&5
 
29868
echo "${ECHO_T}no" >&6
 
29869
fi
 
29870
 
 
29871
  test -n "$ac_ct_CXX" && break
 
29872
done
 
29873
test -n "$ac_ct_CXX" || ac_ct_CXX="false"
 
29874
 
 
29875
  CXX=$ac_ct_CXX
 
29876
fi
22629
29877
 
22630
29878
 
22631
29879
# Remove SKIP file from previous run
22692
29940
 
22693
29941
 
22694
29942
 
22695
 
                                                                                                                                                                                                        ac_config_files="$ac_config_files emulator/$host/Makefile:emulator/Makefile.in emulator/zlib/$host/Makefile:emulator/zlib/Makefile.in emulator/pcre/$host/Makefile:emulator/pcre/Makefile.in epmd/src/$host/Makefile:epmd/src/Makefile.in etc/common/$host/Makefile:etc/common/Makefile.in include/internal/$host/ethread.mk:include/internal/ethread.mk.in include/internal/$host/erts_internal.mk:include/internal/erts_internal.mk.in lib_src/$host/Makefile:lib_src/Makefile.in Makefile:Makefile.in ../make/$host/otp.mk:../make/otp.mk.in ../make/$host/otp_ded.mk:../make/otp_ded.mk.in ../lib/ic/c_src/$host/Makefile:../lib/ic/c_src/Makefile.in ../lib/os_mon/c_src/$host/Makefile:../lib/os_mon/c_src/Makefile.in ../lib/ssl/c_src/$host/Makefile:../lib/ssl/c_src/Makefile.in ../lib/ssl/examples/certs/$host/Makefile:../lib/ssl/examples/certs/Makefile.in ../lib/crypto/c_src/$host/Makefile:../lib/crypto/c_src/Makefile.in ../lib/orber/c_src/$host/Makefile:../lib/orber/c_src/Makefile.in ../lib/runtime_tools/c_src/$host/Makefile:../lib/runtime_tools/c_src/Makefile.in ../lib/tools/c_src/$host/Makefile:../lib/tools/c_src/Makefile.in ../lib/asn1/c_src/$host/Makefile:../lib/asn1/c_src/Makefile.in"
 
29943
                                                                                                                                                                                    ac_config_files="$ac_config_files emulator/$host/Makefile:emulator/Makefile.in emulator/zlib/$host/Makefile:emulator/zlib/Makefile.in emulator/pcre/$host/Makefile:emulator/pcre/Makefile.in epmd/src/$host/Makefile:epmd/src/Makefile.in etc/common/$host/Makefile:etc/common/Makefile.in include/internal/$host/ethread.mk:include/internal/ethread.mk.in include/internal/$host/erts_internal.mk:include/internal/erts_internal.mk.in lib_src/$host/Makefile:lib_src/Makefile.in Makefile:Makefile.in ../make/$host/otp.mk:../make/otp.mk.in ../make/$host/otp_ded.mk:../make/otp_ded.mk.in ../lib/ic/c_src/$host/Makefile:../lib/ic/c_src/Makefile.in ../lib/os_mon/c_src/$host/Makefile:../lib/os_mon/c_src/Makefile.in ../lib/ssl/c_src/$host/Makefile:../lib/ssl/c_src/Makefile.in ../lib/crypto/c_src/$host/Makefile:../lib/crypto/c_src/Makefile.in ../lib/orber/c_src/$host/Makefile:../lib/orber/c_src/Makefile.in ../lib/runtime_tools/c_src/$host/Makefile:../lib/runtime_tools/c_src/Makefile.in ../lib/tools/c_src/$host/Makefile:../lib/tools/c_src/Makefile.in"
22696
29944
cat >confcache <<\_ACEOF
22697
29945
# This file is a shell script that caches the results of configure
22698
29946
# tests run on this system so they can be shared between configure
23232
30480
  "../lib/ic/c_src/$host/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../lib/ic/c_src/$host/Makefile:../lib/ic/c_src/Makefile.in" ;;
23233
30481
  "../lib/os_mon/c_src/$host/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../lib/os_mon/c_src/$host/Makefile:../lib/os_mon/c_src/Makefile.in" ;;
23234
30482
  "../lib/ssl/c_src/$host/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../lib/ssl/c_src/$host/Makefile:../lib/ssl/c_src/Makefile.in" ;;
23235
 
  "../lib/ssl/examples/certs/$host/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../lib/ssl/examples/certs/$host/Makefile:../lib/ssl/examples/certs/Makefile.in" ;;
23236
30483
  "../lib/crypto/c_src/$host/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../lib/crypto/c_src/$host/Makefile:../lib/crypto/c_src/Makefile.in" ;;
23237
30484
  "../lib/orber/c_src/$host/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../lib/orber/c_src/$host/Makefile:../lib/orber/c_src/Makefile.in" ;;
23238
30485
  "../lib/runtime_tools/c_src/$host/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../lib/runtime_tools/c_src/$host/Makefile:../lib/runtime_tools/c_src/Makefile.in" ;;
23239
30486
  "../lib/tools/c_src/$host/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../lib/tools/c_src/$host/Makefile:../lib/tools/c_src/Makefile.in" ;;
23240
 
  "../lib/asn1/c_src/$host/Makefile" ) CONFIG_FILES="$CONFIG_FILES ../lib/asn1/c_src/$host/Makefile:../lib/asn1/c_src/Makefile.in" ;;
23241
30487
  "$host/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS $host/config.h:config.h.in" ;;
23242
30488
  "include/internal/$host/ethread_header_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/internal/$host/ethread_header_config.h:include/internal/ethread_header_config.h.in" ;;
23243
30489
  "include/$host/erl_int_sizes_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/$host/erl_int_sizes_config.h:include/erl_int_sizes_config.h.in" ;;
23325
30571
s,@ECHO_N@,$ECHO_N,;t t
23326
30572
s,@ECHO_T@,$ECHO_T,;t t
23327
30573
s,@LIBS@,$LIBS,;t t
 
30574
s,@ERL_TOP@,$ERL_TOP,;t t
 
30575
s,@CC@,$CC,;t t
 
30576
s,@CFLAGS@,$CFLAGS,;t t
 
30577
s,@STATIC_CFLAGS@,$STATIC_CFLAGS,;t t
 
30578
s,@CFLAG_RUNTIME_LIBRARY_PATH@,$CFLAG_RUNTIME_LIBRARY_PATH,;t t
 
30579
s,@CPP@,$CPP,;t t
 
30580
s,@CPPFLAGS@,$CPPFLAGS,;t t
 
30581
s,@CXX@,$CXX,;t t
 
30582
s,@CXXFLAGS@,$CXXFLAGS,;t t
 
30583
s,@LD@,$LD,;t t
 
30584
s,@LDFLAGS@,$LDFLAGS,;t t
 
30585
s,@DED_LD@,$DED_LD,;t t
 
30586
s,@DED_LDFLAGS@,$DED_LDFLAGS,;t t
 
30587
s,@DED_LD_FLAG_RUNTIME_LIBRARY_PATH@,$DED_LD_FLAG_RUNTIME_LIBRARY_PATH,;t t
 
30588
s,@LFS_CFLAGS@,$LFS_CFLAGS,;t t
 
30589
s,@LFS_LDFLAGS@,$LFS_LDFLAGS,;t t
 
30590
s,@LFS_LIBS@,$LFS_LIBS,;t t
 
30591
s,@RANLIB@,$RANLIB,;t t
 
30592
s,@AR@,$AR,;t t
 
30593
s,@GETCONF@,$GETCONF,;t t
 
30594
s,@erl_xcomp_sysroot@,$erl_xcomp_sysroot,;t t
 
30595
s,@erl_xcomp_isysroot@,$erl_xcomp_isysroot,;t t
 
30596
s,@erl_xcomp_bigendian@,$erl_xcomp_bigendian,;t t
 
30597
s,@erl_xcomp_linux_clock_gettime_correction@,$erl_xcomp_linux_clock_gettime_correction,;t t
 
30598
s,@erl_xcomp_linux_nptl@,$erl_xcomp_linux_nptl,;t t
 
30599
s,@erl_xcomp_linux_usable_sigusrx@,$erl_xcomp_linux_usable_sigusrx,;t t
 
30600
s,@erl_xcomp_linux_usable_sigaltstack@,$erl_xcomp_linux_usable_sigaltstack,;t t
 
30601
s,@erl_xcomp_poll@,$erl_xcomp_poll,;t t
 
30602
s,@erl_xcomp_kqueue@,$erl_xcomp_kqueue,;t t
 
30603
s,@erl_xcomp_putenv_copy@,$erl_xcomp_putenv_copy,;t t
 
30604
s,@erl_xcomp_reliable_fpe@,$erl_xcomp_reliable_fpe,;t t
 
30605
s,@erl_xcomp_getaddrinfo@,$erl_xcomp_getaddrinfo,;t t
 
30606
s,@erl_xcomp_gethrvtime_procfs_ioctl@,$erl_xcomp_gethrvtime_procfs_ioctl,;t t
 
30607
s,@erl_xcomp_clock_gettime_cpu_time@,$erl_xcomp_clock_gettime_cpu_time,;t t
 
30608
s,@erl_xcomp_after_morecore_hook@,$erl_xcomp_after_morecore_hook,;t t
 
30609
s,@erl_xcomp_dlsym_brk_wrappers@,$erl_xcomp_dlsym_brk_wrappers,;t t
23328
30610
s,@build@,$build,;t t
23329
30611
s,@build_cpu@,$build_cpu,;t t
23330
30612
s,@build_vendor@,$build_vendor,;t t
23333
30615
s,@host_cpu@,$host_cpu,;t t
23334
30616
s,@host_vendor@,$host_vendor,;t t
23335
30617
s,@host_os@,$host_os,;t t
23336
 
s,@CC@,$CC,;t t
23337
 
s,@CFLAGS@,$CFLAGS,;t t
23338
 
s,@LDFLAGS@,$LDFLAGS,;t t
23339
 
s,@CPPFLAGS@,$CPPFLAGS,;t t
 
30618
s,@CROSS_COMPILING@,$CROSS_COMPILING,;t t
23340
30619
s,@ac_ct_CC@,$ac_ct_CC,;t t
23341
30620
s,@EXEEXT@,$EXEEXT,;t t
23342
30621
s,@OBJEXT@,$OBJEXT,;t t
23343
30622
s,@ENABLE_ALLOC_TYPE_VARS@,$ENABLE_ALLOC_TYPE_VARS,;t t
23344
30623
s,@PERFCTR_PATH@,$PERFCTR_PATH,;t t
23345
30624
s,@OTP_RELEASE@,$OTP_RELEASE,;t t
 
30625
s,@GCC@,$GCC,;t t
23346
30626
s,@MIXED_CYGWIN_VC@,$MIXED_CYGWIN_VC,;t t
23347
30627
s,@MIXED_CYGWIN_MINGW@,$MIXED_CYGWIN_MINGW,;t t
23348
30628
s,@MIXED_CYGWIN@,$MIXED_CYGWIN,;t t
 
30629
s,@ac_pt_GETCONF@,$ac_pt_GETCONF,;t t
23349
30630
s,@DEBUG_FLAGS@,$DEBUG_FLAGS,;t t
23350
30631
s,@DEBUG_CFLAGS@,$DEBUG_CFLAGS,;t t
23351
30632
s,@WFLAGS@,$WFLAGS,;t t
23352
 
s,@CFLAG_RUNTIME_LIBRARY_PATH@,$CFLAG_RUNTIME_LIBRARY_PATH,;t t
23353
 
s,@CPP@,$CPP,;t t
23354
30633
s,@EGREP@,$EGREP,;t t
 
30634
s,@EXTERNAL_WORD_SIZE@,$EXTERNAL_WORD_SIZE,;t t
23355
30635
s,@OPSYS@,$OPSYS,;t t
23356
30636
s,@ARCH@,$ARCH,;t t
23357
30637
s,@LIBCARBON@,$LIBCARBON,;t t
23358
 
s,@RANLIB@,$RANLIB,;t t
23359
30638
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23360
30639
s,@YACC@,$YACC,;t t
23361
30640
s,@PERL@,$PERL,;t t
23362
30641
s,@LN_S@,$LN_S,;t t
23363
 
s,@AR@,$AR,;t t
 
30642
s,@ac_ct_AR@,$ac_ct_AR,;t t
23364
30643
s,@RM@,$RM,;t t
23365
30644
s,@MKDIR@,$MKDIR,;t t
23366
30645
s,@XSLTPROC@,$XSLTPROC,;t t
23372
30651
s,@HCC@,$HCC,;t t
23373
30652
s,@HCFLAGS@,$HCFLAGS,;t t
23374
30653
s,@vxworks_reclaim@,$vxworks_reclaim,;t t
23375
 
s,@LD@,$LD,;t t
 
30654
s,@LDFLAG_RUNTIME_LIBRARY_PATH@,$LDFLAG_RUNTIME_LIBRARY_PATH,;t t
23376
30655
s,@ERLANG_OSTYPE@,$ERLANG_OSTYPE,;t t
23377
30656
s,@DEXPORT@,$DEXPORT,;t t
 
30657
s,@ERTS_INTERNAL_X_LIBS@,$ERTS_INTERNAL_X_LIBS,;t t
23378
30658
s,@ETHR_X_LIBS@,$ETHR_X_LIBS,;t t
23379
30659
s,@ETHR_LIBS@,$ETHR_LIBS,;t t
23380
30660
s,@ETHR_LIB_NAME@,$ETHR_LIB_NAME,;t t
23381
30661
s,@ETHR_DEFS@,$ETHR_DEFS,;t t
23382
30662
s,@ETHR_THR_LIB_BASE@,$ETHR_THR_LIB_BASE,;t t
23383
 
s,@ETHR_THR_LIB_BASE_NAME@,$ETHR_THR_LIB_BASE_NAME,;t t
 
30663
s,@ETHR_THR_LIB_BASE_DIR@,$ETHR_THR_LIB_BASE_DIR,;t t
23384
30664
s,@ERTS_BUILD_SMP_EMU@,$ERTS_BUILD_SMP_EMU,;t t
23385
30665
s,@EMU_THR_LIB_NAME@,$EMU_THR_LIB_NAME,;t t
23386
30666
s,@EMU_THR_X_LIBS@,$EMU_THR_X_LIBS,;t t
23387
30667
s,@EMU_THR_LIBS@,$EMU_THR_LIBS,;t t
23388
30668
s,@EMU_THR_DEFS@,$EMU_THR_DEFS,;t t
23389
30669
s,@EMU_LOCK_CHECKING@,$EMU_LOCK_CHECKING,;t t
23390
 
s,@ERTS_INTERNAL_X_LIBS@,$ERTS_INTERNAL_X_LIBS,;t t
23391
30670
s,@THR_LIBS@,$THR_LIBS,;t t
23392
30671
s,@THR_DEFS@,$THR_DEFS,;t t
23393
30672
s,@TERMCAP_LIB@,$TERMCAP_LIB,;t t
23404
30683
s,@NATIVE_LIBS_ENABLED@,$NATIVE_LIBS_ENABLED,;t t
23405
30684
s,@USE_PERFCTR@,$USE_PERFCTR,;t t
23406
30685
s,@ERTS_ENABLE_KERNEL_POLL@,$ERTS_ENABLE_KERNEL_POLL,;t t
 
30686
s,@ac_ct_DED_LD@,$ac_ct_DED_LD,;t t
 
30687
s,@DED_EXT@,$DED_EXT,;t t
 
30688
s,@DED_SYS_INCLUDE@,$DED_SYS_INCLUDE,;t t
23407
30689
s,@DED_CFLAGS@,$DED_CFLAGS,;t t
23408
 
s,@DED_LD@,$DED_LD,;t t
23409
 
s,@DED_LDFLAGS@,$DED_LDFLAGS,;t t
23410
 
s,@DED_LD_FLAG_RUNTIME_LIBRARY_PATH@,$DED_LD_FLAG_RUNTIME_LIBRARY_PATH,;t t
23411
 
s,@STATIC_CFLAGS@,$STATIC_CFLAGS,;t t
 
30690
s,@DED_THR_DEFS@,$DED_THR_DEFS,;t t
 
30691
s,@DED_EMU_THR_DEFS@,$DED_EMU_THR_DEFS,;t t
23412
30692
s,@EMU_CC@,$EMU_CC,;t t
23413
30693
s,@SSL_INCLUDE@,$SSL_INCLUDE,;t t
23414
30694
s,@SSL_ROOT@,$SSL_ROOT,;t t
23415
30695
s,@SSL_LIBDIR@,$SSL_LIBDIR,;t t
 
30696
s,@SSL_CC_RUNTIME_LIBRARY_PATH@,$SSL_CC_RUNTIME_LIBRARY_PATH,;t t
 
30697
s,@SSL_LD_RUNTIME_LIBRARY_PATH@,$SSL_LD_RUNTIME_LIBRARY_PATH,;t t
 
30698
s,@SSL_DED_LD_RUNTIME_LIBRARY_PATH@,$SSL_DED_LD_RUNTIME_LIBRARY_PATH,;t t
23416
30699
s,@SSL_DYNAMIC_ONLY@,$SSL_DYNAMIC_ONLY,;t t
23417
30700
s,@SSL_LINK_WITH_KERBEROS@,$SSL_LINK_WITH_KERBEROS,;t t
23418
30701
s,@STATIC_KERBEROS_LIBS@,$STATIC_KERBEROS_LIBS,;t t
23419
30702
s,@SSL_LINK_WITH_ZLIB@,$SSL_LINK_WITH_ZLIB,;t t
23420
30703
s,@STATIC_ZLIB_LIBS@,$STATIC_ZLIB_LIBS,;t t
23421
 
s,@OPENSSL_CMD@,$OPENSSL_CMD,;t t
23422
30704
s,@REGTOOL@,$REGTOOL,;t t
23423
30705
s,@os_mon_programs@,$os_mon_programs,;t t
23424
30706
s,@CPU_SUP_LIBS@,$CPU_SUP_LIBS,;t t
23425
30707
s,@JAVAC@,$JAVAC,;t t
23426
 
s,@CXXFLAGS@,$CXXFLAGS,;t t
23427
 
s,@CXX@,$CXX,;t t
 
30708
s,@ac_ct_CXX@,$ac_ct_CXX,;t t
23428
30709
s,@CC32@,$CC32,;t t
23429
30710
s,@CFLAGS32@,$CFLAGS32,;t t
23430
30711
s,@LIBOBJS@,$LIBOBJS,;t t