From 52e3f542fd9c5c76704d2cfe402757c54a8a1cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Backstr=C3=B6m?= Date: Mon, 24 Feb 2025 14:27:35 +0100 Subject: [PATCH] Update congire --- erts/configure | 108 +- lib/crypto/configure | 271 +- lib/erl_interface/configure | 238 +- lib/megaco/configure | 118 +- lib/odbc/configure | 3882 ++++++++++++++-------------- lib/wx/configure | 4864 ++++++++++++++++++----------------- make/configure | 180 +- 7 files changed, 5012 insertions(+), 4649 deletions(-) diff --git a/erts/configure b/erts/configure index 5c4c53b10ad7..5436623dff20 100755 --- a/erts/configure +++ b/erts/configure @@ -6249,9 +6249,8 @@ else case e in #( { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-protector-strong to LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -fstack-protector-strong to LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-fstack-protector-strong; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-fstack-protector-strong"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6263,15 +6262,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6723,9 +6723,8 @@ then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,noexecstack to LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,-z,noexecstack to LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,noexecstack; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,-z,noexecstack"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6737,15 +6736,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6766,9 +6766,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,relro to LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,-z,relro to LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,relro; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,-z,relro"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6780,15 +6779,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6809,9 +6809,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,now to LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,-z,now to LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,now; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,-z,now"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6823,15 +6822,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6852,9 +6852,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,--as-needed to LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,--as-needed to LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,--as-needed; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,--as-needed"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6866,15 +6865,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6895,9 +6895,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,--no-copy-dt-needed-entries to LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,--no-copy-dt-needed-entries to LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,--no-copy-dt-needed-entries; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,--no-copy-dt-needed-entries"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6909,15 +6908,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : diff --git a/lib/crypto/configure b/lib/crypto/configure index eefe598819f3..e3be3afdb2cf 100755 --- a/lib/crypto/configure +++ b/lib/crypto/configure @@ -4487,6 +4487,159 @@ fi fi +for ac_prog in ld.sh +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_LD+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$LD"; then + ac_cv_prog_LD="$LD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_LD="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi ;; +esac +fi +LD=$ac_cv_prog_LD +if test -n "$LD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +printf "%s\n" "$LD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$LD" && break +done + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}${CC}", so it can be a program name with args. +set dummy ${ac_tool_prefix}${CC}; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_LD+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$LD"; then + ac_cv_prog_LD="$LD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_LD="${ac_tool_prefix}${CC}" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi ;; +esac +fi +LD=$ac_cv_prog_LD +if test -n "$LD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +printf "%s\n" "$LD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LD"; then + ac_ct_LD=$LD + # Extract the first word of "${CC}", so it can be a program name with args. +set dummy ${CC}; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_LD+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$ac_ct_LD"; then + ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_LD="${CC}" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi ;; +esac +fi +ac_ct_LD=$ac_cv_prog_ac_ct_LD +if test -n "$ac_ct_LD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LD" >&5 +printf "%s\n" "$ac_ct_LD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_LD" = x; then + LD="'$(CC)'" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LD=$ac_ct_LD + fi +else + LD="$ac_cv_prog_LD" +fi + + ac_header= ac_cache= for ac_item in $ac_header_c_list @@ -5563,12 +5716,10 @@ if test "x$DED_LD" = "x"; then DED_LD_FLAG_RUNTIME_LIBRARY_PATH="-R" case $host_os in win32) - DED_LD="ld.sh" DED_LDFLAGS="-dll" DED_LD_FLAG_RUNTIME_LIBRARY_PATH= ;; solaris2*|sysv4*) - DED_LD="$CC" DED_LDFLAGS="-G" if test X${enable_m64_build} = Xyes; then DED_LDFLAGS="-64 $DED_LDFLAGS" @@ -5584,8 +5735,6 @@ if test "x$DED_LD" = "x"; then darwin*) # Mach-O linker: a shared lib and a loadable object file is not the same thing. - DED_LD="$CC" - if test "X${ERL_DED_FLAT_BUNDLE}" = "Xtrue"; then # EI sets this variable when building its .so file as beam.smp # has not been built yet and any ei lib will not @@ -5652,7 +5801,6 @@ printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH" ;; linux*) - DED_LD="$CC" DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH" DED_LDFLAGS="-shared -Wl,-Bsymbolic" if test X${enable_m64_build} = Xyes; then @@ -5663,7 +5811,6 @@ printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h fi ;; freebsd*) - DED_LD="$CC" DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH" DED_LDFLAGS="-shared" if test X${enable_m64_build} = Xyes; then @@ -5674,7 +5821,6 @@ printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h fi ;; openbsd*) - DED_LD="$CC" DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH" DED_LDFLAGS="-shared" ;; @@ -5806,8 +5952,6 @@ fi test "$DED_LD" != "false" || as_fn_error $? "No linker found" "$LINENO" 5 -saved_LD="$LD" -LD="${DED_LD:-$LD}"" if test "X$host" = "Xwin32" then : @@ -6049,9 +6193,8 @@ else case e in #( { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-protector-strong to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -fstack-protector-strong to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-fstack-protector-strong; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-fstack-protector-strong"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6063,15 +6206,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6476,9 +6620,8 @@ then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,noexecstack to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,-z,noexecstack to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,noexecstack; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,-z,noexecstack"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6490,15 +6633,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6519,9 +6663,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,relro to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,-z,relro to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,relro; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,-z,relro"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6533,15 +6676,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6562,9 +6706,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,now to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,-z,now to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,now; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,-z,now"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6576,15 +6719,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6605,9 +6749,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,--as-needed to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,--as-needed to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,--as-needed; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,--as-needed"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6619,15 +6762,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6648,9 +6792,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,--no-copy-dt-needed-entries to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,--no-copy-dt-needed-entries to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,--no-copy-dt-needed-entries; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,--no-copy-dt-needed-entries"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6662,15 +6805,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6690,7 +6834,6 @@ fi fi -LD="$saved_LD" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for static compiler flags" >&5 printf %s "checking for static compiler flags... " >&6; } diff --git a/lib/erl_interface/configure b/lib/erl_interface/configure index b61ac4e040de..9d6b84e44c8d 100755 --- a/lib/erl_interface/configure +++ b/lib/erl_interface/configure @@ -4666,8 +4666,8 @@ fi done if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args. -set dummy ${ac_tool_prefix}ld; ac_word=$2 + # Extract the first word of "${ac_tool_prefix}${CC}", so it can be a program name with args. +set dummy ${ac_tool_prefix}${CC}; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_LD+y} @@ -4688,7 +4688,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_LD="${ac_tool_prefix}ld" + ac_cv_prog_LD="${ac_tool_prefix}${CC}" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4712,8 +4712,8 @@ fi fi if test -z "$ac_cv_prog_LD"; then ac_ct_LD=$LD - # Extract the first word of "ld", so it can be a program name with args. -set dummy ld; ac_word=$2 + # Extract the first word of "${CC}", so it can be a program name with args. +set dummy ${CC}; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_LD+y} @@ -4734,7 +4734,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_LD="ld" + ac_cv_prog_ac_ct_LD="${CC}" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5309,12 +5309,10 @@ if test "x$DED_LD" = "x"; then DED_LD_FLAG_RUNTIME_LIBRARY_PATH="-R" case $host_os in win32) - DED_LD="ld.sh" DED_LDFLAGS="-dll" DED_LD_FLAG_RUNTIME_LIBRARY_PATH= ;; solaris2*|sysv4*) - DED_LD="$CC" DED_LDFLAGS="-G" if test X${enable_m64_build} = Xyes; then DED_LDFLAGS="-64 $DED_LDFLAGS" @@ -5330,8 +5328,6 @@ if test "x$DED_LD" = "x"; then darwin*) # Mach-O linker: a shared lib and a loadable object file is not the same thing. - DED_LD="$CC" - if test "X${ERL_DED_FLAT_BUNDLE}" = "Xtrue"; then # EI sets this variable when building its .so file as beam.smp # has not been built yet and any ei lib will not @@ -5398,7 +5394,6 @@ printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH" ;; linux*) - DED_LD="$CC" DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH" DED_LDFLAGS="-shared -Wl,-Bsymbolic" if test X${enable_m64_build} = Xyes; then @@ -5409,7 +5404,6 @@ printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h fi ;; freebsd*) - DED_LD="$CC" DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH" DED_LDFLAGS="-shared" if test X${enable_m64_build} = Xyes; then @@ -5420,7 +5414,6 @@ printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h fi ;; openbsd*) - DED_LD="$CC" DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH" DED_LDFLAGS="-shared" ;; @@ -5552,8 +5545,6 @@ fi test "$DED_LD" != "false" || as_fn_error $? "No linker found" "$LINENO" 5 -saved_LD="$LD" -LD="${DED_LD:-$LD}"" if test "X$host" = "Xwin32" then : @@ -5795,9 +5786,8 @@ else case e in #( { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-protector-strong to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -fstack-protector-strong to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-fstack-protector-strong; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-fstack-protector-strong"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5809,15 +5799,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6222,9 +6213,8 @@ then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,noexecstack to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,-z,noexecstack to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,noexecstack; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,-z,noexecstack"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6236,15 +6226,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6265,9 +6256,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,relro to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,-z,relro to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,relro; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,-z,relro"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6279,15 +6269,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6308,9 +6299,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,now to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,-z,now to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,now; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,-z,now"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6322,15 +6312,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6351,9 +6342,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,--as-needed to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,--as-needed to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,--as-needed; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,--as-needed"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6365,15 +6355,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6394,9 +6385,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,--no-copy-dt-needed-entries to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,--no-copy-dt-needed-entries to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,--no-copy-dt-needed-entries; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,--no-copy-dt-needed-entries"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6408,15 +6398,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6436,7 +6427,6 @@ fi fi -LD="$saved_LD" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for static compiler flags" >&5 printf %s "checking for static compiler flags... " >&6; } @@ -11067,9 +11057,8 @@ else case e in #( { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-protector-strong to LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -fstack-protector-strong to LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-fstack-protector-strong; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-fstack-protector-strong"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11081,15 +11070,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -11541,9 +11531,8 @@ then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,noexecstack to LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,-z,noexecstack to LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,noexecstack; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,-z,noexecstack"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11555,15 +11544,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -11584,9 +11574,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,relro to LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,-z,relro to LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,relro; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,-z,relro"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11598,15 +11587,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -11627,9 +11617,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,now to LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,-z,now to LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,now; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,-z,now"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11641,15 +11630,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -11670,9 +11660,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,--as-needed to LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,--as-needed to LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,--as-needed; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,--as-needed"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11684,15 +11673,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -11713,9 +11703,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,--no-copy-dt-needed-entries to LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,--no-copy-dt-needed-entries to LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,--no-copy-dt-needed-entries; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,--no-copy-dt-needed-entries"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11727,15 +11716,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : diff --git a/lib/megaco/configure b/lib/megaco/configure index 5448fbf0c7a2..489dea22d527 100755 --- a/lib/megaco/configure +++ b/lib/megaco/configure @@ -5616,12 +5616,10 @@ if test "x$DED_LD" = "x"; then DED_LD_FLAG_RUNTIME_LIBRARY_PATH="-R" case $host_os in win32) - DED_LD="ld.sh" DED_LDFLAGS="-dll" DED_LD_FLAG_RUNTIME_LIBRARY_PATH= ;; solaris2*|sysv4*) - DED_LD="$CC" DED_LDFLAGS="-G" if test X${enable_m64_build} = Xyes; then DED_LDFLAGS="-64 $DED_LDFLAGS" @@ -5637,8 +5635,6 @@ if test "x$DED_LD" = "x"; then darwin*) # Mach-O linker: a shared lib and a loadable object file is not the same thing. - DED_LD="$CC" - if test "X${ERL_DED_FLAT_BUNDLE}" = "Xtrue"; then # EI sets this variable when building its .so file as beam.smp # has not been built yet and any ei lib will not @@ -5705,7 +5701,6 @@ printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH" ;; linux*) - DED_LD="$CC" DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH" DED_LDFLAGS="-shared -Wl,-Bsymbolic" if test X${enable_m64_build} = Xyes; then @@ -5716,7 +5711,6 @@ printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h fi ;; freebsd*) - DED_LD="$CC" DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH" DED_LDFLAGS="-shared" if test X${enable_m64_build} = Xyes; then @@ -5727,7 +5721,6 @@ printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h fi ;; openbsd*) - DED_LD="$CC" DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH" DED_LDFLAGS="-shared" ;; @@ -5859,8 +5852,6 @@ fi test "$DED_LD" != "false" || as_fn_error $? "No linker found" "$LINENO" 5 -saved_LD="$LD" -LD="${DED_LD:-$LD}"" if test "X$host" = "Xwin32" then : @@ -6102,9 +6093,8 @@ else case e in #( { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-protector-strong to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -fstack-protector-strong to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-fstack-protector-strong; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-fstack-protector-strong"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6116,15 +6106,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6529,9 +6520,8 @@ then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,noexecstack to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,-z,noexecstack to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,noexecstack; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,-z,noexecstack"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6543,15 +6533,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6572,9 +6563,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,relro to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,-z,relro to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,relro; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,-z,relro"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6586,15 +6576,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6615,9 +6606,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,now to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,-z,now to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,now; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,-z,now"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6629,15 +6619,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6658,9 +6649,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,--as-needed to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,--as-needed to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,--as-needed; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,--as-needed"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6672,15 +6662,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6701,9 +6692,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,--no-copy-dt-needed-entries to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,--no-copy-dt-needed-entries to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,--no-copy-dt-needed-entries; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,--no-copy-dt-needed-entries"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6715,15 +6705,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -6743,7 +6734,6 @@ fi fi -LD="$saved_LD" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for static compiler flags" >&5 printf %s "checking for static compiler flags... " >&6; } diff --git a/lib/odbc/configure b/lib/odbc/configure index 55001dc4fddb..1d975c8db5ee 100755 --- a/lib/odbc/configure +++ b/lib/odbc/configure @@ -4364,8 +4364,8 @@ fi done if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args. -set dummy ${ac_tool_prefix}ld; ac_word=$2 + # Extract the first word of "${ac_tool_prefix}${CC}", so it can be a program name with args. +set dummy ${ac_tool_prefix}${CC}; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_LD+y} @@ -4386,7 +4386,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_LD="${ac_tool_prefix}ld" + ac_cv_prog_LD="${ac_tool_prefix}${CC}" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4410,8 +4410,8 @@ fi fi if test -z "$ac_cv_prog_LD"; then ac_ct_LD=$LD - # Extract the first word of "ld", so it can be a program name with args. -set dummy ld; ac_word=$2 + # Extract the first word of "${CC}", so it can be a program name with args. +set dummy ${CC}; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_LD+y} @@ -4432,7 +4432,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_LD="ld" + ac_cv_prog_ac_ct_LD="${CC}" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4470,1568 +4470,1144 @@ fi -_search_path=/bin:/usr/bin:/usr/local/bin:$PATH -# Extract the first word of "rm", so it can be a program name with args. -set dummy rm; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_RM+y} + if test "X$host" = "Xwin32" then : - printf %s "(cached) " >&6 + ossf_security_hardening_default=no else case e in #( - e) case $RM in - [\\/]* | ?:[\\/]*) - ac_cv_path_RM="$RM" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $_search_path -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_RM="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_RM" && ac_cv_path_RM="false" - ;; -esac ;; + e) ossf_security_hardening_default=yes ;; esac fi -RM=$ac_cv_path_RM -if test -n "$RM"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RM" >&5 -printf "%s\n" "$RM" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -if test "$ac_cv_path_RM" = false; then - as_fn_error $? "No 'rm' command found" "$LINENO" 5 + # Check whether --enable-security-hardening-flags was given. +if test ${enable_security_hardening_flags+y} +then : + enableval=$enable_security_hardening_flags; case "$enableval" in + no) ossf_security_hardening=no ;; + *) ossf_security_hardening=yes ;; + esac +else case e in #( + e) ossf_security_hardening=$ossf_security_hardening_default ;; +esac fi -_search_path= - - -ac_header= ac_cache= -for ac_item in $ac_header_c_list -do - if test $ac_cache; then - ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" - if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then - printf "%s\n" "#define $ac_item 1" >> confdefs.h - fi - ac_header= ac_cache= - elif test $ac_header; then - ac_cache=$ac_item - else - ac_header=$ac_item - fi -done - - - - - - -if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes + if test "$ossf_security_hardening" = "yes" then : -printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -printf %s "checking for grep that handles long lines and -e... " >&6; } -if test ${ac_cv_path_GREP+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" then : - printf %s "(cached) " >&6 + can_enable_flag=true else case e in #( - e) if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in grep ggrep - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in #( -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -#( -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - ;; + e) can_enable_flag=false ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -printf "%s\n" "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -if test "$with_odbc" = "no" +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" then : - - rm -f "$ERL_TOP/lib/odbc/SKIP" - + CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else case e in #( e) - - -# Sockets -#-------------------------------------------------------------------- -# Check for the existence of the -lsocket and -lnsl libraries. -# The order here is important, so that they end up in the right -# order in the command line generated by make. Here are some -# special considerations: -# 1. Use "connect" and "accept" to check for -lsocket, and -# "gethostbyname" to check for -lnsl. -# 2. Use each function name only once: can't redo a check because -# autoconf caches the results of the last check and won't redo it. -# 3. Use -lnsl and -lsocket only if they supply procedures that -# aren't already present in the normal libraries. This is because -# IRIX 5.2 has libraries, but they aren't needed and they're -# bogus: they goof up name resolution if used. -# 4. On some SVR4 systems, can't use -lsocket without -lnsl too. -# To get around this problem, check for both libraries together -# if -lsocket doesn't work by itself. -#-------------------------------------------------------------------- -erl_checkBoth=0 -ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" -if test "x$ac_cv_func_connect" = xyes -then : - erl_checkSocket=0 -else case e in #( - e) erl_checkSocket=1 ;; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac fi -if test "$erl_checkSocket" = 1 + if test "X$can_enable_flag" = "Xfalse" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 -printf %s "checking for socket in -lsocket... " >&6; } -if test ${ac_cv_lib_socket_socket+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char socket (void); + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int main (void) { -return socket (); +return 0; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - ac_cv_lib_socket_socket=yes + can_enable_flag=true else case e in #( - e) ac_cv_lib_socket_socket=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; + e) can_enable_flag=false ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 -printf "%s\n" "$ac_cv_lib_socket_socket" >&6; } -if test "x$ac_cv_lib_socket_socket" = xyes +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" then : - LIBS="$LIBS -lsocket" + + CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else case e in #( - e) erl_checkBoth=1 ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac fi fi -if test "$erl_checkBoth" = 1 -then : - tk_oldLibs=$LIBS - LIBS="$LIBS -lsocket -lnsl" - ac_fn_c_check_func "$LINENO" "accept" "ac_cv_func_accept" -if test "x$ac_cv_func_accept" = xyes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-clash-protection to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -fstack-clash-protection to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fstack-clash-protection $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" then : - odbc_erl_checkNsl=0 + can_enable_flag=true else case e in #( - e) LIBS=$tk_oldLibs ;; + e) can_enable_flag=false ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : + CFLAGS="-fstack-clash-protection $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -if test "x$ac_cv_func_gethostbyname" = xyes -then : -else case e in #( - e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5 -printf %s "checking for main in -lnsl... " >&6; } -if test ${ac_cv_lib_nsl_main+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-protector-strong to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -fstack-protector-strong to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fstack-protector-strong $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ int main (void) { -return main (); +return 0; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - ac_cv_lib_nsl_main=yes + can_enable_flag=true else case e in #( - e) ac_cv_lib_nsl_main=no ;; + e) can_enable_flag=false ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : + + CFLAGS="-fstack-protector-strong $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5 -printf "%s\n" "$ac_cv_lib_nsl_main" >&6; } -if test "x$ac_cv_lib_nsl_main" = xyes + + if test "X$can_enable_flag" = "Xfalse" then : - LIBS="$LIBS -lnsl" + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-protector to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -fstack-protector to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fstack-protector $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + can_enable_flag=true +else case e in #( + e) can_enable_flag=false ;; +esac fi - ;; +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : + + CFLAGS="-fstack-protector $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac fi -case "$host_os" in #( - haiku*) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5 -printf %s "checking for socket in -lnetwork... " >&6; } -if test ${ac_cv_lib_network_socket+y} -then : - printf %s "(cached) " >&6 else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-lnetwork $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + e) + # Some systems (solaris) also require this to be part of LDFLAGS + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-protector-strong to LDFLAGS (via LDFLAGS)" >&5 +printf %s "checking if we can add -fstack-protector-strong to LDFLAGS (via LDFLAGS)... " >&6; } + saved_LDFLAGS=$LDFLAGS; + saved_LDFLAG="-fstack-protector-strong"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char socket (void); int main (void) { -return socket (); +return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : - ac_cv_lib_network_socket=yes + can_enable_flag=true else case e in #( - e) ac_cv_lib_network_socket=no ;; + e) can_enable_flag=false + ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5 -printf "%s\n" "$ac_cv_lib_network_socket" >&6; } -if test "x$ac_cv_lib_network_socket" = xyes + LDFLAGS=$saved_LDFLAGS; + if test "X$can_enable_flag" = "Xtrue" then : - printf "%s\n" "#define HAVE_LIBNETWORK 1" >>confdefs.h - LIBS="-lnetwork $LIBS" + LDFLAGS="$saved_LDFLAG $LDFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi - ;; #( - *) : - ;; + + ;; esac +fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fcf-protection=full to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -fcf-protection=full to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fcf-protection=full $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -printf %s "checking for egrep... " >&6; } -if test ${ac_cv_path_EGREP+y} +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" then : - printf %s "(cached) " >&6 + can_enable_flag=true else case e in #( - e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in egrep - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in #( -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -#( -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi ;; + e) can_enable_flag=false ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -printf "%s\n" "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - EGREP_TRADITIONAL=$EGREP - ac_cv_path_EGREP_TRADITIONAL=$EGREP - - -ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" -if test "x$ac_cv_header_fcntl_h" = xyes +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" then : - printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h -fi -ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default" -if test "x$ac_cv_header_netdb_h" = xyes -then : - printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h + CFLAGS="-fcf-protection=full $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = xyes -then : - printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h -fi -ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" -if test "x$ac_cv_header_string_h" = xyes -then : - printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h -fi -ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_socket_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -mbranch-protection=standard to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -mbranch-protection=standard to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -mbranch-protection=standard $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -fi -ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" -if test "x$ac_cv_header_winsock2_h" = xyes +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" then : - printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h - + can_enable_flag=true +else case e in #( + e) can_enable_flag=false ;; +esac fi - -ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" -if test "x$ac_cv_header_windows_h" = xyes +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" then : - printf "%s\n" "#define HAVE_WINDOWS_H 1" >>confdefs.h + CFLAGS="-mbranch-protection=standard $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -printf %s "checking for an ANSI C-conforming const... " >&6; } -if test ${ac_cv_c_const+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fexceptions to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -fexceptions to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fexceptions $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { - -#ifndef __cplusplus - /* Ultrix mips cc rejects this sort of thing. */ - typedef int charset[2]; - const charset cs = { 0, 0 }; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* IBM XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this sort of thing. */ - char tx; - char *t = &tx; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; } bx; - struct s *b = &bx; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - +return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : - ac_cv_c_const=yes + can_enable_flag=true else case e in #( - e) ac_cv_c_const=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; + e) can_enable_flag=false ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -printf "%s\n" "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -printf "%s\n" "#define const /**/" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" then : + CFLAGS="-fexceptions $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else case e in #( e) -printf "%s\n" "#define size_t unsigned int" >>confdefs.h - ;; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac fi -ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_addr" "ac_cv_member_struct_sockaddr_in6_sin6_addr" "#if HAVE_WINSOCK2_H - #include - #include - #else - #include - #endif -" -if test "x$ac_cv_member_struct_sockaddr_in6_sin6_addr" = xyes -then : - -printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_ADDR 1" >>confdefs.h - -fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-strict-overflow to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -fno-strict-overflow to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fno-strict-overflow $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset" -if test "x$ac_cv_func_memset" = xyes +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" then : - printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h - + can_enable_flag=true +else case e in #( + e) can_enable_flag=false ;; +esac fi -ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" -if test "x$ac_cv_func_socket" = xyes +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" then : - printf "%s\n" "#define HAVE_SOCKET 1" >>confdefs.h + CFLAGS="-fno-strict-overflow $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi -# ODBC -$RM -f "$ERL_TOP/lib/odbc/SKIP" - - - -NEED_NPTL_PTHREAD_H=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-delete-null-pointer-checks to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -fno-delete-null-pointer-checks to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fno-delete-null-pointer-checks $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for native win32 threads" >&5 -printf %s "checking for native win32 threads... " >&6; } -if test "X$host_os" = "Xwin32" +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + can_enable_flag=true +else case e in #( + e) can_enable_flag=false ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + CFLAGS="-fno-delete-null-pointer-checks $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } - THR_DEFS="-DWIN32_THREADS" - THR_LIBS= - THR_LIB_NAME=win32_threads - THR_LIB_TYPE=win32_threads else case e in #( e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - THR_DEFS= - THR_LIBS= - THR_LIB_NAME= - THR_LIB_TYPE=posix_unknown + ;; +esac +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 -printf %s "checking for pthread_create in -lpthread... " >&6; } -if test ${ac_cv_lib_pthread_pthread_create+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-strict-aliasing to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -fno-strict-aliasing to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fno-strict-aliasing $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_create (void); int main (void) { -return pthread_create (); +return 0; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - ac_cv_lib_pthread_pthread_create=yes + can_enable_flag=true else case e in #( - e) ac_cv_lib_pthread_pthread_create=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; + e) can_enable_flag=false ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 -printf "%s\n" "$ac_cv_lib_pthread_pthread_create" >&6; } -if test "x$ac_cv_lib_pthread_pthread_create" = xyes +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" then : - THR_LIBS="-lpthread" -fi + CFLAGS="-fno-strict-aliasing $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } - if test "x$THR_LIBS" = "x" -then : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5 -printf %s "checking for pthread_create in -lc_r... " >&6; } -if test ${ac_cv_lib_c_r_pthread_create+y} -then : - printf %s "(cached) " >&6 else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-lc_r $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -ftrivial-auto-var-init=zero to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -ftrivial-auto-var-init=zero to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -ftrivial-auto-var-init=zero $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_create (void); int main (void) { -return pthread_create (); +return 0; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - ac_cv_lib_c_r_pthread_create=yes + can_enable_flag=true else case e in #( - e) ac_cv_lib_c_r_pthread_create=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; + e) can_enable_flag=false ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5 -printf "%s\n" "$ac_cv_lib_c_r_pthread_create" >&6; } -if test "x$ac_cv_lib_c_r_pthread_create" = xyes +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" then : - THR_LIBS="-lc_r" -fi + CFLAGS="-ftrivial-auto-var-init=zero $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi - if test "x$THR_LIBS" = "x" -then : - ac_fn_c_check_func "$LINENO" "pthread_create" "ac_cv_func_pthread_create" -if test "x$ac_cv_func_pthread_create" = xyes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstrict-flex-arrays=3 to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -fstrict-flex-arrays=3 to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fstrict-flex-arrays=3 $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" then : - THR_LIBS="none_needed" + can_enable_flag=true +else case e in #( + e) can_enable_flag=false ;; +esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : + CFLAGS="-fstrict-flex-arrays=3 $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi - if test "x$THR_LIBS" = "x" + if test "X$can_enable_flag" = "Xfalse" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the '-pthread' switch can be used" >&5 -printf %s "checking if the '-pthread' switch can be used... " >&6; } - saved_cflags=$CFLAGS - CFLAGS="$CFLAGS -pthread" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstrict-flex-arrays=2 to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -fstrict-flex-arrays=2 to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fstrict-flex-arrays=2 $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + int main (void) { -pthread_create((void*)0,(void*)0,(void*)0,(void*)0); +return 0; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" +if ac_fn_c_try_compile "$LINENO" then : - THR_DEFS="-pthread" - THR_LIBS="-pthread" + can_enable_flag=true +else case e in #( + e) can_enable_flag=false ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - CFLAGS=$saved_cflags - if test "x$THR_LIBS" != "x"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : + + CFLAGS="-fstrict-flex-arrays=2 $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - fi +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi - if test "x$THR_LIBS" != "x" + +else case e in #( + e) if test "X$can_enable_flag" != "Xtrue" then : + exit 1 +fi + ;; +esac +fi - THR_DEFS="$THR_DEFS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS" - THR_LIB_NAME=pthread - if test "x$THR_LIBS" = "xnone_needed"; then - THR_LIBS= - fi - case $host_os in #( - solaris*) : +fi - THR_DEFS="$THR_DEFS -D_POSIX_PTHREAD_SEMANTICS" - ;; #( - linux*) : - THR_DEFS="$THR_DEFS -D_POSIX_THREAD_SAFE_FUNCTIONS" + if test "$ossf_security_hardening" = "yes" +then : -if test "$cross_compiling" != "yes" -then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -D_GLIBCXX_ASSERTIONS to CXXFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -D_GLIBCXX_ASSERTIONS to CXXFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -D_GLIBCXX_ASSERTIONS $CXXFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - # Extract the first word of "getconf", so it can be a program name with args. -set dummy getconf; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_GETCONF+y} +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" then : - printf %s "(cached) " >&6 + can_enable_flag=true else case e in #( - e) if test -n "$GETCONF"; then - ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_GETCONF="getconf" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="false" -fi ;; + e) can_enable_flag=false ;; esac fi -GETCONF=$ac_cv_prog_GETCONF -if test -n "$GETCONF"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 -printf "%s\n" "$GETCONF" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : + CXXFLAGS="-D_GLIBCXX_ASSERTIONS $CXXFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else case e in #( e) - host_getconf="$host_alias-getconf" - # Extract the first word of "$host_getconf", so it can be a program name with args. -set dummy $host_getconf; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_GETCONF+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if test -n "$GETCONF"; then - ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_GETCONF="$host_getconf" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="false" -fi ;; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac fi -GETCONF=$ac_cv_prog_GETCONF -if test -n "$GETCONF"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 -printf "%s\n" "$GETCONF" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + + fi - if test "$GETCONF" = "false" && test "$erl_xcomp_sysroot" != "" + if test "$ossf_security_hardening" = "yes" then : - GETCONF= - prfx="$erl_xcomp_sysroot" - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}getconf", so it can be a program name with args. -set dummy ${ac_tool_prefix}getconf; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_GETCONF+y} + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,noexecstack to LDFLAGS (via LDFLAGS)" >&5 +printf %s "checking if we can add -Wl,-z,noexecstack to LDFLAGS (via LDFLAGS)... " >&6; } + saved_LDFLAGS=$LDFLAGS; + saved_LDFLAG="-Wl,-z,noexecstack"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" then : - printf %s "(cached) " >&6 + can_enable_flag=true else case e in #( - e) case $GETCONF in - [\\/]* | ?:[\\/]*) - ac_cv_path_GETCONF="$GETCONF" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_dummy=""$prfx/usr/bin:$prfx/bin:$prfx/usr/local/bin"" -for as_dir in $as_dummy -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_GETCONF="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac ;; + e) can_enable_flag=false + ;; esac fi -GETCONF=$ac_cv_path_GETCONF -if test -n "$GETCONF"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 -printf "%s\n" "$GETCONF" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$saved_LDFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : + + LDFLAGS="$saved_LDFLAG $LDFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + ;; +esac fi -fi -if test -z "$ac_cv_path_GETCONF"; then - ac_pt_GETCONF=$GETCONF - # Extract the first word of "getconf", so it can be a program name with args. -set dummy getconf; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_GETCONF+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,relro to LDFLAGS (via LDFLAGS)" >&5 +printf %s "checking if we can add -Wl,-z,relro to LDFLAGS (via LDFLAGS)... " >&6; } + saved_LDFLAGS=$LDFLAGS; + saved_LDFLAG="-Wl,-z,relro"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" then : - printf %s "(cached) " >&6 + can_enable_flag=true else case e in #( - e) case $ac_pt_GETCONF in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_GETCONF="$ac_pt_GETCONF" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_dummy=""$prfx/usr/bin:$prfx/bin:$prfx/usr/local/bin"" -for as_dir in $as_dummy -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_GETCONF="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac ;; + e) can_enable_flag=false + ;; esac fi -ac_pt_GETCONF=$ac_cv_path_ac_pt_GETCONF -if test -n "$ac_pt_GETCONF"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_GETCONF" >&5 -printf "%s\n" "$ac_pt_GETCONF" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_pt_GETCONF" = x; then - GETCONF="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - GETCONF=$ac_pt_GETCONF - fi -else - GETCONF="$ac_cv_path_GETCONF" -fi - - -fi - ;; -esac -fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Native POSIX Thread Library" >&5 -printf %s "checking for Native POSIX Thread Library... " >&6; } - libpthr_vsn=`$GETCONF GNU_LIBPTHREAD_VERSION 2>/dev/null` - if test $? -eq 0; then - case "$libpthr_vsn" in - *nptl*|*NPTL*) nptl=yes;; - *) nptl=no;; - esac - elif test "$cross_compiling" = "yes"; then - case "$erl_xcomp_linux_nptl" in - "") nptl=cross;; - yes|no) nptl=$erl_xcomp_linux_nptl;; - *) as_fn_error $? "Bad erl_xcomp_linux_nptl value: $erl_xcomp_linux_nptl" "$LINENO" 5;; - esac - else - nptl=no - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $nptl" >&5 -printf "%s\n" "$nptl" >&6; } - if test $nptl = cross; then - nptl=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result yes guessed because of cross compilation" >&5 -printf "%s\n" "$as_me: WARNING: result yes guessed because of cross compilation" >&2;} - fi - if test $nptl = yes -then : - - THR_LIB_TYPE=posix_nptl - need_nptl_incldir=no - ac_fn_c_check_header_compile "$LINENO" "nptl/pthread.h" "ac_cv_header_nptl_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_nptl_pthread_h" = xyes -then : - need_nptl_incldir=yes - NEED_NPTL_PTHREAD_H=yes -fi - - if test $need_nptl_incldir = yes -then : - - # Ahh... - nptl_path="$C_INCLUDE_PATH:$CPATH" - if test X$cross_compiling != Xyes; then - nptl_path="$nptl_path:/usr/local/include:/usr/include" - else - IROOT="$erl_xcomp_isysroot" - test "$IROOT" != "" || IROOT="$erl_xcomp_sysroot" - test "$IROOT" != "" || as_fn_error $? "Don't know where to search for includes! Please set erl_xcomp_isysroot" "$LINENO" 5 - nptl_path="$nptl_path:$IROOT/usr/local/include:$IROOT/usr/include" - fi - nptl_ws_path= - save_ifs="$IFS"; IFS=":" - for dir in $nptl_path; do - if test "x$dir" != "x"; then - nptl_ws_path="$nptl_ws_path $dir" - fi - done - IFS=$save_ifs - nptl_incldir= - for dir in $nptl_ws_path; do - as_ac_Header=`printf "%s\n" "ac_cv_header_$dir/nptl/pthread.h" | sed "$as_sed_sh"` -ac_fn_c_check_header_compile "$LINENO" "$dir/nptl/pthread.h" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - nptl_incldir=$dir/nptl -fi - - if test "x$nptl_incldir" != "x"; then - THR_DEFS="$THR_DEFS -isystem $nptl_incldir" - break - fi - done - if test "x$nptl_incldir" = "x"; then - as_fn_error $? "Failed to locate nptl system include directory" "$LINENO" 5 - fi - -fi - -fi - ;; #( - *) : - ;; -esac - - saved_cppflags=$CPPFLAGS - CPPFLAGS="$CPPFLAGS $THR_DEFS" - - - ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_h" = xyes -then : - -printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h - -fi - - - ac_fn_c_check_header_compile "$LINENO" "pthread/mit/pthread.h" "ac_cv_header_pthread_mit_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_mit_pthread_h" = xyes +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$saved_LDFLAGS; + if test "X$can_enable_flag" = "Xtrue" then : - \ - -printf "%s\n" "#define HAVE_MIT_PTHREAD_H 1" >>confdefs.h - -fi - - - CPPFLAGS=$saved_cppflags + LDFLAGS="$saved_LDFLAG $LDFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -fi - ;; +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac fi - - - -odbc_lib_link_success=no - -case $host_os in #( - darwin1[0-9].*) : - - TARGET_FLAGS="-DUNIX" - if test ! -d "$with_odbc" || test "$with_odbc" = "yes"; then - ODBC_LIB= -L"/usr/local/lib" - ODBC_INCLUDE="-I/usr/local/include" - else - ODBC_LIB=-L"$with_odbc/lib" - ODBC_INCLUDE="-I$with_odbc/include" - fi - - save_LIBS="$LIBS" - LIBS="$LIBS $ODBC_LIB" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -liodbc" >&5 -printf %s "checking for SQLAllocHandle in -liodbc... " >&6; } -if test ${ac_cv_lib_iodbc_SQLAllocHandle+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-liodbc $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,now to LDFLAGS (via LDFLAGS)" >&5 +printf %s "checking if we can add -Wl,-z,now to LDFLAGS (via LDFLAGS)... " >&6; } + saved_LDFLAGS=$LDFLAGS; + saved_LDFLAG="-Wl,-z,now"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char SQLAllocHandle (void); int main (void) { -return SQLAllocHandle (); +return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : - ac_cv_lib_iodbc_SQLAllocHandle=yes + can_enable_flag=true else case e in #( - e) ac_cv_lib_iodbc_SQLAllocHandle=no ;; + e) can_enable_flag=false + ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iodbc_SQLAllocHandle" >&5 -printf "%s\n" "$ac_cv_lib_iodbc_SQLAllocHandle" >&6; } -if test "x$ac_cv_lib_iodbc_SQLAllocHandle" = xyes + LDFLAGS=$saved_LDFLAGS; + if test "X$can_enable_flag" = "Xtrue" then : - ODBC_LIB="$ODBC_LIB -liodbc"; odbc_lib_link_success=yes -fi - if test $odbc_lib_link_success = no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5 -printf %s "checking for SQLAllocHandle in -lodbc... " >&6; } -if test ${ac_cv_lib_odbc_SQLAllocHandle+y} -then : - printf %s "(cached) " >&6 + LDFLAGS="$saved_LDFLAG $LDFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-lodbc $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,--as-needed to LDFLAGS (via LDFLAGS)" >&5 +printf %s "checking if we can add -Wl,--as-needed to LDFLAGS (via LDFLAGS)... " >&6; } + saved_LDFLAGS=$LDFLAGS; + saved_LDFLAG="-Wl,--as-needed"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char SQLAllocHandle (void); int main (void) { -return SQLAllocHandle (); +return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : - ac_cv_lib_odbc_SQLAllocHandle=yes + can_enable_flag=true else case e in #( - e) ac_cv_lib_odbc_SQLAllocHandle=no ;; + e) can_enable_flag=false + ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5 -printf "%s\n" "$ac_cv_lib_odbc_SQLAllocHandle" >&6; } -if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes + LDFLAGS=$saved_LDFLAGS; + if test "X$can_enable_flag" = "Xtrue" then : - ODBC_LIB="$ODBC_LIB -lodbc"; odbc_lib_link_success=yes -fi - fi - LIBS="$save_LIBS" - ;; #( - haiku*) : + LDFLAGS="$saved_LDFLAG $LDFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } - TARGET_FLAGS="-DUNIX" - ODBC_LIB= -L"/system/lib" - ODBC_INCLUDE="-I/system/develop/headers" - save_LIBS="$LIBS" - LIBS="$LIBS $ODBC_LIB" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5 -printf %s "checking for SQLAllocHandle in -lodbc... " >&6; } -if test ${ac_cv_lib_odbc_SQLAllocHandle+y} -then : - printf %s "(cached) " >&6 else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-lodbc $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,--no-copy-dt-needed-entries to LDFLAGS (via LDFLAGS)" >&5 +printf %s "checking if we can add -Wl,--no-copy-dt-needed-entries to LDFLAGS (via LDFLAGS)... " >&6; } + saved_LDFLAGS=$LDFLAGS; + saved_LDFLAG="-Wl,--no-copy-dt-needed-entries"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char SQLAllocHandle (void); int main (void) { -return SQLAllocHandle (); +return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : - ac_cv_lib_odbc_SQLAllocHandle=yes + can_enable_flag=true else case e in #( - e) ac_cv_lib_odbc_SQLAllocHandle=no ;; + e) can_enable_flag=false + ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5 -printf "%s\n" "$ac_cv_lib_odbc_SQLAllocHandle" >&6; } -if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes + LDFLAGS=$saved_LDFLAGS; + if test "X$can_enable_flag" = "Xtrue" then : - ODBC_LIB="$ODBC_LIB -lodbc"; odbc_lib_link_success=yes -fi - if test $odbc_lib_link_success = no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -liodbc" >&5 -printf %s "checking for SQLAllocHandle in -liodbc... " >&6; } -if test ${ac_cv_lib_iodbc_SQLAllocHandle+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-liodbc $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + LDFLAGS="$saved_LDFLAG $LDFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char SQLAllocHandle (void); -int -main (void) -{ -return SQLAllocHandle (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_iodbc_SQLAllocHandle=yes else case e in #( - e) ac_cv_lib_iodbc_SQLAllocHandle=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iodbc_SQLAllocHandle" >&5 -printf "%s\n" "$ac_cv_lib_iodbc_SQLAllocHandle" >&6; } -if test "x$ac_cv_lib_iodbc_SQLAllocHandle" = xyes -then : - ODBC_LIB="$ODBC_LIB -liodbc"; odbc_lib_link_success=yes + + fi - fi - LIBS="$save_LIBS" - ;; #( - win32|cygwin) : - TARGET_FLAGS="-DWIN32" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lws2_32" >&5 -printf %s "checking for main in -lws2_32... " >&6; } -if test ${ac_cv_lib_ws2_32_main+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-lws2_32 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main (void) -{ -return main (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" + +_search_path=/bin:/usr/bin:/usr/local/bin:$PATH + +# Extract the first word of "rm", so it can be a program name with args. +set dummy rm; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_RM+y} then : - ac_cv_lib_ws2_32_main=yes + printf %s "(cached) " >&6 else case e in #( - e) ac_cv_lib_ws2_32_main=no ;; + e) case $RM in + [\\/]* | ?:[\\/]*) + ac_cv_path_RM="$RM" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $_search_path +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_RM="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_RM" && ac_cv_path_RM="false" + ;; +esac ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; -esac +RM=$ac_cv_path_RM +if test -n "$RM"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RM" >&5 +printf "%s\n" "$RM" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_main" >&5 -printf "%s\n" "$ac_cv_lib_ws2_32_main" >&6; } -if test "x$ac_cv_lib_ws2_32_main" = xyes -then : - printf "%s\n" "#define HAVE_LIBWS2_32 1" >>confdefs.h - LIBS="-lws2_32 $LIBS" +if test "$ac_cv_path_RM" = false; then + as_fn_error $? "No 'rm' command found" "$LINENO" 5 fi - if test ! -d "$with_odbc" || test "$with_odbc" = "yes"; then - ODBC_LIB="" - ODBC_INCLUDE="" - else - ODBC_LIB=-L"$with_odbc/lib" - ODBC_INCLUDE="-I$with_odbc/include" - fi - save_LIBS="$LIBS" - LIBS="$LIBS $ODBC_LIB" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lodbc32" >&5 -printf %s "checking for main in -lodbc32... " >&6; } -if test ${ac_cv_lib_odbc32_main+y} +_search_path= + +ac_header= ac_cache= +for ac_item in $ac_header_c_list +do + if test $ac_cache; then + ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" + if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then + printf "%s\n" "#define $ac_item 1" >> confdefs.h + fi + ac_header= ac_cache= + elif test $ac_header; then + ac_cache=$ac_item + else + ac_header=$ac_item + fi +done + + + + + + + + +if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-lodbc32 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h -int -main (void) -{ -return main (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +printf %s "checking for grep that handles long lines and -e... " >&6; } +if test ${ac_cv_path_GREP+y} then : - ac_cv_lib_odbc32_main=yes + printf %s "(cached) " >&6 else case e in #( - e) ac_cv_lib_odbc32_main=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; + e) if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in grep ggrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in #( +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +#( +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc32_main" >&5 -printf "%s\n" "$ac_cv_lib_odbc32_main" >&6; } -if test "x$ac_cv_lib_odbc32_main" = xyes -then : - ODBC_LIB="$ODBC_LIB -lodbc32"; odbc_lib_link_success=yes + ;; +esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +printf "%s\n" "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" - LIBS="$save_LIBS" - ;; #( - *) : - TARGET_FLAGS="-DUNIX" - case "$erl_xcomp_without_sysroot-$with_odbc" in #( - yes-yes | yes-) : +if test "$with_odbc" = "no" +then : + + + rm -f "$ERL_TOP/lib/odbc/SKIP" - msg="Dont know where to search for odbc (setting erl_xcomp_sysroot will help)" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $msg" >&5 -printf "%s\n" "$as_me: WARNING: $msg" >&2;} - echo "$msg" > "$ERL_TOP/lib/odbc/SKIP" - odbc_lib_link_success=wont_try - ;; #( - no-yes | no-) : - # The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 -printf %s "checking size of void *... " >&6; } -if test ${ac_cv_sizeof_void_p+y} -then : - printf %s "(cached) " >&6 else case e in #( - e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" -then : + e) + +# Sockets +#-------------------------------------------------------------------- +# Check for the existence of the -lsocket and -lnsl libraries. +# The order here is important, so that they end up in the right +# order in the command line generated by make. Here are some +# special considerations: +# 1. Use "connect" and "accept" to check for -lsocket, and +# "gethostbyname" to check for -lnsl. +# 2. Use each function name only once: can't redo a check because +# autoconf caches the results of the last check and won't redo it. +# 3. Use -lnsl and -lsocket only if they supply procedures that +# aren't already present in the normal libraries. This is because +# IRIX 5.2 has libraries, but they aren't needed and they're +# bogus: they goof up name resolution if used. +# 4. On some SVR4 systems, can't use -lsocket without -lnsl too. +# To get around this problem, check for both libraries together +# if -lsocket doesn't work by itself. +#-------------------------------------------------------------------- +erl_checkBoth=0 +ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" +if test "x$ac_cv_func_connect" = xyes +then : + erl_checkSocket=0 else case e in #( - e) if test "$ac_cv_type_void_p" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (void *) -See 'config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_void_p=0 - fi ;; -esac -fi - ;; + e) erl_checkSocket=1 ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 -printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } - - - -printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h +if test "$erl_checkSocket" = 1 +then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for odbc in standard locations" >&5 -printf %s "checking for odbc in standard locations... " >&6; } - for rdir in /usr/local/odbc /usr/local /usr/odbc \ - /usr /opt/local/pgm/odbc /usr/local/pgm/odbc \ - "$with_odbc"; do - test -f "$erl_xcomp_isysroot$rdir/include/sql.h" || continue - is_odbc_std_location=yes - libdir="$erl_xcomp_sysroot$rdir/lib" - if test "$ac_cv_sizeof_void_p" = "8"; then - if test -d "${libdir}64/."; then - libdir="${libdir}64" - elif test -d "${libdir}/64/."; then - libdir="${libdir}/64" - fi - fi - ODBC_LIB="-L$libdir" - ODBC_INCLUDE="-I$erl_xcomp_isysroot$rdir/include" - break - done - if test "x$is_odbc_std_location" != "xyes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No odbc library found skipping odbc" >&5 -printf "%s\n" "$as_me: WARNING: No odbc library found skipping odbc" >&2;} - echo "No odbc library found" > "$ERL_TOP/lib/odbc/SKIP" - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ODBC_LIB" >&5 -printf "%s\n" "$ODBC_LIB" >&6; } - save_LIBS="$LIBS" - LIBS="$LIBS $ODBC_LIB" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5 -printf %s "checking for SQLAllocHandle in -lodbc... " >&6; } -if test ${ac_cv_lib_odbc_SQLAllocHandle+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 +printf %s "checking for socket in -lsocket... " >&6; } +if test ${ac_cv_lib_socket_socket+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS -LIBS="-lodbc $LIBS" +LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6044,20 +5620,20 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char SQLAllocHandle (void); +char socket (void); int main (void) { -return SQLAllocHandle (); +return socket (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : - ac_cv_lib_odbc_SQLAllocHandle=yes + ac_cv_lib_socket_socket=yes else case e in #( - e) ac_cv_lib_odbc_SQLAllocHandle=no ;; + e) ac_cv_lib_socket_socket=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ @@ -6065,48 +5641,64 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ LIBS=$ac_check_lib_save_LIBS ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5 -printf "%s\n" "$ac_cv_lib_odbc_SQLAllocHandle" >&6; } -if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 +printf "%s\n" "$ac_cv_lib_socket_socket" >&6; } +if test "x$ac_cv_lib_socket_socket" = xyes then : - ODBC_LIB="$ODBC_LIB -lodbc"; odbc_lib_link_success=yes + LIBS="$LIBS -lsocket" +else case e in #( + e) erl_checkBoth=1 ;; +esac fi - if test $odbc_lib_link_success = no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -liodbc" >&5 -printf %s "checking for SQLAllocHandle in -liodbc... " >&6; } -if test ${ac_cv_lib_iodbc_SQLAllocHandle+y} + +fi +if test "$erl_checkBoth" = 1 +then : + + tk_oldLibs=$LIBS + LIBS="$LIBS -lsocket -lnsl" + ac_fn_c_check_func "$LINENO" "accept" "ac_cv_func_accept" +if test "x$ac_cv_func_accept" = xyes +then : + odbc_erl_checkNsl=0 +else case e in #( + e) LIBS=$tk_oldLibs ;; +esac +fi + + +fi +ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" +if test "x$ac_cv_func_gethostbyname" = xyes +then : + +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5 +printf %s "checking for main in -lnsl... " >&6; } +if test ${ac_cv_lib_nsl_main+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS -LIBS="-liodbc $LIBS" +LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char SQLAllocHandle (void); + int main (void) { -return SQLAllocHandle (); +return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : - ac_cv_lib_iodbc_SQLAllocHandle=yes + ac_cv_lib_nsl_main=yes else case e in #( - e) ac_cv_lib_iodbc_SQLAllocHandle=no ;; + e) ac_cv_lib_nsl_main=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ @@ -6114,80 +5706,27 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ LIBS=$ac_check_lib_save_LIBS ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iodbc_SQLAllocHandle" >&5 -printf "%s\n" "$ac_cv_lib_iodbc_SQLAllocHandle" >&6; } -if test "x$ac_cv_lib_iodbc_SQLAllocHandle" = xyes +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5 +printf "%s\n" "$ac_cv_lib_nsl_main" >&6; } +if test "x$ac_cv_lib_nsl_main" = xyes then : - ODBC_LIB="$ODBC_LIB -liodbc"; odbc_lib_link_success=yes + LIBS="$LIBS -lnsl" fi - - fi - LIBS="$save_LIBS" - fi - ;; #( - *) : - - ODBC_LIB=-L"$with_odbc/lib" - ODBC_INCLUDE="-I$with_odbc/include" - save_LIBS="$LIBS" - LIBS="$LIBS $ODBC_LIB" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5 -printf %s "checking for SQLAllocHandle in -lodbc... " >&6; } -if test ${ac_cv_lib_odbc_SQLAllocHandle+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_check_lib_save_LIBS=$LIBS -LIBS="-lodbc $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char SQLAllocHandle (void); -int -main (void) -{ -return SQLAllocHandle (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_odbc_SQLAllocHandle=yes -else case e in #( - e) ac_cv_lib_odbc_SQLAllocHandle=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS ;; + ;; esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5 -printf "%s\n" "$ac_cv_lib_odbc_SQLAllocHandle" >&6; } -if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes -then : - ODBC_LIB="$ODBC_LIB -lodbc"; odbc_lib_link_success=yes fi - if test $odbc_lib_link_success = no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -liodbc" >&5 -printf %s "checking for SQLAllocHandle in -liodbc... " >&6; } -if test ${ac_cv_lib_iodbc_SQLAllocHandle+y} +case "$host_os" in #( + haiku*) : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5 +printf %s "checking for socket in -lnetwork... " >&6; } +if test ${ac_cv_lib_network_socket+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS -LIBS="-liodbc $LIBS" +LIBS="-lnetwork $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6200,20 +5739,20 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char SQLAllocHandle (void); +char socket (void); int main (void) { -return SQLAllocHandle (); +return socket (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : - ac_cv_lib_iodbc_SQLAllocHandle=yes + ac_cv_lib_network_socket=yes else case e in #( - e) ac_cv_lib_iodbc_SQLAllocHandle=no ;; + e) ac_cv_lib_network_socket=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ @@ -6221,993 +5760,1454 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ LIBS=$ac_check_lib_save_LIBS ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iodbc_SQLAllocHandle" >&5 -printf "%s\n" "$ac_cv_lib_iodbc_SQLAllocHandle" >&6; } -if test "x$ac_cv_lib_iodbc_SQLAllocHandle" = xyes +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5 +printf "%s\n" "$ac_cv_lib_network_socket" >&6; } +if test "x$ac_cv_lib_network_socket" = xyes then : - ODBC_LIB="$ODBC_LIB -liodbc"; odbc_lib_link_success=yes + printf "%s\n" "#define HAVE_LIBNETWORK 1" >>confdefs.h + + LIBS="-lnetwork $LIBS" + fi - fi - LIBS="$save_LIBS" - ;; -esac - ;; + ;; #( + *) : + ;; esac -save_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS $ODBC_INCLUDE" - for ac_header in sql.h sqlext.h -do : - as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | sed "$as_sed_sh"` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_WINDOWS_H - # include - #endif -" -if eval test \"x\$"$as_ac_Header"\" = x"yes" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +printf %s "checking for egrep... " >&6; } +if test ${ac_cv_path_EGREP+y} then : - cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_header" | sed "$as_sed_cpp"` 1 -_ACEOF - odbc_required_headers=yes + printf %s "(cached) " >&6 else case e in #( - e) odbc_required_headers=no ;; + e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in egrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in #( +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +#( +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac -fi - -done -CFLAGS="$save_CFLAGS" -if test $odbc_required_headers = no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"ODBC library - header check failed\"" >&5 -printf "%s\n" "$as_me: WARNING: \"ODBC library - header check failed\"" >&2;} - echo "ODBC library - header check failed" > $ERL_TOP/lib/odbc/SKIP + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP fi -if test $odbc_lib_link_success = no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"ODBC library - link check failed\"" >&5 -printf "%s\n" "$as_me: WARNING: \"ODBC library - link check failed\"" >&2;} - echo "ODBC library - link check failed" > $ERL_TOP/lib/odbc/SKIP + + fi ;; +esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +printf "%s\n" "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + EGREP_TRADITIONAL=$EGREP + ac_cv_path_EGREP_TRADITIONAL=$EGREP +ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" +if test "x$ac_cv_header_fcntl_h" = xyes +then : + printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h - ;; -esac fi +ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default" +if test "x$ac_cv_header_netdb_h" = xyes +then : + printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h - - if test "X$host" = "Xwin32" +fi +ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes then : - ossf_security_hardening_default=no -else case e in #( - e) ossf_security_hardening_default=yes ;; -esac + printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h + fi - # Check whether --enable-security-hardening-flags was given. -if test ${enable_security_hardening_flags+y} +ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" +if test "x$ac_cv_header_string_h" = xyes then : - enableval=$enable_security_hardening_flags; case "$enableval" in - no) ossf_security_hardening=no ;; - *) ossf_security_hardening=yes ;; - esac -else case e in #( - e) ossf_security_hardening=$ossf_security_hardening_default ;; -esac + printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h + fi +ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_socket_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes +then : + printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h +fi - if test "$ossf_security_hardening" = "yes" +ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" +if test "x$ac_cv_header_windows_h" = xyes then : + printf "%s\n" "#define HAVE_WINDOWS_H 1" >>confdefs.h +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +printf %s "checking for an ANSI C-conforming const... " >&6; } +if test ${ac_cv_c_const+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + int main (void) { -return 0; - ; + +#ifndef __cplusplus + /* Ultrix mips cc rejects this sort of thing. */ + typedef int charset[2]; + const charset cs = { 0, 0 }; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* IBM XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : - can_enable_flag=true + ac_cv_c_const=yes else case e in #( - e) can_enable_flag=false ;; + e) ac_cv_c_const=no ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +printf "%s\n" "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then - CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +printf "%s\n" "#define const /**/" >>confdefs.h + +fi + +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes +then : else case e in #( e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; +printf "%s\n" "#define size_t unsigned int" >>confdefs.h + ;; esac fi - if test "X$can_enable_flag" = "Xfalse" +ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_addr" "ac_cv_member_struct_sockaddr_in6_sin6_addr" "#if HAVE_WINSOCK2_H + #include + #include + #else + #include + #endif +" +if test "x$ac_cv_member_struct_sockaddr_in6_sin6_addr" = xyes then : +printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_ADDR 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" + +fi + + +ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset" +if test "x$ac_cv_func_memset" = xyes then : - can_enable_flag=true -else case e in #( - e) can_enable_flag=false ;; -esac + printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h + fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" +ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" +if test "x$ac_cv_func_socket" = xyes then : + printf "%s\n" "#define HAVE_SOCKET 1" >>confdefs.h - CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +fi + + +# ODBC +$RM -f "$ERL_TOP/lib/odbc/SKIP" + + + +NEED_NPTL_PTHREAD_H=no + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for native win32 threads" >&5 +printf %s "checking for native win32 threads... " >&6; } +if test "X$host_os" = "Xwin32" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } + THR_DEFS="-DWIN32_THREADS" + THR_LIBS= + THR_LIB_NAME=win32_threads + THR_LIB_TYPE=win32_threads else case e in #( e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - ;; -esac -fi - + THR_DEFS= + THR_LIBS= + THR_LIB_NAME= + THR_LIB_TYPE=posix_unknown -fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-clash-protection to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -fstack-clash-protection to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fstack-clash-protection $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 +printf %s "checking for pthread_create in -lpthread... " >&6; } +if test ${ac_cv_lib_pthread_pthread_create+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_create (void); int main (void) { -return 0; +return pthread_create (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - can_enable_flag=true + ac_cv_lib_pthread_pthread_create=yes else case e in #( - e) can_enable_flag=false ;; + e) ac_cv_lib_pthread_pthread_create=no ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : - - CFLAGS="-fstack-clash-protection $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 +printf "%s\n" "$ac_cv_lib_pthread_pthread_create" >&6; } +if test "x$ac_cv_lib_pthread_pthread_create" = xyes +then : + THR_LIBS="-lpthread" +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-protector-strong to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -fstack-protector-strong to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fstack-protector-strong $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "x$THR_LIBS" = "x" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5 +printf %s "checking for pthread_create in -lc_r... " >&6; } +if test ${ac_cv_lib_c_r_pthread_create+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lc_r $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_create (void); int main (void) { -return 0; +return pthread_create (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - can_enable_flag=true + ac_cv_lib_c_r_pthread_create=yes else case e in #( - e) can_enable_flag=false ;; + e) ac_cv_lib_c_r_pthread_create=no ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : - - CFLAGS="-fstack-protector-strong $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; esac fi - - if test "X$can_enable_flag" = "Xfalse" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5 +printf "%s\n" "$ac_cv_lib_c_r_pthread_create" >&6; } +if test "x$ac_cv_lib_c_r_pthread_create" = xyes then : + THR_LIBS="-lc_r" +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-protector to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -fstack-protector to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fstack-protector $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" + if test "x$THR_LIBS" = "x" then : - can_enable_flag=true -else case e in #( - e) can_enable_flag=false ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" + + ac_fn_c_check_func "$LINENO" "pthread_create" "ac_cv_func_pthread_create" +if test "x$ac_cv_func_pthread_create" = xyes then : + THR_LIBS="none_needed" +fi - CFLAGS="-fstack-protector $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac fi + if test "x$THR_LIBS" = "x" +then : -else case e in #( - e) - # Some systems (solaris) also require this to be part of LDFLAGS - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-protector-strong to LDFLAGS (via LDFLAGS)" >&5 -printf %s "checking if we can add -fstack-protector-strong to LDFLAGS (via LDFLAGS)... " >&6; } - saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-fstack-protector-strong; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the '-pthread' switch can be used" >&5 +printf %s "checking if the '-pthread' switch can be used... " >&6; } + saved_cflags=$CFLAGS + CFLAGS="$CFLAGS -pthread" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include int main (void) { -return 0; +pthread_create((void*)0,(void*)0,(void*)0,(void*)0); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : - can_enable_flag=true + THR_DEFS="-pthread" + THR_LIBS="-pthread" fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS=$saved_cflags + if test "x$THR_LIBS" != "x"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - LDFLAGS=$saved_LDFLAGS; - if test "X$can_enable_flag" = "Xtrue" + + if test "x$THR_LIBS" != "x" then : - LDFLAGS="$saved_LDFLAG $LDFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + THR_DEFS="$THR_DEFS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS" + THR_LIB_NAME=pthread + if test "x$THR_LIBS" = "xnone_needed"; then + THR_LIBS= + fi + case $host_os in #( + solaris*) : -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac -fi + THR_DEFS="$THR_DEFS -D_POSIX_PTHREAD_SEMANTICS" + ;; #( + linux*) : + THR_DEFS="$THR_DEFS -D_POSIX_THREAD_SAFE_FUNCTIONS" - ;; -esac -fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fcf-protection=full to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -fcf-protection=full to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fcf-protection=full $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +if test "$cross_compiling" != "yes" +then : -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" + # Extract the first word of "getconf", so it can be a program name with args. +set dummy getconf; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_GETCONF+y} then : - can_enable_flag=true + printf %s "(cached) " >&6 else case e in #( - e) can_enable_flag=false ;; + e) if test -n "$GETCONF"; then + ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_GETCONF="getconf" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="false" +fi ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : +GETCONF=$ac_cv_prog_GETCONF +if test -n "$GETCONF"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 +printf "%s\n" "$GETCONF" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + - CFLAGS="-fcf-protection=full $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } else case e in #( e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; + host_getconf="$host_alias-getconf" + # Extract the first word of "$host_getconf", so it can be a program name with args. +set dummy $host_getconf; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_GETCONF+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$GETCONF"; then + ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_GETCONF="$host_getconf" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="false" +fi ;; esac +fi +GETCONF=$ac_cv_prog_GETCONF +if test -n "$GETCONF"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 +printf "%s\n" "$GETCONF" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -mbranch-protection=standard to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -mbranch-protection=standard to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -mbranch-protection=standard $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + if test "$GETCONF" = "false" && test "$erl_xcomp_sysroot" != "" +then : -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" + GETCONF= + prfx="$erl_xcomp_sysroot" + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}getconf", so it can be a program name with args. +set dummy ${ac_tool_prefix}getconf; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_GETCONF+y} then : - can_enable_flag=true + printf %s "(cached) " >&6 else case e in #( - e) can_enable_flag=false ;; + e) case $GETCONF in + [\\/]* | ?:[\\/]*) + ac_cv_path_GETCONF="$GETCONF" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy=""$prfx/usr/bin:$prfx/bin:$prfx/usr/local/bin"" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_GETCONF="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : +GETCONF=$ac_cv_path_GETCONF +if test -n "$GETCONF"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 +printf "%s\n" "$GETCONF" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi - CFLAGS="-mbranch-protection=standard $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +fi +if test -z "$ac_cv_path_GETCONF"; then + ac_pt_GETCONF=$GETCONF + # Extract the first word of "getconf", so it can be a program name with args. +set dummy getconf; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ac_pt_GETCONF+y} +then : + printf %s "(cached) " >&6 else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + e) case $ac_pt_GETCONF in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_GETCONF="$ac_pt_GETCONF" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy=""$prfx/usr/bin:$prfx/bin:$prfx/usr/local/bin"" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_GETCONF="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac ;; +esac +fi +ac_pt_GETCONF=$ac_cv_path_ac_pt_GETCONF +if test -n "$ac_pt_GETCONF"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_GETCONF" >&5 +printf "%s\n" "$ac_pt_GETCONF" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - ;; +fi + + if test "x$ac_pt_GETCONF" = x; then + GETCONF="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; esac + GETCONF=$ac_pt_GETCONF + fi +else + GETCONF="$ac_cv_path_GETCONF" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fexceptions to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -fexceptions to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fexceptions $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi + ;; +esac +fi -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Native POSIX Thread Library" >&5 +printf %s "checking for Native POSIX Thread Library... " >&6; } + libpthr_vsn=`$GETCONF GNU_LIBPTHREAD_VERSION 2>/dev/null` + if test $? -eq 0; then + case "$libpthr_vsn" in + *nptl*|*NPTL*) nptl=yes;; + *) nptl=no;; + esac + elif test "$cross_compiling" = "yes"; then + case "$erl_xcomp_linux_nptl" in + "") nptl=cross;; + yes|no) nptl=$erl_xcomp_linux_nptl;; + *) as_fn_error $? "Bad erl_xcomp_linux_nptl value: $erl_xcomp_linux_nptl" "$LINENO" 5;; + esac + else + nptl=no + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $nptl" >&5 +printf "%s\n" "$nptl" >&6; } + if test $nptl = cross; then + nptl=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result yes guessed because of cross compilation" >&5 +printf "%s\n" "$as_me: WARNING: result yes guessed because of cross compilation" >&2;} + fi + if test $nptl = yes then : - can_enable_flag=true -else case e in #( - e) can_enable_flag=false ;; -esac + + THR_LIB_TYPE=posix_nptl + need_nptl_incldir=no + ac_fn_c_check_header_compile "$LINENO" "nptl/pthread.h" "ac_cv_header_nptl_pthread_h" "$ac_includes_default" +if test "x$ac_cv_header_nptl_pthread_h" = xyes +then : + need_nptl_incldir=yes + NEED_NPTL_PTHREAD_H=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" + + if test $need_nptl_incldir = yes then : - CFLAGS="-fexceptions $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + # Ahh... + nptl_path="$C_INCLUDE_PATH:$CPATH" + if test X$cross_compiling != Xyes; then + nptl_path="$nptl_path:/usr/local/include:/usr/include" + else + IROOT="$erl_xcomp_isysroot" + test "$IROOT" != "" || IROOT="$erl_xcomp_sysroot" + test "$IROOT" != "" || as_fn_error $? "Don't know where to search for includes! Please set erl_xcomp_isysroot" "$LINENO" 5 + nptl_path="$nptl_path:$IROOT/usr/local/include:$IROOT/usr/include" + fi + nptl_ws_path= + save_ifs="$IFS"; IFS=":" + for dir in $nptl_path; do + if test "x$dir" != "x"; then + nptl_ws_path="$nptl_ws_path $dir" + fi + done + IFS=$save_ifs + nptl_incldir= + for dir in $nptl_ws_path; do + as_ac_Header=`printf "%s\n" "ac_cv_header_$dir/nptl/pthread.h" | sed "$as_sed_sh"` +ac_fn_c_check_header_compile "$LINENO" "$dir/nptl/pthread.h" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + nptl_incldir=$dir/nptl +fi + + if test "x$nptl_incldir" != "x"; then + THR_DEFS="$THR_DEFS -isystem $nptl_incldir" + break + fi + done + if test "x$nptl_incldir" = "x"; then + as_fn_error $? "Failed to locate nptl system include directory" "$LINENO" 5 + fi -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac fi +fi + ;; #( + *) : + ;; +esac + saved_cppflags=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $THR_DEFS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-strict-overflow to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -fno-strict-overflow to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fno-strict-overflow $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" + ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" +if test "x$ac_cv_header_pthread_h" = xyes then : - can_enable_flag=true -else case e in #( - e) can_enable_flag=false ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" + +printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h + +fi + + + ac_fn_c_check_header_compile "$LINENO" "pthread/mit/pthread.h" "ac_cv_header_pthread_mit_pthread_h" "$ac_includes_default" +if test "x$ac_cv_header_pthread_mit_pthread_h" = xyes then : + \ - CFLAGS="-fno-strict-overflow $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +printf "%s\n" "#define HAVE_MIT_PTHREAD_H 1" >>confdefs.h -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-delete-null-pointer-checks to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -fno-delete-null-pointer-checks to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fno-delete-null-pointer-checks $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + CPPFLAGS=$saved_cppflags -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - can_enable_flag=true -else case e in #( - e) can_enable_flag=false ;; + +fi + ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : - CFLAGS="-fno-delete-null-pointer-checks $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac -fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-strict-aliasing to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -fno-strict-aliasing to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fno-strict-aliasing $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + +odbc_lib_link_success=no + +case $host_os in #( + darwin1[0-9].*) : + + TARGET_FLAGS="-DUNIX" + if test ! -d "$with_odbc" || test "$with_odbc" = "yes"; then + ODBC_LIB= -L"/usr/local/lib" + ODBC_INCLUDE="-I/usr/local/include" + else + ODBC_LIB=-L"$with_odbc/lib" + ODBC_INCLUDE="-I$with_odbc/include" + fi + + save_LIBS="$LIBS" + LIBS="$LIBS $ODBC_LIB" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -liodbc" >&5 +printf %s "checking for SQLAllocHandle in -liodbc... " >&6; } +if test ${ac_cv_lib_iodbc_SQLAllocHandle+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-liodbc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char SQLAllocHandle (void); int main (void) { -return 0; +return SQLAllocHandle (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - can_enable_flag=true + ac_cv_lib_iodbc_SQLAllocHandle=yes else case e in #( - e) can_enable_flag=false ;; + e) ac_cv_lib_iodbc_SQLAllocHandle=no ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : - - CFLAGS="-fno-strict-aliasing $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iodbc_SQLAllocHandle" >&5 +printf "%s\n" "$ac_cv_lib_iodbc_SQLAllocHandle" >&6; } +if test "x$ac_cv_lib_iodbc_SQLAllocHandle" = xyes +then : + ODBC_LIB="$ODBC_LIB -liodbc"; odbc_lib_link_success=yes fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -ftrivial-auto-var-init=zero to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -ftrivial-auto-var-init=zero to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -ftrivial-auto-var-init=zero $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $odbc_lib_link_success = no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5 +printf %s "checking for SQLAllocHandle in -lodbc... " >&6; } +if test ${ac_cv_lib_odbc_SQLAllocHandle+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lodbc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char SQLAllocHandle (void); int main (void) { -return 0; +return SQLAllocHandle (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - can_enable_flag=true + ac_cv_lib_odbc_SQLAllocHandle=yes else case e in #( - e) can_enable_flag=false ;; + e) ac_cv_lib_odbc_SQLAllocHandle=no ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : - - CFLAGS="-ftrivial-auto-var-init=zero $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5 +printf "%s\n" "$ac_cv_lib_odbc_SQLAllocHandle" >&6; } +if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes +then : + ODBC_LIB="$ODBC_LIB -lodbc"; odbc_lib_link_success=yes fi + fi + LIBS="$save_LIBS" + ;; #( + haiku*) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstrict-flex-arrays=3 to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -fstrict-flex-arrays=3 to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fstrict-flex-arrays=3 $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + TARGET_FLAGS="-DUNIX" + ODBC_LIB= -L"/system/lib" + ODBC_INCLUDE="-I/system/develop/headers" + save_LIBS="$LIBS" + LIBS="$LIBS $ODBC_LIB" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5 +printf %s "checking for SQLAllocHandle in -lodbc... " >&6; } +if test ${ac_cv_lib_odbc_SQLAllocHandle+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lodbc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char SQLAllocHandle (void); int main (void) { -return 0; +return SQLAllocHandle (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - can_enable_flag=true + ac_cv_lib_odbc_SQLAllocHandle=yes else case e in #( - e) can_enable_flag=false ;; + e) ac_cv_lib_odbc_SQLAllocHandle=no ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : - - CFLAGS="-fstrict-flex-arrays=3 $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; esac fi - - if test "X$can_enable_flag" = "Xfalse" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5 +printf "%s\n" "$ac_cv_lib_odbc_SQLAllocHandle" >&6; } +if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes then : + ODBC_LIB="$ODBC_LIB -lodbc"; odbc_lib_link_success=yes +fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstrict-flex-arrays=2 to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -fstrict-flex-arrays=2 to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fstrict-flex-arrays=2 $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $odbc_lib_link_success = no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -liodbc" >&5 +printf %s "checking for SQLAllocHandle in -liodbc... " >&6; } +if test ${ac_cv_lib_iodbc_SQLAllocHandle+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-liodbc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char SQLAllocHandle (void); int main (void) { -return 0; +return SQLAllocHandle (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - can_enable_flag=true + ac_cv_lib_iodbc_SQLAllocHandle=yes else case e in #( - e) can_enable_flag=false ;; + e) ac_cv_lib_iodbc_SQLAllocHandle=no ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : - - CFLAGS="-fstrict-flex-arrays=2 $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; esac fi - - -else case e in #( - e) if test "X$can_enable_flag" != "Xtrue" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iodbc_SQLAllocHandle" >&5 +printf "%s\n" "$ac_cv_lib_iodbc_SQLAllocHandle" >&6; } +if test "x$ac_cv_lib_iodbc_SQLAllocHandle" = xyes then : - exit 1 -fi - ;; -esac -fi - + ODBC_LIB="$ODBC_LIB -liodbc"; odbc_lib_link_success=yes fi + fi + LIBS="$save_LIBS" + ;; #( + win32|cygwin) : - if test "$ossf_security_hardening" = "yes" + TARGET_FLAGS="-DWIN32" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lws2_32" >&5 +printf %s "checking for main in -lws2_32... " >&6; } +if test ${ac_cv_lib_ws2_32_main+y} then : - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -D_GLIBCXX_ASSERTIONS to CXXFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -D_GLIBCXX_ASSERTIONS to CXXFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -D_GLIBCXX_ASSERTIONS $CXXFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lws2_32 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + int main (void) { -return 0; +return main (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - can_enable_flag=true + ac_cv_lib_ws2_32_main=yes else case e in #( - e) can_enable_flag=false ;; + e) ac_cv_lib_ws2_32_main=no ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : - - CXXFLAGS="-D_GLIBCXX_ASSERTIONS $CXXFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_main" >&5 +printf "%s\n" "$ac_cv_lib_ws2_32_main" >&6; } +if test "x$ac_cv_lib_ws2_32_main" = xyes +then : + printf "%s\n" "#define HAVE_LIBWS2_32 1" >>confdefs.h + LIBS="-lws2_32 $LIBS" fi - - if test "$ossf_security_hardening" = "yes" + if test ! -d "$with_odbc" || test "$with_odbc" = "yes"; then + ODBC_LIB="" + ODBC_INCLUDE="" + else + ODBC_LIB=-L"$with_odbc/lib" + ODBC_INCLUDE="-I$with_odbc/include" + fi + save_LIBS="$LIBS" + LIBS="$LIBS $ODBC_LIB" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lodbc32" >&5 +printf %s "checking for main in -lodbc32... " >&6; } +if test ${ac_cv_lib_odbc32_main+y} then : - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,noexecstack to LDFLAGS (via LDFLAGS)" >&5 -printf %s "checking if we can add -Wl,-z,noexecstack to LDFLAGS (via LDFLAGS)... " >&6; } - saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,noexecstack; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lodbc32 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + int main (void) { -return 0; +return main (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : - can_enable_flag=true + ac_cv_lib_odbc32_main=yes +else case e in #( + e) ac_cv_lib_odbc32_main=no ;; +esac fi - +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - LDFLAGS=$saved_LDFLAGS; - if test "X$can_enable_flag" = "Xtrue" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc32_main" >&5 +printf "%s\n" "$ac_cv_lib_odbc32_main" >&6; } +if test "x$ac_cv_lib_odbc32_main" = xyes then : + ODBC_LIB="$ODBC_LIB -lodbc32"; odbc_lib_link_success=yes +fi - LDFLAGS="$saved_LDFLAG $LDFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + LIBS="$save_LIBS" + ;; #( + *) : + + TARGET_FLAGS="-DUNIX" + case "$erl_xcomp_without_sysroot-$with_odbc" in #( + yes-yes | yes-) : + + msg="Dont know where to search for odbc (setting erl_xcomp_sysroot will help)" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $msg" >&5 +printf "%s\n" "$as_me: WARNING: $msg" >&2;} + echo "$msg" > "$ERL_TOP/lib/odbc/SKIP" + odbc_lib_link_success=wont_try + ;; #( + no-yes | no-) : + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 +printf %s "checking size of void *... " >&6; } +if test ${ac_cv_sizeof_void_p+y} +then : + printf %s "(cached) " >&6 else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" +then : + +else case e in #( + e) if test "$ac_cv_type_void_p" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (void *) +See 'config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_void_p=0 + fi ;; +esac +fi + ;; esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 +printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,relro to LDFLAGS (via LDFLAGS)" >&5 -printf %s "checking if we can add -Wl,-z,relro to LDFLAGS (via LDFLAGS)... " >&6; } - saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,relro; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + +printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for odbc in standard locations" >&5 +printf %s "checking for odbc in standard locations... " >&6; } + for rdir in /usr/local/odbc /usr/local /usr/odbc \ + /usr /opt/local/pgm/odbc /usr/local/pgm/odbc \ + "$with_odbc"; do + test -f "$erl_xcomp_isysroot$rdir/include/sql.h" || continue + is_odbc_std_location=yes + libdir="$erl_xcomp_sysroot$rdir/lib" + if test "$ac_cv_sizeof_void_p" = "8"; then + if test -d "${libdir}64/."; then + libdir="${libdir}64" + elif test -d "${libdir}/64/."; then + libdir="${libdir}/64" + fi + fi + ODBC_LIB="-L$libdir" + ODBC_INCLUDE="-I$erl_xcomp_isysroot$rdir/include" + break + done + if test "x$is_odbc_std_location" != "xyes"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No odbc library found skipping odbc" >&5 +printf "%s\n" "$as_me: WARNING: No odbc library found skipping odbc" >&2;} + echo "No odbc library found" > "$ERL_TOP/lib/odbc/SKIP" + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ODBC_LIB" >&5 +printf "%s\n" "$ODBC_LIB" >&6; } + save_LIBS="$LIBS" + LIBS="$LIBS $ODBC_LIB" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5 +printf %s "checking for SQLAllocHandle in -lodbc... " >&6; } +if test ${ac_cv_lib_odbc_SQLAllocHandle+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lodbc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char SQLAllocHandle (void); int main (void) { -return 0; +return SQLAllocHandle (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : - can_enable_flag=true + ac_cv_lib_odbc_SQLAllocHandle=yes +else case e in #( + e) ac_cv_lib_odbc_SQLAllocHandle=no ;; +esac fi - +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - LDFLAGS=$saved_LDFLAGS; - if test "X$can_enable_flag" = "Xtrue" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5 +printf "%s\n" "$ac_cv_lib_odbc_SQLAllocHandle" >&6; } +if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes then : - - LDFLAGS="$saved_LDFLAG $LDFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac + ODBC_LIB="$ODBC_LIB -lodbc"; odbc_lib_link_success=yes fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,now to LDFLAGS (via LDFLAGS)" >&5 -printf %s "checking if we can add -Wl,-z,now to LDFLAGS (via LDFLAGS)... " >&6; } - saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,now; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $odbc_lib_link_success = no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -liodbc" >&5 +printf %s "checking for SQLAllocHandle in -liodbc... " >&6; } +if test ${ac_cv_lib_iodbc_SQLAllocHandle+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-liodbc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char SQLAllocHandle (void); int main (void) { -return 0; +return SQLAllocHandle (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : - can_enable_flag=true + ac_cv_lib_iodbc_SQLAllocHandle=yes +else case e in #( + e) ac_cv_lib_iodbc_SQLAllocHandle=no ;; +esac fi - +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - LDFLAGS=$saved_LDFLAGS; - if test "X$can_enable_flag" = "Xtrue" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iodbc_SQLAllocHandle" >&5 +printf "%s\n" "$ac_cv_lib_iodbc_SQLAllocHandle" >&6; } +if test "x$ac_cv_lib_iodbc_SQLAllocHandle" = xyes then : - - LDFLAGS="$saved_LDFLAG $LDFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac + ODBC_LIB="$ODBC_LIB -liodbc"; odbc_lib_link_success=yes fi + fi + LIBS="$save_LIBS" + fi + ;; #( + *) : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,--as-needed to LDFLAGS (via LDFLAGS)" >&5 -printf %s "checking if we can add -Wl,--as-needed to LDFLAGS (via LDFLAGS)... " >&6; } - saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,--as-needed; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ODBC_LIB=-L"$with_odbc/lib" + ODBC_INCLUDE="-I$with_odbc/include" + save_LIBS="$LIBS" + LIBS="$LIBS $ODBC_LIB" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5 +printf %s "checking for SQLAllocHandle in -lodbc... " >&6; } +if test ${ac_cv_lib_odbc_SQLAllocHandle+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lodbc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char SQLAllocHandle (void); int main (void) { -return 0; +return SQLAllocHandle (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : - can_enable_flag=true + ac_cv_lib_odbc_SQLAllocHandle=yes +else case e in #( + e) ac_cv_lib_odbc_SQLAllocHandle=no ;; +esac fi - +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - LDFLAGS=$saved_LDFLAGS; - if test "X$can_enable_flag" = "Xtrue" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLAllocHandle" >&5 +printf "%s\n" "$ac_cv_lib_odbc_SQLAllocHandle" >&6; } +if test "x$ac_cv_lib_odbc_SQLAllocHandle" = xyes then : - - LDFLAGS="$saved_LDFLAG $LDFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac + ODBC_LIB="$ODBC_LIB -lodbc"; odbc_lib_link_success=yes fi - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,--no-copy-dt-needed-entries to LDFLAGS (via LDFLAGS)" >&5 -printf %s "checking if we can add -Wl,--no-copy-dt-needed-entries to LDFLAGS (via LDFLAGS)... " >&6; } - saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,--no-copy-dt-needed-entries; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $odbc_lib_link_success = no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -liodbc" >&5 +printf %s "checking for SQLAllocHandle in -liodbc... " >&6; } +if test ${ac_cv_lib_iodbc_SQLAllocHandle+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-liodbc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char SQLAllocHandle (void); int main (void) { -return 0; +return SQLAllocHandle (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : - can_enable_flag=true + ac_cv_lib_iodbc_SQLAllocHandle=yes +else case e in #( + e) ac_cv_lib_iodbc_SQLAllocHandle=no ;; +esac fi - +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - LDFLAGS=$saved_LDFLAGS; - if test "X$can_enable_flag" = "Xtrue" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iodbc_SQLAllocHandle" >&5 +printf "%s\n" "$ac_cv_lib_iodbc_SQLAllocHandle" >&6; } +if test "x$ac_cv_lib_iodbc_SQLAllocHandle" = xyes then : + ODBC_LIB="$ODBC_LIB -liodbc"; odbc_lib_link_success=yes +fi - LDFLAGS="$saved_LDFLAG $LDFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + fi + LIBS="$save_LIBS" + ;; +esac + ;; +esac + +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS $ODBC_INCLUDE" + for ac_header in sql.h sqlext.h +do : + as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | sed "$as_sed_sh"` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_WINDOWS_H + # include + #endif +" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : + cat >>confdefs.h <<_ACEOF +#define `printf "%s\n" "HAVE_$ac_header" | sed "$as_sed_cpp"` 1 +_ACEOF + odbc_required_headers=yes else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; + e) odbc_required_headers=no ;; esac fi +done +CFLAGS="$save_CFLAGS" +if test $odbc_required_headers = no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"ODBC library - header check failed\"" >&5 +printf "%s\n" "$as_me: WARNING: \"ODBC library - header check failed\"" >&2;} + echo "ODBC library - header check failed" > $ERL_TOP/lib/odbc/SKIP +fi +if test $odbc_lib_link_success = no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"ODBC library - link check failed\"" >&5 +printf "%s\n" "$as_me: WARNING: \"ODBC library - link check failed\"" >&2;} + echo "ODBC library - link check failed" > $ERL_TOP/lib/odbc/SKIP fi + + ;; +esac +fi saved_CFLAGS="$CFLAGS" CFLAGS="-Werror $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext diff --git a/lib/wx/configure b/lib/wx/configure index c63e6acb370b..5e1fe42aaf3a 100755 --- a/lib/wx/configure +++ b/lib/wx/configure @@ -679,6 +679,7 @@ GLIB_LIBS GLIB_CFLAGS MIXED_MINGW MIXED_VC +LD CPP RANLIB ac_ct_CXX @@ -747,11 +748,11 @@ ac_subst_files='' ac_user_opts=' enable_option_checking with_wx +enable_security_hardening_flags with_wxdir with_wx_config with_wx_prefix with_wx_exec_prefix -enable_security_hardening_flags ' ac_precious_vars='build_alias host_alias @@ -1614,6 +1615,54 @@ fi } # ac_fn_c_try_cpp +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + } +then : + ac_retval=0 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 ;; +esac +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + # ac_fn_c_try_run LINENO # ---------------------- # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that @@ -5070,389 +5119,194 @@ WXERL_CAN_BUILD_DRIVER=false printf "%s\n" "$as_me: Building for $host_os" >&6;} WXERL_CAN_BUILD_DRIVER=true +for ac_prog in ld.sh +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_LD+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$LD"; then + ac_cv_prog_LD="$LD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_LD="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - -if test "X$windows_environment_" != "Xchecked"; then -windows_environment_=checked -MIXED_CYGWIN=no -MIXED_MSYS=no -MIXED_VSL=no - -MIXED_VC=no -MIXED_MINGW=no - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mixed mingw-gcc and native VC++ environment" >&5 -printf %s "checking for mixed mingw-gcc and native VC++ environment... " >&6; } -if test "X$host" = "Xwin32" -a "x$GCC" != "xyes"; then - if test -x /usr/bin/msys-?.0.dll; then - CFLAGS="$CFLAGS -O2" - MIXED_MSYS=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: MSYS and VC" >&5 -printf "%s\n" "MSYS and VC" >&6; } - MIXED_VC=yes - CPPFLAGS="$CPPFLAGS -DERTS_MIXED_VC" - elif test -x /usr/bin/cygpath; then - CFLAGS="$CFLAGS -O2" - MIXED_CYGWIN=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Cygwin and VC" >&5 -printf "%s\n" "Cygwin and VC" >&6; } - MIXED_VC=yes - CPPFLAGS="$CPPFLAGS -DERTS_MIXED_VC" - elif test -x /bin/wslpath; then - CFLAGS="$CFLAGS -O2" - MIXED_WSL=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: WSL and VC" >&5 -printf "%s\n" "WSL and VC" >&6; } - MIXED_VC=yes - CPPFLAGS="$CPPFLAGS -DERTS_MIXED_VC" - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: undeterminable" >&5 -printf "%s\n" "undeterminable" >&6; } - as_fn_error cannot handle this! "Seems to be mixed windows but not within any known env" "$LINENO" 5 - fi +fi ;; +esac +fi +LD=$ac_cv_prog_LD +if test -n "$LD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +printf "%s\n" "$LD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi + test -n "$LD" && break +done -if test "x$MIXED_MSYS" != "xyes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mixed cygwin and native MinGW environment" >&5 -printf %s "checking for mixed cygwin and native MinGW environment... " >&6; } - if test "X$host" = "Xwin32" -a "x$GCC" = x"yes"; then - if test -x /usr/bin/cygpath; then - CFLAGS="$CFLAGS -O2" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - MIXED_MINGW=yes - CPPFLAGS="$CPPFLAGS -DERTS_MIXED_MINGW" - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: undeterminable" >&5 -printf "%s\n" "undeterminable" >&6; } - as_fn_error cannot handle this! "Seems to be mixed windows but not with cygwin" "$LINENO" 5 - fi - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - fi +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}${CC}", so it can be a program name with args. +set dummy ${ac_tool_prefix}${CC}; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_LD+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$LD"; then + ac_cv_prog_LD="$LD" # Let the user override the test. else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mixed MSYS and native MinGW environment" >&5 -printf %s "checking for mixed MSYS and native MinGW environment... " >&6; } - if test "x$GCC" = x"yes"; then - if test -x /usr/bin/msys-=.0.dll; then - CFLAGS="$CFLAGS -O2" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - MIXED_MINGW=yes - CPPFLAGS="$CPPFLAGS -DERTS_MIXED_MINGW" - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: undeterminable" >&5 -printf "%s\n" "undeterminable" >&6; } - as_fn_error cannot handle this! "Seems to be mixed windows but not with msys" "$LINENO" 5 - fi - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - fi -fi - +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_LD="${ac_tool_prefix}${CC}" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we mix cygwin with any native compiler" >&5 -printf %s "checking if we mix cygwin with any native compiler... " >&6; } -if test "X$MIXED_CYGWIN" = "Xyes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +fi ;; +esac +fi +LD=$ac_cv_prog_LD +if test -n "$LD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +printf "%s\n" "$LD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we mix msys with another native compiler" >&5 -printf %s "checking if we mix msys with another native compiler... " >&6; } -if test "X$MIXED_MSYS" = "Xyes" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + fi +if test -z "$ac_cv_prog_LD"; then + ac_ct_LD=$LD + # Extract the first word of "${CC}", so it can be a program name with args. +set dummy ${CC}; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_LD+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$ac_ct_LD"; then + ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_LD="${CC}" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we mix WSL with another native compiler" >&5 -printf %s "checking if we mix WSL with another native compiler... " >&6; } -if test "X$MIXED_WSL" = "Xyes" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +fi ;; +esac +fi +ac_ct_LD=$ac_cv_prog_ac_ct_LD +if test -n "$ac_ct_LD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LD" >&5 +printf "%s\n" "$ac_ct_LD" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi + if test "x$ac_ct_LD" = x; then + LD="'$(CC)'" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LD=$ac_ct_LD + fi +else + LD="$ac_cv_prog_LD" fi -USER_CFLAGS=$CFLAGS -if test X"$MIXED_VC" = X"yes" ; then - CFLAGS="-Owx" -fi -ac_header= ac_cache= -for ac_item in $ac_header_c_list -do - if test $ac_cache; then - ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" - if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then - printf "%s\n" "#define $ac_item 1" >> confdefs.h - fi - ac_header= ac_cache= - elif test $ac_header; then - ac_cache=$ac_item - else - ac_header=$ac_item - fi -done - - - - - - - - -if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes -then : - -printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h - -fi -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 -printf %s "checking size of void *... " >&6; } -if test ${ac_cv_sizeof_void_p+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" + if test "X$host" = "Xwin32" then : - + ossf_security_hardening_default=no else case e in #( - e) if test "$ac_cv_type_void_p" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (void *) -See 'config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_void_p=0 - fi ;; -esac -fi - ;; + e) ossf_security_hardening_default=yes ;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 -printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } - - - -printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h - - - -PTHR_CFLAGS="-D_THREAD_SAFE -D_REENTRANT" - -OBJC_CC=$CC -OBJC_CFLAGS="" -CXXFLAGS="" -case $host_os in #( - darwin*) : - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Checking wxWidgets for min version:" >&5 -printf %s "checking Checking wxWidgets for min version:... " >&6; } - WX_CC=`wx-config --cc` - MAC_MIN=`echo "$WX_CC" | sed 's/^[^ ]*\ *//'` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAC_MIN" >&5 -printf "%s\n" "$MAC_MIN" >&6; } - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -ObjC" >&5 -printf %s "checking if compiler accepts -ObjC... " >&6; } - CFLAGS="$CFLAGS -ObjC" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ -; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" + # Check whether --enable-security-hardening-flags was given. +if test ${enable_security_hardening_flags+y} then : - accept_objc_flag=true + enableval=$enable_security_hardening_flags; case "$enableval" in + no) ossf_security_hardening=no ;; + *) ossf_security_hardening=yes ;; + esac else case e in #( - e) accept_objc_flag=false ;; + e) ossf_security_hardening=$ossf_security_hardening_default ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - if test "X$accept_objc_flag" = "Xtrue"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - C_ONLY_FLAGS="-ObjC" - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a Cocoa compliant Objective C compiler" >&5 -printf %s "checking for a Cocoa compliant Objective C compiler... " >&6; } - SEARCHFOR="" - SEARCHFORXX="" - save_IFS=$IFS - IFS=: - set $PATH - IFS=$save_IFS - while test X"$1" != X""; do - SEARCHFOR="$1/gcc-apple-4.2 $SEARCHFOR" - SEARCHFORXX="$1/g++-apple-4.2 $SEARCHFORXX" - shift - done - SEARCHFOR="/usr/bin/clang /usr/bin/gcc $SEARCHFOR" - SEARCHFORXX="/usr/bin/clang /usr/bin/g++ $SEARCHFORXX" - APPLE_CC="" - APPLE_CXX="" - IFS=" " - set $SEARCHFORXX - for x in $SEARCHFOR; do - if test -x $x; then - APPLE_CC=$x - fi - if test -x "$1"; then - APPLE_CXX="$1" - fi - shift - done - IFS=$save_IFS - if test X$APPLE_CC = X -o X$APPLE_CXX = X; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - echo "Can not find compiler to compile Cocoa applications" >> ./CONF_INFO - WXERL_CAN_BUILD_DRIVER=false - if test X"$with_wx" = X"yes" ; then - as_fn_error $? "Can not find compiler to compile Cocoa applications" "$LINENO" 5 - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Can not find compiler to compile Cocoa applications" >&5 -printf "%s\n" "$as_me: WARNING: Can not find compiler to compile Cocoa applications" >&2;} - fi - - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $APPLE_CC ($APPLE_CXX)" >&5 -printf "%s\n" "$APPLE_CC ($APPLE_CXX)" >&6; } - CC=$APPLE_CC - CXX=$APPLE_CXX - #CXXFLAGS="-x c++ $CXXFLAGS" - OBJC_CC=$APPLE_CC - OBJC_CFLAGS="-ObjC" - fi - fi - CFLAGS="$USER_CFLAGS $MAC_MIN -Wno-deprecated-declarations" - CPPFLAGS="$CPPFLAGS -D_MACOSX $PTHR_CFLAGS" - ;; #( - mingw32) : - - CFLAGS="$CFLAGS -DWIN32 -DWINVER=0x0600 -D_WINDOWS -D_UNICODE -DUNICODE" - CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0600" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Reverting to 32-bit time_t" >&5 -printf "%s\n" "$as_me: WARNING: Reverting to 32-bit time_t" >&2;} - CPPFLAGS="$CPPFLAGS -D_USE_32BIT_TIME_T" - ;; #( - win32) : - - CFLAGS="$CFLAGS -DWIN32 -DWINVER=0x0600 -D_WINDOWS -D_UNICODE -DUNICODE" - CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0600" - ;; #( - *) : - - GLIB_CFLAGS=`pkg-config --silence-errors --cflags glib-2.0` - GLIB_LIBS=`pkg-config --silence-errors --libs glib-2.0` - if test X"$GLIB_CFLAGS" != X ; then - HAVE_GLIB="-DHAVE_GLIB=1" - fi - CFLAGS="$CFLAGS -Wno-deprecated-declarations" - CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE $PTHR_CFLAGS $HAVE_GLIB" - ;; -esac - - - - - - - -EXTRA_LDFLAGS= - -case $host_os in - darwin*) - # beam.smp has not been built yet, so we must not use the - # -bundle_loader option in the configuration tests. - LDFLAGS="$MAC_MIN -bundle $LDFLAGS" - EXTRA_LDFLAGS=" -bundle_loader ${ERL_TOP}/bin/$host/beam.smp" - GL_LIBS="-framework OpenGL" - ;; - win32) - LDFLAGS="-dll $LDFLAGS" - GL_LIBS="-lglu32 -lOpengl32" - ;; - mingw32) - LDFLAGS="-shared -fPIC $LDFLAGS" - GL_LIBS="-lglu32 -lOpengl32" - ;; - *) - # When checking linkage we'd like to see that symbols are resolved. - # In order to notice errors, we must test without `-shared`. - LDFLAGS="-fPIC $LDFLAGS" - EXTRA_LDFLAGS=" -shared " - GL_LIBS="-lGL -lGLU" - ;; -esac - -case $host_os in - mingw32) - DEBUG_CFLAGS="-g -Wall -DDEBUG $CFLAGS" - CFLAGS="-g -Wall -O2 $CFLAGS -fomit-frame-pointer" - ;; - win32) - DEBUG_CFLAGS="-g -Wall $CFLAGS -DDEBUG" - CFLAGS="-g -Wall -O2 $CFLAGS" - ;; - darwin*) - DEBUG_CFLAGS="-g -Wall -fPIC $CFLAGS -DDEBUG" - # omit-frame-pointer causes seg faults with 10.9 and clang - CFLAGS="-g -Wall -fPIC $CFLAGS" - ;; - *) - DEBUG_CFLAGS="-g -Wall -fPIC $CFLAGS -DDEBUG" - CFLAGS="-Wall -fPIC $CFLAGS -fomit-frame-pointer" - ;; -esac -if test "x$GCC" = xyes -a X"$host_os" != X"win32" + if test "$ossf_security_hardening" = "yes" then : - CXXNOOPT="-O1" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-move-loop-invariants to CXXNOOPT (via CFLAGS)" >&5 -printf %s "checking if we can add -fno-move-loop-invariants to CXXNOOPT (via CFLAGS)... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 to CFLAGS (via CFLAGS)... " >&6; } saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fno-move-loop-invariants $CXXNOOPT"; + CFLAGS="-Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 $CFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include int main (void) { @@ -5473,7 +5327,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test "X$can_enable_flag" = "Xtrue" then : - CXXNOOPT="-fno-move-loop-invariants $CXXNOOPT" + CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 $CFLAGS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } @@ -5485,14 +5339,17 @@ printf "%s\n" "no" >&6; } esac fi + if test "X$can_enable_flag" = "Xfalse" +then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-var-tracking-assignments to CXXNOOPT (via CFLAGS)" >&5 -printf %s "checking if we can add -fno-var-tracking-assignments to CXXNOOPT (via CFLAGS)... " >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 to CFLAGS (via CFLAGS)... " >&6; } saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fno-var-tracking-assignments $CXXNOOPT"; + CFLAGS="-Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include int main (void) { @@ -5513,7 +5370,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test "X$can_enable_flag" = "Xtrue" then : - CXXNOOPT="-fno-var-tracking-assignments $CXXNOOPT" + CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } @@ -5528,854 +5385,1500 @@ fi fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-clash-protection to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -fstack-clash-protection to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fstack-clash-protection $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -if test X"$host_os" != X"win32" -then : - - for ac_header in GL/gl.h -do : - ac_fn_c_check_header_compile "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default" -if test "x$ac_cv_header_GL_gl_h" = xyes +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" then : - printf "%s\n" "#define HAVE_GL_GL_H 1" >>confdefs.h - + can_enable_flag=true else case e in #( - e) ac_fn_c_check_header_compile "$LINENO" "OpenGL/gl.h" "ac_cv_header_OpenGL_gl_h" "$ac_includes_default" -if test "x$ac_cv_header_OpenGL_gl_h" = xyes + e) can_enable_flag=false ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" then : - printf "%s\n" "#define HAVE_OPENGL_GL_H 1" >>confdefs.h -fi - ;; + CFLAGS="-fstack-clash-protection $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac fi -done - if test X"$ac_cv_header_GL_gl_h" != Xyes && test X"$ac_cv_header_OpenGL_gl_h" != Xyes -then : - saved_CPPFLAGS="$CPPFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Checking for OpenGL headers in /usr/X11R6" >&5 -printf "%s\n" "$as_me: Checking for OpenGL headers in /usr/X11R6" >&6;} - CPPFLAGS="-isystem /usr/X11R6/include $CPPFLAGS" - $as_unset ac_cv_header_GL_gl_h - ac_fn_c_check_header_compile "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default" -if test "x$ac_cv_header_GL_gl_h" = xyes -then : - printf "%s\n" "#define HAVE_GL_GL_H 1" >>confdefs.h + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-protector-strong to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -fstack-protector-strong to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fstack-protector-strong $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + can_enable_flag=true +else case e in #( + e) can_enable_flag=false ;; +esac fi - - if test X"$ac_cv_header_GL_gl_h" != Xyes +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Checking for OpenGL headers in /usr/local" >&5 -printf "%s\n" "$as_me: Checking for OpenGL headers in /usr/local" >&6;} - CPPFLAGS="-isystem /usr/local/include $saved_CPPFLAGS" - $as_unset ac_cv_header_GL_gl_h - ac_fn_c_check_header_compile "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default" -if test "x$ac_cv_header_GL_gl_h" = xyes -then : - printf "%s\n" "#define HAVE_GL_GL_H 1" >>confdefs.h + CFLAGS="-fstack-protector-strong $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac fi - if test X"$ac_cv_header_GL_gl_h" != Xyes + if test "X$can_enable_flag" = "Xfalse" then : - echo "No OpenGL headers found, wx will NOT be usable" >> ./CONF_INFO - WXERL_CAN_BUILD_DRIVER=false - if test X"$with_wx" = X"yes" ; then - as_fn_error $? "No OpenGL headers found, wx will NOT be usable" "$LINENO" 5 - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No OpenGL headers found, wx will NOT be usable" >&5 -printf "%s\n" "$as_me: WARNING: No OpenGL headers found, wx will NOT be usable" >&2;} - fi - CPPFLAGS="$saved_CPPFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-protector to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -fstack-protector to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fstack-protector $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + can_enable_flag=true else case e in #( - e) - GL_LIBS="-L/usr/local/lib $GL_LIBS" - ;; + e) can_enable_flag=false ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : + + CFLAGS="-fstack-protector $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else case e in #( e) - GL_LIBS="-L/usr/X11R6/lib $GL_LIBS" - ;; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac fi -fi else case e in #( e) - ac_fn_c_check_header_compile "$LINENO" "gl/gl.h" "ac_cv_header_gl_gl_h" "#include -" -if test "x$ac_cv_header_gl_gl_h" = xyes -then : - printf "%s\n" "#define HAVE_GL_GL_H 1" >>confdefs.h + # Some systems (solaris) also require this to be part of LDFLAGS -fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-protector-strong to LDFLAGS (via LDFLAGS)" >&5 +printf %s "checking if we can add -fstack-protector-strong to LDFLAGS (via LDFLAGS)... " >&6; } + saved_LDFLAGS=$LDFLAGS; + saved_LDFLAG="-fstack-protector-strong"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - ;; +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; esac fi - -if test X"$host_os" != X"win32" +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$saved_LDFLAGS; + if test "X$can_enable_flag" = "Xtrue" then : - for ac_header in GL/glu.h -do : - ac_fn_c_check_header_compile "$LINENO" "GL/glu.h" "ac_cv_header_GL_glu_h" "$ac_includes_default" -if test "x$ac_cv_header_GL_glu_h" = xyes -then : - printf "%s\n" "#define HAVE_GL_GLU_H 1" >>confdefs.h + LDFLAGS="$saved_LDFLAG $LDFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else case e in #( - e) ac_fn_c_check_header_compile "$LINENO" "OpenGL/glu.h" "ac_cv_header_OpenGL_glu_h" "$ac_includes_default" -if test "x$ac_cv_header_OpenGL_glu_h" = xyes -then : - printf "%s\n" "#define HAVE_OPENGL_GLU_H 1" >>confdefs.h - -fi - ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac fi -done - if test X"$ac_cv_header_GL_glu_h" != Xyes && - test X"$ac_cv_header_OpenGL_glu_h" != Xyes - then - echo "No GLU headers found, wx will NOT be usable" >> ./CONF_INFO - WXERL_CAN_BUILD_DRIVER=false - if test X"$with_wx" = X"yes" ; then - as_fn_error $? "No GLU headers found, wx will NOT be usable" "$LINENO" 5 - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No GLU headers found, wx will NOT be usable" >&5 -printf "%s\n" "$as_me: WARNING: No GLU headers found, wx will NOT be usable" >&2;} - fi - fi + ;; +esac +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fcf-protection=full to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -fcf-protection=full to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fcf-protection=full $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + can_enable_flag=true else case e in #( - e) - ac_fn_c_check_header_compile "$LINENO" "gl/glu.h" "ac_cv_header_gl_glu_h" "#include -" -if test "x$ac_cv_header_gl_glu_h" = xyes + e) can_enable_flag=false ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" then : - printf "%s\n" "#define HAVE_GL_GLU_H 1" >>confdefs.h -fi + CFLAGS="-fcf-protection=full $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } - ;; +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -mbranch-protection=standard to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -mbranch-protection=standard to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -mbranch-protection=standard $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -DEBUG_CXXFLAGS="$CXXFLAGS $DEBUG_CFLAGS $CPPFLAGS" -DEBUG_CFLAGS="$DEBUG_CFLAGS $CPPFLAGS $C_ONLY_FLAGS" - -CXXNOOPTFLAGS="$CXXFLAGS $CFLAGS $CPPFLAGS $CXXNOOPT" -CXXFLAGS="$CXXFLAGS $CFLAGS $CPPFLAGS" -CFLAGS="$CFLAGS $CPPFLAGS $C_ONLY_FLAGS" - - - - -ERLC=erlc -ERL=erl -ERLANG_ROOT_DIR=$ERL_TOP - - - - -if test "$cross_compiling" = "yes" +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" then : - - echo "Cross compilation of the wx driver is not supported yet, wx will NOT be usable" >> ./CONF_INFO - WXERL_CAN_BUILD_DRIVER=false - if test X"$with_wx" = X"yes" ; then - as_fn_error $? "Cross compilation of the wx driver is not supported yet, wx will NOT be usable" "$LINENO" 5 - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Cross compilation of the wx driver is not supported yet, wx will NOT be usable" >&5 -printf "%s\n" "$as_me: WARNING: Cross compilation of the wx driver is not supported yet, wx will NOT be usable" >&2;} - fi - - -elif test X"$MIXED_VC" = X"no" + can_enable_flag=true +else case e in #( + e) can_enable_flag=false ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" then : + CFLAGS="-mbranch-protection=standard $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fexceptions to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -fexceptions to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fexceptions $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + can_enable_flag=true +else case e in #( + e) can_enable_flag=false ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : + CFLAGS="-fexceptions $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-strict-overflow to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -fno-strict-overflow to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fno-strict-overflow $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + can_enable_flag=true +else case e in #( + e) can_enable_flag=false ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : + CFLAGS="-fno-strict-overflow $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-delete-null-pointer-checks to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -fno-delete-null-pointer-checks to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fno-delete-null-pointer-checks $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Check whether --with-wxdir was given. -if test ${with_wxdir+y} +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" then : - withval=$with_wxdir; wx_config_name="$withval/wx-config" - wx_config_args="--inplace" + can_enable_flag=true +else case e in #( + e) can_enable_flag=false ;; +esac fi - - -# Check whether --with-wx-config was given. -if test ${with_wx_config+y} +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" then : - withval=$with_wx_config; wx_config_name="$withval" -fi + CFLAGS="-fno-delete-null-pointer-checks $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -# Check whether --with-wx-prefix was given. -if test ${with_wx_prefix+y} -then : - withval=$with_wx_prefix; wx_config_prefix="$withval" else case e in #( - e) wx_config_prefix="" ;; + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; esac fi -# Check whether --with-wx-exec-prefix was given. -if test ${with_wx_exec_prefix+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-strict-aliasing to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -fno-strict-aliasing to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fno-strict-aliasing $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" then : - withval=$with_wx_exec_prefix; wx_config_exec_prefix="$withval" + can_enable_flag=true else case e in #( - e) wx_config_exec_prefix="" ;; + e) can_enable_flag=false ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : + CFLAGS="-fno-strict-aliasing $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } - reqwx=3.0.2 +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi - if test x${WX_CONFIG_NAME+set} != xset ; then - WX_CONFIG_NAME=wx-config - fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -ftrivial-auto-var-init=zero to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -ftrivial-auto-var-init=zero to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -ftrivial-auto-var-init=zero $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - if test "x$wx_config_name" != x ; then - WX_CONFIG_NAME="$wx_config_name" - fi +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + can_enable_flag=true +else case e in #( + e) can_enable_flag=false ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : - if test x$wx_config_exec_prefix != x ; then - wx_config_args="$wx_config_args --exec-prefix=$wx_config_exec_prefix" - WX_LOOKUP_PATH="$wx_config_exec_prefix/bin" - fi - if test x$wx_config_prefix != x ; then - wx_config_args="$wx_config_args --prefix=$wx_config_prefix" - WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin" - fi - if test "$cross_compiling" = "yes"; then - wx_config_args="$wx_config_args --host=$host_alias" - fi + CFLAGS="-ftrivial-auto-var-init=zero $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } - if test -x "$WX_CONFIG_NAME" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wx-config" >&5 -printf %s "checking for wx-config... " >&6; } - WX_CONFIG_PATH="$WX_CONFIG_NAME" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WX_CONFIG_PATH" >&5 -printf "%s\n" "$WX_CONFIG_PATH" >&6; } - else - # Extract the first word of "$WX_CONFIG_NAME", so it can be a program name with args. -set dummy $WX_CONFIG_NAME; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_WX_CONFIG_PATH+y} -then : - printf %s "(cached) " >&6 else case e in #( - e) case $WX_CONFIG_PATH in - [\\/]* | ?:[\\/]*) - ac_cv_path_WX_CONFIG_PATH="$WX_CONFIG_PATH" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_dummy=""$WX_LOOKUP_PATH:$PATH"" -for as_dir in $as_dummy -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_WX_CONFIG_PATH="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi - test -z "$ac_cv_path_WX_CONFIG_PATH" && ac_cv_path_WX_CONFIG_PATH="no" - ;; -esac ;; + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstrict-flex-arrays=3 to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -fstrict-flex-arrays=3 to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fstrict-flex-arrays=3 $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + can_enable_flag=true +else case e in #( + e) can_enable_flag=false ;; esac fi -WX_CONFIG_PATH=$ac_cv_path_WX_CONFIG_PATH -if test -n "$WX_CONFIG_PATH"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WX_CONFIG_PATH" >&5 -printf "%s\n" "$WX_CONFIG_PATH" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : + + CFLAGS="-fstrict-flex-arrays=3 $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + ;; +esac fi + if test "X$can_enable_flag" = "Xfalse" +then : - fi - if test "$WX_CONFIG_PATH" != "no" ; then - WX_VERSION="" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstrict-flex-arrays=2 to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -fstrict-flex-arrays=2 to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fstrict-flex-arrays=2 $CFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - min_wx_version=$reqwx - if test -z "--unicode" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxWidgets version >= $min_wx_version" >&5 -printf %s "checking for wxWidgets version >= $min_wx_version... " >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxWidgets version >= $min_wx_version (--unicode)" >&5 -printf %s "checking for wxWidgets version >= $min_wx_version (--unicode)... " >&6; } - fi +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + can_enable_flag=true +else case e in #( + e) can_enable_flag=false ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : - WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args --unicode" + CFLAGS="-fstrict-flex-arrays=2 $CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } - WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null` - wx_config_major_version=`echo $WX_VERSION | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` - wx_config_minor_version=`echo $WX_VERSION | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` - wx_config_micro_version=`echo $WX_VERSION | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi - wx_requested_major_version=`echo $min_wx_version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` - wx_requested_minor_version=`echo $min_wx_version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` - wx_requested_micro_version=`echo $min_wx_version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` +else case e in #( + e) if test "X$can_enable_flag" != "Xtrue" +then : + exit 1 +fi + ;; +esac +fi + +fi - wx_ver_ok="" - if test "x$WX_VERSION" != x ; then - if test $wx_config_major_version -gt $wx_requested_major_version; then - wx_ver_ok=yes - else - if test $wx_config_major_version -eq $wx_requested_major_version; then - if test $wx_config_minor_version -gt $wx_requested_minor_version; then - wx_ver_ok=yes - else - if test $wx_config_minor_version -eq $wx_requested_minor_version; then - if test $wx_config_micro_version -ge $wx_requested_micro_version; then - wx_ver_ok=yes - fi - fi - fi - fi - fi - fi + if test "$ossf_security_hardening" = "yes" +then : - if test -n "$wx_ver_ok"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (version $WX_VERSION)" >&5 -printf "%s\n" "yes (version $WX_VERSION)" >&6; } - WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs core,base,html,webview` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxWidgets static library" >&5 -printf %s "checking for wxWidgets static library... " >&6; } - WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs core,base,html,webview 2>/dev/null` - if test "x$WX_LIBS_STATIC" = "x"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -D_GLIBCXX_ASSERTIONS to CXXFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -D_GLIBCXX_ASSERTIONS to CXXFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -D_GLIBCXX_ASSERTIONS $CXXFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + can_enable_flag=true +else case e in #( + e) can_enable_flag=false ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : + + CXXFLAGS="-D_GLIBCXX_ASSERTIONS $CXXFLAGS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } - fi - wx_has_cppflags="" - if test $wx_config_major_version -gt 2; then - wx_has_cppflags=yes - else - if test $wx_config_major_version -eq 2; then - if test $wx_config_minor_version -gt 2; then - wx_has_cppflags=yes - else - if test $wx_config_minor_version -eq 2; then - if test $wx_config_micro_version -ge 6; then - wx_has_cppflags=yes - fi - fi - fi - fi - fi +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi + + +fi + + + if test "$ossf_security_hardening" = "yes" +then : + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,noexecstack to LDFLAGS (via LDFLAGS)" >&5 +printf %s "checking if we can add -Wl,-z,noexecstack to LDFLAGS (via LDFLAGS)... " >&6; } + saved_LDFLAGS=$LDFLAGS; + saved_LDFLAG="-Wl,-z,noexecstack"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$saved_LDFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : + + LDFLAGS="$saved_LDFLAG $LDFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,relro to LDFLAGS (via LDFLAGS)" >&5 +printf %s "checking if we can add -Wl,-z,relro to LDFLAGS (via LDFLAGS)... " >&6; } + saved_LDFLAGS=$LDFLAGS; + saved_LDFLAG="-Wl,-z,relro"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$saved_LDFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : + + LDFLAGS="$saved_LDFLAG $LDFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,now to LDFLAGS (via LDFLAGS)" >&5 +printf %s "checking if we can add -Wl,-z,now to LDFLAGS (via LDFLAGS)... " >&6; } + saved_LDFLAGS=$LDFLAGS; + saved_LDFLAG="-Wl,-z,now"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$saved_LDFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : + + LDFLAGS="$saved_LDFLAG $LDFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,--as-needed to LDFLAGS (via LDFLAGS)" >&5 +printf %s "checking if we can add -Wl,--as-needed to LDFLAGS (via LDFLAGS)... " >&6; } + saved_LDFLAGS=$LDFLAGS; + saved_LDFLAG="-Wl,--as-needed"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$saved_LDFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : + + LDFLAGS="$saved_LDFLAG $LDFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,--no-copy-dt-needed-entries to LDFLAGS (via LDFLAGS)" >&5 +printf %s "checking if we can add -Wl,--no-copy-dt-needed-entries to LDFLAGS (via LDFLAGS)... " >&6; } + saved_LDFLAGS=$LDFLAGS; + saved_LDFLAG="-Wl,--no-copy-dt-needed-entries"; + LDFLAGS="$saved_LDFLAG $LDFLAGS"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$saved_LDFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : + + LDFLAGS="$saved_LDFLAG $LDFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi + + +fi + + + + + +if test "X$windows_environment_" != "Xchecked"; then +windows_environment_=checked +MIXED_CYGWIN=no +MIXED_MSYS=no +MIXED_VSL=no + +MIXED_VC=no +MIXED_MINGW=no + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mixed mingw-gcc and native VC++ environment" >&5 +printf %s "checking for mixed mingw-gcc and native VC++ environment... " >&6; } +if test "X$host" = "Xwin32" -a "x$GCC" != "xyes"; then + if test -x /usr/bin/msys-?.0.dll; then + CFLAGS="$CFLAGS -O2" + MIXED_MSYS=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: MSYS and VC" >&5 +printf "%s\n" "MSYS and VC" >&6; } + MIXED_VC=yes + CPPFLAGS="$CPPFLAGS -DERTS_MIXED_VC" + elif test -x /usr/bin/cygpath; then + CFLAGS="$CFLAGS -O2" + MIXED_CYGWIN=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Cygwin and VC" >&5 +printf "%s\n" "Cygwin and VC" >&6; } + MIXED_VC=yes + CPPFLAGS="$CPPFLAGS -DERTS_MIXED_VC" + elif test -x /bin/wslpath; then + CFLAGS="$CFLAGS -O2" + MIXED_WSL=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: WSL and VC" >&5 +printf "%s\n" "WSL and VC" >&6; } + MIXED_VC=yes + CPPFLAGS="$CPPFLAGS -DERTS_MIXED_VC" + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: undeterminable" >&5 +printf "%s\n" "undeterminable" >&6; } + as_fn_error cannot handle this! "Seems to be mixed windows but not within any known env" "$LINENO" 5 + fi +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + +if test "x$MIXED_MSYS" != "xyes"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mixed cygwin and native MinGW environment" >&5 +printf %s "checking for mixed cygwin and native MinGW environment... " >&6; } + if test "X$host" = "Xwin32" -a "x$GCC" = x"yes"; then + if test -x /usr/bin/cygpath; then + CFLAGS="$CFLAGS -O2" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + MIXED_MINGW=yes + CPPFLAGS="$CPPFLAGS -DERTS_MIXED_MINGW" + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: undeterminable" >&5 +printf "%s\n" "undeterminable" >&6; } + as_fn_error cannot handle this! "Seems to be mixed windows but not with cygwin" "$LINENO" 5 + fi + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + fi +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mixed MSYS and native MinGW environment" >&5 +printf %s "checking for mixed MSYS and native MinGW environment... " >&6; } + if test "x$GCC" = x"yes"; then + if test -x /usr/bin/msys-=.0.dll; then + CFLAGS="$CFLAGS -O2" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + MIXED_MINGW=yes + CPPFLAGS="$CPPFLAGS -DERTS_MIXED_MINGW" + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: undeterminable" >&5 +printf "%s\n" "undeterminable" >&6; } + as_fn_error cannot handle this! "Seems to be mixed windows but not with msys" "$LINENO" 5 + fi + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + fi +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we mix cygwin with any native compiler" >&5 +printf %s "checking if we mix cygwin with any native compiler... " >&6; } +if test "X$MIXED_CYGWIN" = "Xyes"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we mix msys with another native compiler" >&5 +printf %s "checking if we mix msys with another native compiler... " >&6; } +if test "X$MIXED_MSYS" = "Xyes" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we mix WSL with another native compiler" >&5 +printf %s "checking if we mix WSL with another native compiler... " >&6; } +if test "X$MIXED_WSL" = "Xyes" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + +fi + + +USER_CFLAGS=$CFLAGS + +if test X"$MIXED_VC" = X"yes" ; then + CFLAGS="-Owx" +fi + +ac_header= ac_cache= +for ac_item in $ac_header_c_list +do + if test $ac_cache; then + ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" + if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then + printf "%s\n" "#define $ac_item 1" >> confdefs.h + fi + ac_header= ac_cache= + elif test $ac_header; then + ac_cache=$ac_item + else + ac_header=$ac_item + fi +done + + + + + + + + +if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes +then : + +printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h + +fi +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 +printf %s "checking size of void *... " >&6; } +if test ${ac_cv_sizeof_void_p+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" +then : + +else case e in #( + e) if test "$ac_cv_type_void_p" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (void *) +See 'config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_void_p=0 + fi ;; +esac +fi + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 +printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } + + + +printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h + + + +PTHR_CFLAGS="-D_THREAD_SAFE -D_REENTRANT" + +OBJC_CC=$CC +OBJC_CFLAGS="" +CXXFLAGS="" +case $host_os in #( + darwin*) : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Checking wxWidgets for min version:" >&5 +printf %s "checking Checking wxWidgets for min version:... " >&6; } + WX_CC=`wx-config --cc` + MAC_MIN=`echo "$WX_CC" | sed 's/^[^ ]*\ *//'` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAC_MIN" >&5 +printf "%s\n" "$MAC_MIN" >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -ObjC" >&5 +printf %s "checking if compiler accepts -ObjC... " >&6; } + CFLAGS="$CFLAGS -ObjC" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + accept_objc_flag=true +else case e in #( + e) accept_objc_flag=false ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + if test "X$accept_objc_flag" = "Xtrue"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + C_ONLY_FLAGS="-ObjC" + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a Cocoa compliant Objective C compiler" >&5 +printf %s "checking for a Cocoa compliant Objective C compiler... " >&6; } + SEARCHFOR="" + SEARCHFORXX="" + save_IFS=$IFS + IFS=: + set $PATH + IFS=$save_IFS + while test X"$1" != X""; do + SEARCHFOR="$1/gcc-apple-4.2 $SEARCHFOR" + SEARCHFORXX="$1/g++-apple-4.2 $SEARCHFORXX" + shift + done + SEARCHFOR="/usr/bin/clang /usr/bin/gcc $SEARCHFOR" + SEARCHFORXX="/usr/bin/clang /usr/bin/g++ $SEARCHFORXX" + APPLE_CC="" + APPLE_CXX="" + IFS=" " + set $SEARCHFORXX + for x in $SEARCHFOR; do + if test -x $x; then + APPLE_CC=$x + fi + if test -x "$1"; then + APPLE_CXX="$1" + fi + shift + done + IFS=$save_IFS + if test X$APPLE_CC = X -o X$APPLE_CXX = X; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + echo "Can not find compiler to compile Cocoa applications" >> ./CONF_INFO + WXERL_CAN_BUILD_DRIVER=false + if test X"$with_wx" = X"yes" ; then + as_fn_error $? "Can not find compiler to compile Cocoa applications" "$LINENO" 5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Can not find compiler to compile Cocoa applications" >&5 +printf "%s\n" "$as_me: WARNING: Can not find compiler to compile Cocoa applications" >&2;} + fi + + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $APPLE_CC ($APPLE_CXX)" >&5 +printf "%s\n" "$APPLE_CC ($APPLE_CXX)" >&6; } + CC=$APPLE_CC + CXX=$APPLE_CXX + #CXXFLAGS="-x c++ $CXXFLAGS" + OBJC_CC=$APPLE_CC + OBJC_CFLAGS="-ObjC" + fi + fi + CFLAGS="$USER_CFLAGS $MAC_MIN -Wno-deprecated-declarations" + CPPFLAGS="$CPPFLAGS -D_MACOSX $PTHR_CFLAGS" + ;; #( + mingw32) : + + CFLAGS="$CFLAGS -DWIN32 -DWINVER=0x0600 -D_WINDOWS -D_UNICODE -DUNICODE" + CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0600" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Reverting to 32-bit time_t" >&5 +printf "%s\n" "$as_me: WARNING: Reverting to 32-bit time_t" >&2;} + CPPFLAGS="$CPPFLAGS -D_USE_32BIT_TIME_T" + ;; #( + win32) : + + CFLAGS="$CFLAGS -DWIN32 -DWINVER=0x0600 -D_WINDOWS -D_UNICODE -DUNICODE" + CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0600" + ;; #( + *) : + + GLIB_CFLAGS=`pkg-config --silence-errors --cflags glib-2.0` + GLIB_LIBS=`pkg-config --silence-errors --libs glib-2.0` + if test X"$GLIB_CFLAGS" != X ; then + HAVE_GLIB="-DHAVE_GLIB=1" + fi + CFLAGS="$CFLAGS -Wno-deprecated-declarations" + CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE $PTHR_CFLAGS $HAVE_GLIB" + ;; +esac + + + + + + + +EXTRA_LDFLAGS= + +case $host_os in + darwin*) + # beam.smp has not been built yet, so we must not use the + # -bundle_loader option in the configuration tests. + LDFLAGS="$MAC_MIN -bundle $LDFLAGS" + EXTRA_LDFLAGS=" -bundle_loader ${ERL_TOP}/bin/$host/beam.smp" + GL_LIBS="-framework OpenGL" + ;; + win32) + LDFLAGS="-dll $LDFLAGS" + GL_LIBS="-lglu32 -lOpengl32" + ;; + mingw32) + LDFLAGS="-shared -fPIC $LDFLAGS" + GL_LIBS="-lglu32 -lOpengl32" + ;; + *) + # When checking linkage we'd like to see that symbols are resolved. + # In order to notice errors, we must test without `-shared`. + LDFLAGS="-fPIC $LDFLAGS" + EXTRA_LDFLAGS=" -shared " + GL_LIBS="-lGL -lGLU" + ;; +esac + + +case $host_os in + mingw32) + DEBUG_CFLAGS="-g -Wall -DDEBUG $CFLAGS" + CFLAGS="-g -Wall -O2 $CFLAGS -fomit-frame-pointer" + ;; + win32) + DEBUG_CFLAGS="-g -Wall $CFLAGS -DDEBUG" + CFLAGS="-g -Wall -O2 $CFLAGS" + ;; + darwin*) + DEBUG_CFLAGS="-g -Wall -fPIC $CFLAGS -DDEBUG" + # omit-frame-pointer causes seg faults with 10.9 and clang + CFLAGS="-g -Wall -fPIC $CFLAGS" + ;; + *) + DEBUG_CFLAGS="-g -Wall -fPIC $CFLAGS -DDEBUG" + CFLAGS="-Wall -fPIC $CFLAGS -fomit-frame-pointer" + ;; +esac + + +if test "x$GCC" = xyes -a X"$host_os" != X"win32" +then : + + CXXNOOPT="-O1" + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-move-loop-invariants to CXXNOOPT (via CFLAGS)" >&5 +printf %s "checking if we can add -fno-move-loop-invariants to CXXNOOPT (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fno-move-loop-invariants $CXXNOOPT"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + can_enable_flag=true +else case e in #( + e) can_enable_flag=false ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : + + CXXNOOPT="-fno-move-loop-invariants $CXXNOOPT" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-var-tracking-assignments to CXXNOOPT (via CFLAGS)" >&5 +printf %s "checking if we can add -fno-var-tracking-assignments to CXXNOOPT (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -fno-var-tracking-assignments $CXXNOOPT"; + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + can_enable_flag=true +else case e in #( + e) can_enable_flag=false ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$saved_CFLAGS; + if test "X$can_enable_flag" = "Xtrue" +then : + + CXXNOOPT="-fno-var-tracking-assignments $CXXNOOPT" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +else case e in #( + e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; +esac +fi + + +fi + + +if test X"$host_os" != X"win32" +then : + + for ac_header in GL/gl.h +do : + ac_fn_c_check_header_compile "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default" +if test "x$ac_cv_header_GL_gl_h" = xyes +then : + printf "%s\n" "#define HAVE_GL_GL_H 1" >>confdefs.h + +else case e in #( + e) ac_fn_c_check_header_compile "$LINENO" "OpenGL/gl.h" "ac_cv_header_OpenGL_gl_h" "$ac_includes_default" +if test "x$ac_cv_header_OpenGL_gl_h" = xyes +then : + printf "%s\n" "#define HAVE_OPENGL_GL_H 1" >>confdefs.h - wx_has_rescomp="" - if test $wx_config_major_version -gt 2; then - wx_has_rescomp=yes - else - if test $wx_config_major_version -eq 2; then - if test $wx_config_minor_version -ge 7; then - wx_has_rescomp=yes - fi - fi - fi - if test "x$wx_has_rescomp" = x ; then - WX_RESCOMP= - else - WX_RESCOMP=`$WX_CONFIG_WITH_ARGS --rescomp` - fi +fi + ;; +esac +fi - if test "x$wx_has_cppflags" = x ; then - WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags core,base,html,webview` - WX_CPPFLAGS=$WX_CFLAGS - WX_CXXFLAGS=$WX_CFLAGS +done + if test X"$ac_cv_header_GL_gl_h" != Xyes && test X"$ac_cv_header_OpenGL_gl_h" != Xyes +then : - WX_CFLAGS_ONLY=$WX_CFLAGS - WX_CXXFLAGS_ONLY=$WX_CFLAGS - else - WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags core,base,html,webview` - WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags core,base,html,webview` - WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags core,base,html,webview` + saved_CPPFLAGS="$CPPFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Checking for OpenGL headers in /usr/X11R6" >&5 +printf "%s\n" "$as_me: Checking for OpenGL headers in /usr/X11R6" >&6;} + CPPFLAGS="-isystem /usr/X11R6/include $CPPFLAGS" + $as_unset ac_cv_header_GL_gl_h + ac_fn_c_check_header_compile "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default" +if test "x$ac_cv_header_GL_gl_h" = xyes +then : + printf "%s\n" "#define HAVE_GL_GL_H 1" >>confdefs.h - WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"` - WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"` - fi +fi - : + if test X"$ac_cv_header_GL_gl_h" != Xyes +then : - else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Checking for OpenGL headers in /usr/local" >&5 +printf "%s\n" "$as_me: Checking for OpenGL headers in /usr/local" >&6;} + CPPFLAGS="-isystem /usr/local/include $saved_CPPFLAGS" + $as_unset ac_cv_header_GL_gl_h + ac_fn_c_check_header_compile "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default" +if test "x$ac_cv_header_GL_gl_h" = xyes +then : + printf "%s\n" "#define HAVE_GL_GL_H 1" >>confdefs.h - if test "x$WX_VERSION" = x; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (version $WX_VERSION is not new enough)" >&5 -printf "%s\n" "no (version $WX_VERSION is not new enough)" >&6; } - fi +fi - WX_CFLAGS="" - WX_CPPFLAGS="" - WX_CXXFLAGS="" - WX_LIBS="" - WX_LIBS_STATIC="" - WX_RESCOMP="" + if test X"$ac_cv_header_GL_gl_h" != Xyes +then : - if test ! -z "--unicode"; then - wx_error_message=" - The configuration you asked for $PACKAGE_NAME requires a wxWidgets - build with the following settings: - --unicode - but such build is not available. - To see the wxWidgets builds available on this system, please use - 'wx-config --list' command. To use the default build, returned by - 'wx-config --selected-config', use the options with their 'auto' - default values." - fi - wx_error_message=" - The requested wxWidgets build couldn't be found. - $wx_error_message - If you still get this error, then check that 'wx-config' is - in path, the directory where wxWidgets libraries are installed - (returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH - or equivalent variable and wxWidgets version is $reqwx or above." - echo "$wx_error_message" >> ./CONF_INFO + echo "No OpenGL headers found, wx will NOT be usable" >> ./CONF_INFO WXERL_CAN_BUILD_DRIVER=false if test X"$with_wx" = X"yes" ; then - as_fn_error $? "$wx_error_message" "$LINENO" 5 + as_fn_error $? "No OpenGL headers found, wx will NOT be usable" "$LINENO" 5 else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $wx_error_message" >&5 -printf "%s\n" "$as_me: WARNING: $wx_error_message" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No OpenGL headers found, wx will NOT be usable" >&5 +printf "%s\n" "$as_me: WARNING: No OpenGL headers found, wx will NOT be usable" >&2;} fi + CPPFLAGS="$saved_CPPFLAGS" - fi - else +else case e in #( + e) + GL_LIBS="-L/usr/local/lib $GL_LIBS" + ;; +esac +fi - WX_CFLAGS="" - WX_CPPFLAGS="" - WX_CXXFLAGS="" - WX_LIBS="" - WX_LIBS_STATIC="" - WX_RESCOMP="" +else case e in #( + e) + GL_LIBS="-L/usr/X11R6/lib $GL_LIBS" + ;; +esac +fi - : +fi - fi +else case e in #( + e) + ac_fn_c_check_header_compile "$LINENO" "gl/gl.h" "ac_cv_header_gl_gl_h" "#include +" +if test "x$ac_cv_header_gl_gl_h" = xyes +then : + printf "%s\n" "#define HAVE_GL_GL_H 1" >>confdefs.h + +fi + + ;; +esac +fi +if test X"$host_os" != X"win32" +then : + + for ac_header in GL/glu.h +do : + ac_fn_c_check_header_compile "$LINENO" "GL/glu.h" "ac_cv_header_GL_glu_h" "$ac_includes_default" +if test "x$ac_cv_header_GL_glu_h" = xyes +then : + printf "%s\n" "#define HAVE_GL_GLU_H 1" >>confdefs.h + +else case e in #( + e) ac_fn_c_check_header_compile "$LINENO" "OpenGL/glu.h" "ac_cv_header_OpenGL_glu_h" "$ac_includes_default" +if test "x$ac_cv_header_OpenGL_glu_h" = xyes +then : + printf "%s\n" "#define HAVE_OPENGL_GLU_H 1" >>confdefs.h +fi + ;; +esac +fi +done + if test X"$ac_cv_header_GL_glu_h" != Xyes && + test X"$ac_cv_header_OpenGL_glu_h" != Xyes + then + echo "No GLU headers found, wx will NOT be usable" >> ./CONF_INFO + WXERL_CAN_BUILD_DRIVER=false + if test X"$with_wx" = X"yes" ; then + as_fn_error $? "No GLU headers found, wx will NOT be usable" "$LINENO" 5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No GLU headers found, wx will NOT be usable" >&5 +printf "%s\n" "$as_me: WARNING: No GLU headers found, wx will NOT be usable" >&2;} + fi + fi +else case e in #( + e) + ac_fn_c_check_header_compile "$LINENO" "gl/glu.h" "ac_cv_header_gl_glu_h" "#include +" +if test "x$ac_cv_header_gl_glu_h" = xyes +then : + printf "%s\n" "#define HAVE_GL_GLU_H 1" >>confdefs.h +fi + ;; +esac +fi +DEBUG_CXXFLAGS="$CXXFLAGS $DEBUG_CFLAGS $CPPFLAGS" +DEBUG_CFLAGS="$DEBUG_CFLAGS $CPPFLAGS $C_ONLY_FLAGS" - WX_VERSION_MAJOR="$wx_config_major_version" - WX_VERSION_MINOR="$wx_config_minor_version" - WX_VERSION_MICRO="$wx_config_micro_version" +CXXNOOPTFLAGS="$CXXFLAGS $CFLAGS $CPPFLAGS $CXXNOOPT" +CXXFLAGS="$CXXFLAGS $CFLAGS $CPPFLAGS" +CFLAGS="$CFLAGS $CPPFLAGS $C_ONLY_FLAGS" +ERLC=erlc +ERL=erl +ERLANG_ROOT_DIR=$ERL_TOP - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxwidgets webview" >&5 -printf %s "checking for wxwidgets webview... " >&6; } - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - saved_CXXFLAGS=$CXXFLAGS - CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS" - saved_LIBS=$LIBS - LIBS=$WX_LIBS - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #include "wx/wx.h" - #include "wx/webview.h" +if test "$cross_compiling" = "yes" +then : -int -main (void) -{ + echo "Cross compilation of the wx driver is not supported yet, wx will NOT be usable" >> ./CONF_INFO + WXERL_CAN_BUILD_DRIVER=false + if test X"$with_wx" = X"yes" ; then + as_fn_error $? "Cross compilation of the wx driver is not supported yet, wx will NOT be usable" "$LINENO" 5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Cross compilation of the wx driver is not supported yet, wx will NOT be usable" >&5 +printf "%s\n" "$as_me: WARNING: Cross compilation of the wx driver is not supported yet, wx will NOT be usable" >&2;} + fi - wxWebView::New(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" +elif test X"$MIXED_VC" = X"no" then : - HAVE_WEBVIEW_SUPPORT=yes -else case e in #( - e) HAVE_WEBVIEW_SUPPORT=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - CXXFLAGS=$saved_CXXFLAGS - LIBS=$saved_LIBS - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_WEBVIEW_SUPPORT" >&5 -printf "%s\n" "$HAVE_WEBVIEW_SUPPORT" >&6; } - if test X"$HAVE_WEBVIEW_SUPPORT" != X"yes" ; then - WXELIBS=stc,xrc,html,adv,xml,core,base,gl,aui - echo "wxWidgets was not compiled with --enable-webview or wxWebView developer package is not installed, wxWebView will NOT be available" >> ./CONF_INFO - else - WXELIBS=stc,xrc,html,adv,xml,core,base,gl,aui,webview - printf "%s\n" "#define WXE_WEBVIEW 1" >>confdefs.h - fi - # Try to find debug libs first - if test x${WX_CONFIG_NAME+set} != xset ; then - WX_CONFIG_NAME=wx-config - fi - if test "x$wx_config_name" != x ; then - WX_CONFIG_NAME="$wx_config_name" - fi - if test x$wx_config_exec_prefix != x ; then - wx_config_args="$wx_config_args --exec-prefix=$wx_config_exec_prefix" - WX_LOOKUP_PATH="$wx_config_exec_prefix/bin" - fi - if test x$wx_config_prefix != x ; then - wx_config_args="$wx_config_args --prefix=$wx_config_prefix" - WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin" - fi - if test "$cross_compiling" = "yes"; then - wx_config_args="$wx_config_args --host=$host_alias" - fi - if test -x "$WX_CONFIG_NAME" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wx-config" >&5 -printf %s "checking for wx-config... " >&6; } - WX_CONFIG_PATH="$WX_CONFIG_NAME" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WX_CONFIG_PATH" >&5 -printf "%s\n" "$WX_CONFIG_PATH" >&6; } - else - # Extract the first word of "$WX_CONFIG_NAME", so it can be a program name with args. -set dummy $WX_CONFIG_NAME; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_WX_CONFIG_PATH+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) case $WX_CONFIG_PATH in - [\\/]* | ?:[\\/]*) - ac_cv_path_WX_CONFIG_PATH="$WX_CONFIG_PATH" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_dummy=""$WX_LOOKUP_PATH:$PATH"" -for as_dir in $as_dummy -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_WX_CONFIG_PATH="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - test -z "$ac_cv_path_WX_CONFIG_PATH" && ac_cv_path_WX_CONFIG_PATH="no" - ;; -esac ;; -esac -fi -WX_CONFIG_PATH=$ac_cv_path_WX_CONFIG_PATH -if test -n "$WX_CONFIG_PATH"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WX_CONFIG_PATH" >&5 -printf "%s\n" "$WX_CONFIG_PATH" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - fi - if test "$WX_CONFIG_PATH" != "no" ; then - WX_VERSION="" - min_wx_version=$reqwx - if test -z "--unicode --debug=yes" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxWidgets version >= $min_wx_version" >&5 -printf %s "checking for wxWidgets version >= $min_wx_version... " >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxWidgets version >= $min_wx_version (--unicode --debug=yes)" >&5 -printf %s "checking for wxWidgets version >= $min_wx_version (--unicode --debug=yes)... " >&6; } - fi - WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args --unicode --debug=yes" - WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null` - wx_config_major_version=`echo $WX_VERSION | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` - wx_config_minor_version=`echo $WX_VERSION | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` - wx_config_micro_version=`echo $WX_VERSION | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` - wx_requested_major_version=`echo $min_wx_version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` - wx_requested_minor_version=`echo $min_wx_version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` - wx_requested_micro_version=`echo $min_wx_version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` - wx_ver_ok="" - if test "x$WX_VERSION" != x ; then - if test $wx_config_major_version -gt $wx_requested_major_version; then - wx_ver_ok=yes - else - if test $wx_config_major_version -eq $wx_requested_major_version; then - if test $wx_config_minor_version -gt $wx_requested_minor_version; then - wx_ver_ok=yes - else - if test $wx_config_minor_version -eq $wx_requested_minor_version; then - if test $wx_config_micro_version -ge $wx_requested_micro_version; then - wx_ver_ok=yes - fi - fi - fi - fi - fi - fi - if test -n "$wx_ver_ok"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (version $WX_VERSION)" >&5 -printf "%s\n" "yes (version $WX_VERSION)" >&6; } - WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs $WXELIBS` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxWidgets static library" >&5 -printf %s "checking for wxWidgets static library... " >&6; } - WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs $WXELIBS 2>/dev/null` - if test "x$WX_LIBS_STATIC" = "x"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - fi - wx_has_cppflags="" - if test $wx_config_major_version -gt 2; then - wx_has_cppflags=yes - else - if test $wx_config_major_version -eq 2; then - if test $wx_config_minor_version -gt 2; then - wx_has_cppflags=yes - else - if test $wx_config_minor_version -eq 2; then - if test $wx_config_micro_version -ge 6; then - wx_has_cppflags=yes - fi - fi - fi - fi - fi - wx_has_rescomp="" - if test $wx_config_major_version -gt 2; then - wx_has_rescomp=yes - else - if test $wx_config_major_version -eq 2; then - if test $wx_config_minor_version -ge 7; then - wx_has_rescomp=yes - fi - fi - fi - if test "x$wx_has_rescomp" = x ; then - WX_RESCOMP= - else - WX_RESCOMP=`$WX_CONFIG_WITH_ARGS --rescomp` - fi - if test "x$wx_has_cppflags" = x ; then - WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $WXELIBS` - WX_CPPFLAGS=$WX_CFLAGS - WX_CXXFLAGS=$WX_CFLAGS - WX_CFLAGS_ONLY=$WX_CFLAGS - WX_CXXFLAGS_ONLY=$WX_CFLAGS - else - WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags $WXELIBS` - WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags $WXELIBS` - WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $WXELIBS` - WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"` - WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"` - fi - wxWinWithGLDBG=1 - else - if test "x$WX_VERSION" = x; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (version $WX_VERSION is not new enough)" >&5 -printf "%s\n" "no (version $WX_VERSION is not new enough)" >&6; } - fi - WX_CFLAGS="" - WX_CPPFLAGS="" - WX_CXXFLAGS="" - WX_LIBS="" - WX_LIBS_STATIC="" - WX_RESCOMP="" - if test ! -z "--unicode --debug=yes"; then - wx_error_message=" - The configuration you asked for $PACKAGE_NAME requires a wxWidgets - build with the following settings: - --unicode --debug=yes - but such build is not available. - To see the wxWidgets builds available on this system, please use - 'wx-config --list' command. To use the default build, returned by - 'wx-config --selected-config', use the options with their 'auto' - default values." - fi - wx_error_message=" - The requested wxWidgets build couldn't be found. - $wx_error_message - If you still get this error, then check that 'wx-config' is - in path, the directory where wxWidgets libraries are installed - (returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH - or equivalent variable and wxWidgets version is $reqwx or above." - wxWinWithGLDBG=0 - fi - else - WX_CFLAGS="" - WX_CPPFLAGS="" - WX_CXXFLAGS="" - WX_LIBS="" - WX_LIBS_STATIC="" - WX_RESCOMP="" - wxWinWithGLDBG=0 - fi @@ -6387,34 +6890,47 @@ printf "%s\n" "no (version $WX_VERSION is not new enough)" >&6; } - WX_VERSION_MAJOR="$wx_config_major_version" - WX_VERSION_MINOR="$wx_config_minor_version" - WX_VERSION_MICRO="$wx_config_micro_version" +# Check whether --with-wxdir was given. +if test ${with_wxdir+y} +then : + withval=$with_wxdir; wx_config_name="$withval/wx-config" + wx_config_args="--inplace" +fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for debug build of wxWidgets" >&5 -printf %s "checking for debug build of wxWidgets... " >&6; } - if test "$wxWinWithGLDBG" = 1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; }; - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; }; - fi - DEBUG_WX_CFLAGS=$WX_CFLAGS - DEBUG_WX_CXXFLAGS=$WX_CXXFLAGS - DEBUG_WX_LIBS=$WX_LIBS - DEBUG_WX_LIBS_STATIC=$WX_LIBS_STATIC +# Check whether --with-wx-config was given. +if test ${with_wx_config+y} +then : + withval=$with_wx_config; wx_config_name="$withval" +fi +# Check whether --with-wx-prefix was given. +if test ${with_wx_prefix+y} +then : + withval=$with_wx_prefix; wx_config_prefix="$withval" +else case e in #( + e) wx_config_prefix="" ;; +esac +fi + +# Check whether --with-wx-exec-prefix was given. +if test ${with_wx_exec_prefix+y} +then : + withval=$with_wx_exec_prefix; wx_config_exec_prefix="$withval" +else case e in #( + e) wx_config_exec_prefix="" ;; +esac +fi + reqwx=3.0.2 if test x${WX_CONFIG_NAME+set} != xset ; then @@ -6498,15 +7014,15 @@ fi WX_VERSION="" min_wx_version=$reqwx - if test -z "--unicode --debug=no" ; then + if test -z "--unicode" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxWidgets version >= $min_wx_version" >&5 printf %s "checking for wxWidgets version >= $min_wx_version... " >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxWidgets version >= $min_wx_version (--unicode --debug=no)" >&5 -printf %s "checking for wxWidgets version >= $min_wx_version (--unicode --debug=no)... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxWidgets version >= $min_wx_version (--unicode)" >&5 +printf %s "checking for wxWidgets version >= $min_wx_version (--unicode)... " >&6; } fi - WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args --unicode --debug=no" + WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args --unicode" WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null` wx_config_major_version=`echo $WX_VERSION | \ @@ -6547,11 +7063,11 @@ printf %s "checking for wxWidgets version >= $min_wx_version (--unicode --debug= if test -n "$wx_ver_ok"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (version $WX_VERSION)" >&5 printf "%s\n" "yes (version $WX_VERSION)" >&6; } - WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs $WXELIBS` + WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs core,base,html,webview` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxWidgets static library" >&5 printf %s "checking for wxWidgets static library... " >&6; } - WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs $WXELIBS 2>/dev/null` + WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs core,base,html,webview 2>/dev/null` if test "x$WX_LIBS_STATIC" = "x"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } @@ -6594,1609 +7110,1301 @@ printf "%s\n" "yes" >&6; } fi if test "x$wx_has_cppflags" = x ; then - WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $WXELIBS` + WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags core,base,html,webview` WX_CPPFLAGS=$WX_CFLAGS WX_CXXFLAGS=$WX_CFLAGS WX_CFLAGS_ONLY=$WX_CFLAGS WX_CXXFLAGS_ONLY=$WX_CFLAGS - else - WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags $WXELIBS` - WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags $WXELIBS` - WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $WXELIBS` - - WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"` - WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"` - fi - - wxWinWithGL=1 - - else - - if test "x$WX_VERSION" = x; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (version $WX_VERSION is not new enough)" >&5 -printf "%s\n" "no (version $WX_VERSION is not new enough)" >&6; } - fi - - WX_CFLAGS="" - WX_CPPFLAGS="" - WX_CXXFLAGS="" - WX_LIBS="" - WX_LIBS_STATIC="" - WX_RESCOMP="" - - if test ! -z "--unicode --debug=no"; then - wx_error_message=" - The configuration you asked for $PACKAGE_NAME requires a wxWidgets - build with the following settings: - --unicode --debug=no - but such build is not available. - To see the wxWidgets builds available on this system, please use - 'wx-config --list' command. To use the default build, returned by - 'wx-config --selected-config', use the options with their 'auto' - default values." - fi - wx_error_message=" - The requested wxWidgets build couldn't be found. - $wx_error_message - If you still get this error, then check that 'wx-config' is - in path, the directory where wxWidgets libraries are installed - (returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH - or equivalent variable and wxWidgets version is $reqwx or above." - wxWinWithGL=0 - - fi - else - - WX_CFLAGS="" - WX_CPPFLAGS="" - WX_CXXFLAGS="" - WX_LIBS="" - WX_LIBS_STATIC="" - WX_RESCOMP="" - - wxWinWithGL=0 - - fi - - - - - - - - - - - - WX_VERSION_MAJOR="$wx_config_major_version" - WX_VERSION_MINOR="$wx_config_minor_version" - WX_VERSION_MICRO="$wx_config_micro_version" - - - - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for standard build of wxWidgets" >&5 -printf %s "checking for standard build of wxWidgets... " >&6; } - if test "$wxWinWithGL" = 1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; }; - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; }; - fi - - if test "x$WX_LIBS_STATIC" = "x"; then - WX_HAVE_STATIC_LIBS=false - else - WX_HAVE_STATIC_LIBS=true - fi - - wxWin=0 - - if test "$wxWinWithGLDBG" = 1; then - if test "$wxWinWithGL" = 1; then - wxWin=1 - FORCED_DEBUG_BUILD=false - else - wxWin=1 - FORCED_DEBUG_BUILD=debug - WX_CFLAGS=$DEBUG_WX_CFLAGS - WX_CXXFLAGS=$DEBUG_WX_CXXFLAGS - WX_LIBS=$DEBUG_WX_LIBS - WX_LIBS_STATIC=$DEBUG_WX_LIBS_STATIC - fi - elif test "$wxWinWithGL" = 1; then - wxWin=1 - FORCED_DEBUG_BUILD=false - fi - - RC_FILE_TYPE=o - - if test "$wxWin" != 1; then - echo " - wxWidgets must be installed on your system. - - Please check that wx-config is in path, the directory - where wxWidgets libraries are installed (returned by - 'wx-config --libs' or 'wx-config --static --libs' command) - is in LD_LIBRARY_PATH or equivalent variable and - wxWidgets version is $reqwx or above." >> ./CONF_INFO - WXERL_CAN_BUILD_DRIVER=false - if test X"$with_wx" = X"yes" ; then - as_fn_error $? " - wxWidgets must be installed on your system. - - Please check that wx-config is in path, the directory - where wxWidgets libraries are installed (returned by - 'wx-config --libs' or 'wx-config --static --libs' command) - is in LD_LIBRARY_PATH or equivalent variable and - wxWidgets version is $reqwx or above." "$LINENO" 5 - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: - wxWidgets must be installed on your system. - - Please check that wx-config is in path, the directory - where wxWidgets libraries are installed (returned by - 'wx-config --libs' or 'wx-config --static --libs' command) - is in LD_LIBRARY_PATH or equivalent variable and - wxWidgets version is $reqwx or above." >&5 -printf "%s\n" "$as_me: WARNING: - wxWidgets must be installed on your system. - - Please check that wx-config is in path, the directory - where wxWidgets libraries are installed (returned by - 'wx-config --libs' or 'wx-config --static --libs' command) - is in LD_LIBRARY_PATH or equivalent variable and - wxWidgets version is $reqwx or above." >&2;} - fi - - fi - -else case e in #( - e) #else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxWidgets in standard locations" >&5 -printf %s "checking for wxWidgets in standard locations... " >&6; } - echo - # Check whether --with-wxdir was given. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OptionCheck: $with_wxdir $with_wx_prefix" >&5 -printf "%s\n" "$as_me: OptionCheck: $with_wxdir $with_wx_prefix" >&6;} - - if test "${with_wxdir+set}" = set; then : - withval=$with_wxdir; CWXWIN0=$withval - else - # Check whether --with-wx-prefix was given. - if test "${with_wx_prefix+set}" = set; then : - withval=$with_wx_prefix; CWXWIN0=$withval - else - CWXWIN0="" - fi - fi - - CWXWIN_CONFIG=`win32_path.sh -u $wx_config_name 2>/dev/null` - CWXWIN1=`dirname $CWXWIN_CONFIG 2>/dev/null` - CWXWIN2=`dirname $CWXWIN1 2>/dev/null` - - if test -z "$PROGRAMFILES" ; then - PROGRAMFILES="c:/Program Files" - fi - - CWXWIN_PROG=`win32_path.sh -u "$PROGRAMFILES" 2>/dev/null` - - CWXWIN3="$CWXWIN_PROG/wxWidgets-3.*.* - CWXWIN4="$CWXWIN_PROG/wxMSW-3.*.* - - DOC_OPT1=/opt/local/pgm - DOC_OPT2=/mnt/c/opt/local/pgm - CWX_DOCUMENTED="$DOC_OPT1/wxWidgets-3.*.* $DOC_OPT1/wxMSW-3.*.*" - CWX_DOCUMENTED="$DOC_OPT2/wxWidgets-3.*.* $DOC_OPT2/wxMSW-3.*.* $CWX_DOCUMENTED" - - case $ac_cv_sizeof_void_p in - 8) - case $host_cpu in - aarch64) - VC_LIB=lib/vc_arm64_lib - WX_ARCH=aarch64 - ;; - *) - VC_LIB=lib/vc_x64_lib - WX_ARCH=x64 - ;; - esac - DOC_OPT64_1=/opt/local64/pgm - DOC_OPT64_2=/mnt/c/opt/local64/pgm - CWX_DOCUMENTED="$DOC_OPT64_1/wxWidgets-3.*.* $DOC_OPT64_1/wxMSW-3.*.* $CWX_DOCUMENTED" - CWX_DOCUMENTED="$DOC_OPT64_2/wxWidgets-3.*.* $DOC_OPT64_2/wxMSW-3.*.* $CWX_DOCUMENTED" - ;; - *) - VC_LIB=lib/vc_lib - WX_ARCH=x86 - DOC_OPT3=/opt/local32/pgm - DOC_OPT4=/mnt/c/opt/local32/pgm - CWX_DOCUMENTED="$DOC_OPT3/wxWidgets-3.*.* $DOC_OPT3/wxMSW-3.*.* $CWX_DOCUMENTED" - CWX_DOCUMENTED="$DOC_OPT4/wxWidgets-3.*.* $DOC_OPT4/wxMSW-3.*.* $CWX_DOCUMENTED" - ;; - esac + else + WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags core,base,html,webview` + WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags core,base,html,webview` + WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags core,base,html,webview` - CWXPATH="$CWXWIN0 $CWXWIN1 $CWXWIN2 $CWX_DOCUMENTED $CWXWIN3 $CWXWIN4" + WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"` + WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"` + fi - for dir in $CWXPATH; do - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Checking: $dir" >&5 -printf "%s\n" "$as_me: Checking: $dir" >&6;} - if test -f $dir/include/wx/wx.h; then - WXINCLUDE_MSVC=$dir/include/msvc - WXINCLUDE_PLAIN=$dir/include - WX_CFLAGS="-EHsc -D_UNICODE -DUNICODE -I$WXINCLUDE_MSVC -I$WXINCLUDE_PLAIN -D__WXMSW__" - WX_CXXFLAGS="-TP $WX_CFLAGS" - WX_LIBDIR=$dir/$VC_LIB - WX_RESCOMP="rc.sh -I$WXINCLUDE_PLAIN -D __WIN32__" - RC_FILE_TYPE=res - base=`ls $WX_LIBDIR/wxbase*.lib 2> /dev/null | egrep 'wxbase[0-9]*u\.lib'` - corelib_number=`echo $base | sed 's,.*\([0-9].\)u\.lib,\1,'` - if test '!' -z "$corelib_number"; then - WXLIBNO=$corelib_number - WX_LIBS0="wxmsw${WXLIBNO}u_stc wxmsw${WXLIBNO}u_xrc wxmsw${WXLIBNO}u_html" - WX_LIBS1="wxmsw${WXLIBNO}u_adv wxbase${WXLIBNO}u_xml wxmsw${WXLIBNO}u_core" - WX_LIBS2="wxbase${WXLIBNO}u wxmsw${WXLIBNO}u_gl wxmsw${WXLIBNO}u_aui" - WX_LIBS3="wxregexu wxexpat wxtiff wxjpeg wxpng wxzlib" - WX_SYSLIBS="winspool winmm oleaut32 ole32 gdiplus" - WX_LIBS_STATIC="-L$WX_LIBDIR" - for lib in $WX_LIBS0 $WX_LIBS1 $WX_LIBS2 $WX_LIBS3 $WX_SYSLIBS; do - WX_LIBS_STATIC="$WX_LIBS_STATIC -l$lib" - done - WXDIR=$dir - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found: $dir" >&5 -printf "%s\n" "Found: $dir" >&6; } - break - fi - fi - done + : - if test -z "$WX_LIBS_STATIC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -printf "%s\n" "failed" >&6; } - echo "Cannot find core lib version for wxWidgets" >> ./CONF_INFO + else + + if test "x$WX_VERSION" = x; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (version $WX_VERSION is not new enough)" >&5 +printf "%s\n" "no (version $WX_VERSION is not new enough)" >&6; } + fi + + WX_CFLAGS="" + WX_CPPFLAGS="" + WX_CXXFLAGS="" + WX_LIBS="" + WX_LIBS_STATIC="" + WX_RESCOMP="" + + if test ! -z "--unicode"; then + wx_error_message=" + The configuration you asked for $PACKAGE_NAME requires a wxWidgets + build with the following settings: + --unicode + but such build is not available. + To see the wxWidgets builds available on this system, please use + 'wx-config --list' command. To use the default build, returned by + 'wx-config --selected-config', use the options with their 'auto' + default values." + fi + wx_error_message=" + The requested wxWidgets build couldn't be found. + $wx_error_message + If you still get this error, then check that 'wx-config' is + in path, the directory where wxWidgets libraries are installed + (returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH + or equivalent variable and wxWidgets version is $reqwx or above." + echo "$wx_error_message" >> ./CONF_INFO WXERL_CAN_BUILD_DRIVER=false if test X"$with_wx" = X"yes" ; then - as_fn_error $? "Cannot find core lib version for wxWidgets" "$LINENO" 5 + as_fn_error $? "$wx_error_message" "$LINENO" 5 else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find core lib version for wxWidgets" >&5 -printf "%s\n" "$as_me: WARNING: Cannot find core lib version for wxWidgets" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $wx_error_message" >&5 +printf "%s\n" "$as_me: WARNING: $wx_error_message" >&2;} fi - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for edge webview loader" >&5 -printf %s "checking for edge webview loader... " >&6; } - WEBVIEW_DLL=$WXDIR/3rdparty/webview2/build/native/$WX_ARCH/WebView2Loader.dll - if test -f "$WEBVIEW_DLL"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WEBVIEW_DLL" >&5 -printf "%s\n" "$WEBVIEW_DLL" >&6; } - WX_WEBVIEW_DLL=$WEBVIEW_DLL - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in $WEBVIEW_DLL" >&5 -printf "%s\n" "not found in $WEBVIEW_DLL" >&6; } - WX_WEBVIEW_DLL= fi + else + WX_CFLAGS="" + WX_CPPFLAGS="" + WX_CXXFLAGS="" + WX_LIBS="" + WX_LIBS_STATIC="" + WX_RESCOMP="" - WX_HAVE_STATIC_LIBS=true + : + fi - printf "%s\n" "#define WXE_WEBVIEW 1" >>confdefs.h - ;; -esac -fi -if test "$WXERL_CAN_BUILD_DRIVER" != "false" -then : -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxwidgets 3.0 compatibility " >&5 -printf %s "checking for wxwidgets 3.0 compatibility ... " >&6; } -ac_ext=cpp + WX_VERSION_MAJOR="$wx_config_major_version" + WX_VERSION_MINOR="$wx_config_minor_version" + WX_VERSION_MICRO="$wx_config_micro_version" + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxwidgets webview" >&5 +printf %s "checking for wxwidgets webview... " >&6; } + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -saved_CXXFLAGS=$CXXFLAGS -CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS" + saved_CXXFLAGS=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS" + saved_LIBS=$LIBS + LIBS=$WX_LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include "wx/wx.h" + #include "wx/wx.h" + #include "wx/webview.h" int main (void) { - #if wxMAJOR_VERSION > 2 && (wxMINOR_VERSION == 0 || WXWIN_COMPATIBILITY_3_0 == 1) - ; - #else - #error barf - #endif + wxWebView::New(); ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" +if ac_fn_cxx_try_link "$LINENO" then : - HAVE_COMPAT30_SUPPORT=yes + HAVE_WEBVIEW_SUPPORT=yes else case e in #( - e) HAVE_COMPAT30_SUPPORT=no ;; + e) HAVE_WEBVIEW_SUPPORT=no ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext -CXXFLAGS=$saved_CXXFLAGS -ac_ext=c + CXXFLAGS=$saved_CXXFLAGS + LIBS=$saved_LIBS + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_COMPAT30_SUPPORT" >&5 -printf "%s\n" "$HAVE_COMPAT30_SUPPORT" >&6; } - -if test X"$HAVE_COMPAT30_SUPPORT" != X"yes" ; then - echo "wxWidgets was not compiled with --enable-compat30, wx will NOT be useable" >> ./CONF_INFO - WXERL_CAN_BUILD_DRIVER=false - if test X"$with_wx" = X"yes" ; then - as_fn_error $? "wxWidgets was not compiled with --enable-compat30, wx will NOT be useable" "$LINENO" 5 - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: wxWidgets was not compiled with --enable-compat30, wx will NOT be useable" >&5 -printf "%s\n" "$as_me: WARNING: wxWidgets was not compiled with --enable-compat30, wx will NOT be useable" >&2;} - fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_WEBVIEW_SUPPORT" >&5 +printf "%s\n" "$HAVE_WEBVIEW_SUPPORT" >&6; } -fi + if test X"$HAVE_WEBVIEW_SUPPORT" != X"yes" ; then + WXELIBS=stc,xrc,html,adv,xml,core,base,gl,aui + echo "wxWidgets was not compiled with --enable-webview or wxWebView developer package is not installed, wxWebView will NOT be available" >> ./CONF_INFO + else + WXELIBS=stc,xrc,html,adv,xml,core,base,gl,aui,webview + printf "%s\n" "#define WXE_WEBVIEW 1" >>confdefs.h -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxwidgets opengl support" >&5 -printf %s "checking for wxwidgets opengl support... " >&6; } -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + fi -saved_CXXFLAGS=$CXXFLAGS -CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS" + # Try to find debug libs first -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #include "wx/wx.h" + if test x${WX_CONFIG_NAME+set} != xset ; then + WX_CONFIG_NAME=wx-config + fi -int -main (void) -{ + if test "x$wx_config_name" != x ; then + WX_CONFIG_NAME="$wx_config_name" + fi - #if wxUSE_GLCANVAS - ; - #else - #error barf - #endif + if test x$wx_config_exec_prefix != x ; then + wx_config_args="$wx_config_args --exec-prefix=$wx_config_exec_prefix" + WX_LOOKUP_PATH="$wx_config_exec_prefix/bin" + fi + if test x$wx_config_prefix != x ; then + wx_config_args="$wx_config_args --prefix=$wx_config_prefix" + WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin" + fi + if test "$cross_compiling" = "yes"; then + wx_config_args="$wx_config_args --host=$host_alias" + fi - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" + if test -x "$WX_CONFIG_NAME" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wx-config" >&5 +printf %s "checking for wx-config... " >&6; } + WX_CONFIG_PATH="$WX_CONFIG_NAME" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WX_CONFIG_PATH" >&5 +printf "%s\n" "$WX_CONFIG_PATH" >&6; } + else + # Extract the first word of "$WX_CONFIG_NAME", so it can be a program name with args. +set dummy $WX_CONFIG_NAME; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_WX_CONFIG_PATH+y} then : - HAVE_GL_SUPPORT=yes - -printf "%s\n" "#define HAVE_GL_SUPPORT 1" >>confdefs.h + printf %s "(cached) " >&6 +else case e in #( + e) case $WX_CONFIG_PATH in + [\\/]* | ?:[\\/]*) + ac_cv_path_WX_CONFIG_PATH="$WX_CONFIG_PATH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy=""$WX_LOOKUP_PATH:$PATH"" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_WX_CONFIG_PATH="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -else case e in #( - e) HAVE_GL_SUPPORT=no ;; + test -z "$ac_cv_path_WX_CONFIG_PATH" && ac_cv_path_WX_CONFIG_PATH="no" + ;; +esac ;; esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +WX_CONFIG_PATH=$ac_cv_path_WX_CONFIG_PATH +if test -n "$WX_CONFIG_PATH"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WX_CONFIG_PATH" >&5 +printf "%s\n" "$WX_CONFIG_PATH" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -CXXFLAGS=$saved_CXXFLAGS -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_GL_SUPPORT" >&5 -printf "%s\n" "$HAVE_GL_SUPPORT" >&6; } + fi + if test "$WX_CONFIG_PATH" != "no" ; then + WX_VERSION="" -if test X"$HAVE_GL_SUPPORT" != X"yes" ; then - echo "wxWidgets don't have gl support, wx will NOT be useable" >> ./CONF_INFO - WXERL_CAN_BUILD_DRIVER=false - if test X"$with_wx" = X"yes" ; then - as_fn_error $? "wxWidgets don't have gl support, wx will NOT be useable" "$LINENO" 5 + min_wx_version=$reqwx + if test -z "--unicode --debug=yes" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxWidgets version >= $min_wx_version" >&5 +printf %s "checking for wxWidgets version >= $min_wx_version... " >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: wxWidgets don't have gl support, wx will NOT be useable" >&5 -printf "%s\n" "$as_me: WARNING: wxWidgets don't have gl support, wx will NOT be useable" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxWidgets version >= $min_wx_version (--unicode --debug=yes)" >&5 +printf %s "checking for wxWidgets version >= $min_wx_version (--unicode --debug=yes)... " >&6; } fi -fi - - -ac_fn_c_check_type "$LINENO" "GLintptr" "ac_cv_type_GLintptr" "#ifdef WIN32 - # include - # include - #elif defined(HAVE_GL_GL_H) - # include - #elif defined(HAVE_OPENGL_GL_H) - # include - #endif - -" -if test "x$ac_cv_type_GLintptr" = xyes -then : - -printf "%s\n" "#define HAVE_GLINTPTR 1" >>confdefs.h - - -fi -ac_fn_c_check_type "$LINENO" "GLintptrARB" "ac_cv_type_GLintptrARB" "#ifdef WIN32 - # include - # include - #elif defined(HAVE_GL_GL_H) - # include - #elif defined(HAVE_OPENGL_GL_H) - # include - #endif - -" -if test "x$ac_cv_type_GLintptrARB" = xyes -then : - -printf "%s\n" "#define HAVE_GLINTPTRARB 1" >>confdefs.h - - -fi -ac_fn_c_check_type "$LINENO" "GLchar" "ac_cv_type_GLchar" "#ifdef WIN32 - # include - # include - #elif defined(HAVE_GL_GL_H) - # include - #elif defined(HAVE_OPENGL_GL_H) - # include - #endif - -" -if test "x$ac_cv_type_GLchar" = xyes -then : - -printf "%s\n" "#define HAVE_GLCHAR 1" >>confdefs.h + WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args --unicode --debug=yes" + WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null` + wx_config_major_version=`echo $WX_VERSION | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + wx_config_minor_version=`echo $WX_VERSION | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + wx_config_micro_version=`echo $WX_VERSION | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` -fi -ac_fn_c_check_type "$LINENO" "GLcharARB" "ac_cv_type_GLcharARB" "#ifdef WIN32 - # include - # include - #elif defined(HAVE_GL_GL_H) - # include - #elif defined(HAVE_OPENGL_GL_H) - # include - #endif + wx_requested_major_version=`echo $min_wx_version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + wx_requested_minor_version=`echo $min_wx_version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + wx_requested_micro_version=`echo $min_wx_version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` -" -if test "x$ac_cv_type_GLcharARB" = xyes -then : -printf "%s\n" "#define HAVE_GLCHARARB 1" >>confdefs.h + wx_ver_ok="" + if test "x$WX_VERSION" != x ; then + if test $wx_config_major_version -gt $wx_requested_major_version; then + wx_ver_ok=yes + else + if test $wx_config_major_version -eq $wx_requested_major_version; then + if test $wx_config_minor_version -gt $wx_requested_minor_version; then + wx_ver_ok=yes + else + if test $wx_config_minor_version -eq $wx_requested_minor_version; then + if test $wx_config_micro_version -ge $wx_requested_micro_version; then + wx_ver_ok=yes + fi + fi + fi + fi + fi + fi -fi -ac_fn_c_check_type "$LINENO" "GLhalfARB" "ac_cv_type_GLhalfARB" "#ifdef WIN32 - # include - # include - #elif defined(HAVE_GL_GL_H) - # include - #elif defined(HAVE_OPENGL_GL_H) - # include - #endif + if test -n "$wx_ver_ok"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (version $WX_VERSION)" >&5 +printf "%s\n" "yes (version $WX_VERSION)" >&6; } + WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs $WXELIBS` -" -if test "x$ac_cv_type_GLhalfARB" = xyes -then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxWidgets static library" >&5 +printf %s "checking for wxWidgets static library... " >&6; } + WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs $WXELIBS 2>/dev/null` + if test "x$WX_LIBS_STATIC" = "x"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + fi -printf "%s\n" "#define HAVE_GLHALFARB 1" >>confdefs.h + wx_has_cppflags="" + if test $wx_config_major_version -gt 2; then + wx_has_cppflags=yes + else + if test $wx_config_major_version -eq 2; then + if test $wx_config_minor_version -gt 2; then + wx_has_cppflags=yes + else + if test $wx_config_minor_version -eq 2; then + if test $wx_config_micro_version -ge 6; then + wx_has_cppflags=yes + fi + fi + fi + fi + fi + wx_has_rescomp="" + if test $wx_config_major_version -gt 2; then + wx_has_rescomp=yes + else + if test $wx_config_major_version -eq 2; then + if test $wx_config_minor_version -ge 7; then + wx_has_rescomp=yes + fi + fi + fi + if test "x$wx_has_rescomp" = x ; then + WX_RESCOMP= + else + WX_RESCOMP=`$WX_CONFIG_WITH_ARGS --rescomp` + fi -fi -ac_fn_c_check_type "$LINENO" "GLint64EXT" "ac_cv_type_GLint64EXT" "#ifdef WIN32 - # include - # include - #elif defined(HAVE_GL_GL_H) - # include - #elif defined(HAVE_OPENGL_GL_H) - # include - #endif + if test "x$wx_has_cppflags" = x ; then + WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $WXELIBS` + WX_CPPFLAGS=$WX_CFLAGS + WX_CXXFLAGS=$WX_CFLAGS -" -if test "x$ac_cv_type_GLint64EXT" = xyes -then : + WX_CFLAGS_ONLY=$WX_CFLAGS + WX_CXXFLAGS_ONLY=$WX_CFLAGS + else + WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags $WXELIBS` + WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags $WXELIBS` + WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $WXELIBS` -printf "%s\n" "#define HAVE_GLINT64EXT 1" >>confdefs.h + WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"` + WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"` + fi + wxWinWithGLDBG=1 -fi + else + if test "x$WX_VERSION" = x; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (version $WX_VERSION is not new enough)" >&5 +printf "%s\n" "no (version $WX_VERSION is not new enough)" >&6; } + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking GLU Callbacks uses Tiger Style" >&5 -printf %s "checking GLU Callbacks uses Tiger Style... " >&6; } -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + WX_CFLAGS="" + WX_CPPFLAGS="" + WX_CXXFLAGS="" + WX_LIBS="" + WX_LIBS_STATIC="" + WX_RESCOMP="" -saved_CXXFLAGS=$CXXFLAGS -CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS" + if test ! -z "--unicode --debug=yes"; then + wx_error_message=" + The configuration you asked for $PACKAGE_NAME requires a wxWidgets + build with the following settings: + --unicode --debug=yes + but such build is not available. + To see the wxWidgets builds available on this system, please use + 'wx-config --list' command. To use the default build, returned by + 'wx-config --selected-config', use the options with their 'auto' + default values." + fi + wx_error_message=" + The requested wxWidgets build couldn't be found. + $wx_error_message + If you still get this error, then check that 'wx-config' is + in path, the directory where wxWidgets libraries are installed + (returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH + or equivalent variable and wxWidgets version is $reqwx or above." + wxWinWithGLDBG=0 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + fi + else - #ifdef WIN32 - # include - # include - #elif defined(HAVE_GL_GL_H) - # include - #elif defined(HAVE_OPENGL_GL_H) - # include - #endif - #ifndef CALLBACK - # define CALLBACK - #endif - void CALLBACK foo() {}; + WX_CFLAGS="" + WX_CPPFLAGS="" + WX_CXXFLAGS="" + WX_LIBS="" + WX_LIBS_STATIC="" + WX_RESCOMP="" -int -main (void) -{ + wxWinWithGLDBG=0 - GLUtesselator* tess; - gluTessCallback(tess,GLU_TESS_VERTEX,(GLvoid (*)(...)) foo); + fi - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - TESS_CB_TIGER_STYLE=yes -printf "%s\n" "#define TESS_CB_TIGER_STYLE 1" >>confdefs.h -else case e in #( - e) TESS_CB_TIGER_STYLE=no ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TESS_CB_TIGER_STYLE" >&5 -printf "%s\n" "$TESS_CB_TIGER_STYLE" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can link wxwidgets programs" >&5 -printf %s "checking if we can link wxwidgets programs... " >&6; } -saved_LIBS=$LIBS -if test X"$WX_HAVE_STATIC_LIBS" = X"true" ; then - LIBS=$WX_LIBS_STATIC -else - LIBS=$WX_LIBS -fi -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #include "wx/wx.h" - #include "wx/stc/stc.h" - class MyApp : public wxApp - { - virtual bool OnInit() { - // Test that we have a FromUTF8 - // it isn't in too old wxWidgets versions - wxString test = wxString::FromUTF8((const char *)"foo"); - wxStyledTextCtrl * foo = new wxStyledTextCtrl(); - return foo; - }; - }; - IMPLEMENT_APP(MyApp) + WX_VERSION_MAJOR="$wx_config_major_version" + WX_VERSION_MINOR="$wx_config_minor_version" + WX_VERSION_MICRO="$wx_config_micro_version" -_ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : - CAN_LINK_WX=yes -else case e in #( - e) - CAN_LINK_WX=no - ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -CXXFLAGS=$saved_CXXFLAGS -LIBS=$saved_LIBS -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CAN_LINK_WX" >&5 -printf "%s\n" "$CAN_LINK_WX" >&6; } -if test X"$CAN_LINK_WX" != X"yes" ; then - echo "Can not link wx program are all developer packages installed?" >> ./CONF_INFO - WXERL_CAN_BUILD_DRIVER=false - if test X"$with_wx" = X"yes" ; then - as_fn_error $? "Can not link wx program are all developer packages installed?" "$LINENO" 5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for debug build of wxWidgets" >&5 +printf %s "checking for debug build of wxWidgets... " >&6; } + if test "$wxWinWithGLDBG" = 1; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; }; else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Can not link wx program are all developer packages installed?" >&5 -printf "%s\n" "$as_me: WARNING: Can not link wx program are all developer packages installed?" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; fi -fi - - -fi -LDFLAGS="$LDFLAGS$EXTRA_LDFLAGS" - + DEBUG_WX_CFLAGS=$WX_CFLAGS + DEBUG_WX_CXXFLAGS=$WX_CXXFLAGS + DEBUG_WX_LIBS=$WX_LIBS + DEBUG_WX_LIBS_STATIC=$WX_LIBS_STATIC -if test "x$GCC" = xyes -then : - # Treat certain GCC warnings as errors - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Werror=return-type to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -Werror=return-type to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -Werror=return-type $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - can_enable_flag=true -else case e in #( - e) can_enable_flag=false ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : - CFLAGS="-Werror=return-type $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac -fi + if test x${WX_CONFIG_NAME+set} != xset ; then + WX_CONFIG_NAME=wx-config + fi + if test "x$wx_config_name" != x ; then + WX_CONFIG_NAME="$wx_config_name" + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Werror=return-type to CXXFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -Werror=return-type to CXXFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -Werror=return-type $CXXFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + if test x$wx_config_exec_prefix != x ; then + wx_config_args="$wx_config_args --exec-prefix=$wx_config_exec_prefix" + WX_LOOKUP_PATH="$wx_config_exec_prefix/bin" + fi + if test x$wx_config_prefix != x ; then + wx_config_args="$wx_config_args --prefix=$wx_config_prefix" + WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin" + fi + if test "$cross_compiling" = "yes"; then + wx_config_args="$wx_config_args --host=$host_alias" + fi -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" + if test -x "$WX_CONFIG_NAME" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wx-config" >&5 +printf %s "checking for wx-config... " >&6; } + WX_CONFIG_PATH="$WX_CONFIG_NAME" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WX_CONFIG_PATH" >&5 +printf "%s\n" "$WX_CONFIG_PATH" >&6; } + else + # Extract the first word of "$WX_CONFIG_NAME", so it can be a program name with args. +set dummy $WX_CONFIG_NAME; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_WX_CONFIG_PATH+y} then : - can_enable_flag=true + printf %s "(cached) " >&6 else case e in #( - e) can_enable_flag=false ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : - - CXXFLAGS="-Werror=return-type $CXXFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + e) case $WX_CONFIG_PATH in + [\\/]* | ?:[\\/]*) + ac_cv_path_WX_CONFIG_PATH="$WX_CONFIG_PATH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy=""$WX_LOOKUP_PATH:$PATH"" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_WX_CONFIG_PATH="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; + test -z "$ac_cv_path_WX_CONFIG_PATH" && ac_cv_path_WX_CONFIG_PATH="no" + ;; +esac ;; esac +fi +WX_CONFIG_PATH=$ac_cv_path_WX_CONFIG_PATH +if test -n "$WX_CONFIG_PATH"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WX_CONFIG_PATH" >&5 +printf "%s\n" "$WX_CONFIG_PATH" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -fi + fi + if test "$WX_CONFIG_PATH" != "no" ; then + WX_VERSION="" + min_wx_version=$reqwx + if test -z "--unicode --debug=no" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxWidgets version >= $min_wx_version" >&5 +printf %s "checking for wxWidgets version >= $min_wx_version... " >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxWidgets version >= $min_wx_version (--unicode --debug=no)" >&5 +printf %s "checking for wxWidgets version >= $min_wx_version (--unicode --debug=no)... " >&6; } + fi - if test "X$host" = "Xwin32" -then : - ossf_security_hardening_default=no -else case e in #( - e) ossf_security_hardening_default=yes ;; -esac -fi - # Check whether --enable-security-hardening-flags was given. -if test ${enable_security_hardening_flags+y} -then : - enableval=$enable_security_hardening_flags; case "$enableval" in - no) ossf_security_hardening=no ;; - *) ossf_security_hardening=yes ;; - esac -else case e in #( - e) ossf_security_hardening=$ossf_security_hardening_default ;; -esac -fi + WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args --unicode --debug=no" + WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null` + wx_config_major_version=`echo $WX_VERSION | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + wx_config_minor_version=`echo $WX_VERSION | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + wx_config_micro_version=`echo $WX_VERSION | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + wx_requested_major_version=`echo $min_wx_version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + wx_requested_minor_version=`echo $min_wx_version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + wx_requested_micro_version=`echo $min_wx_version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` - if test "$ossf_security_hardening" = "yes" -then : + wx_ver_ok="" + if test "x$WX_VERSION" != x ; then + if test $wx_config_major_version -gt $wx_requested_major_version; then + wx_ver_ok=yes + else + if test $wx_config_major_version -eq $wx_requested_major_version; then + if test $wx_config_minor_version -gt $wx_requested_minor_version; then + wx_ver_ok=yes + else + if test $wx_config_minor_version -eq $wx_requested_minor_version; then + if test $wx_config_micro_version -ge $wx_requested_micro_version; then + wx_ver_ok=yes + fi + fi + fi + fi + fi + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - can_enable_flag=true -else case e in #( - e) can_enable_flag=false ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : - CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + if test -n "$wx_ver_ok"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (version $WX_VERSION)" >&5 +printf "%s\n" "yes (version $WX_VERSION)" >&6; } + WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs $WXELIBS` -else case e in #( - e) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxWidgets static library" >&5 +printf %s "checking for wxWidgets static library... " >&6; } + WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs $WXELIBS 2>/dev/null` + if test "x$WX_LIBS_STATIC" = "x"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - ;; -esac -fi + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + fi - if test "X$can_enable_flag" = "Xfalse" -then : + wx_has_cppflags="" + if test $wx_config_major_version -gt 2; then + wx_has_cppflags=yes + else + if test $wx_config_major_version -eq 2; then + if test $wx_config_minor_version -gt 2; then + wx_has_cppflags=yes + else + if test $wx_config_minor_version -eq 2; then + if test $wx_config_micro_version -ge 6; then + wx_has_cppflags=yes + fi + fi + fi + fi + fi + wx_has_rescomp="" + if test $wx_config_major_version -gt 2; then + wx_has_rescomp=yes + else + if test $wx_config_major_version -eq 2; then + if test $wx_config_minor_version -ge 7; then + wx_has_rescomp=yes + fi + fi + fi + if test "x$wx_has_rescomp" = x ; then + WX_RESCOMP= + else + WX_RESCOMP=`$WX_CONFIG_WITH_ARGS --rescomp` + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - can_enable_flag=true -else case e in #( - e) can_enable_flag=false ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : + if test "x$wx_has_cppflags" = x ; then + WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $WXELIBS` + WX_CPPFLAGS=$WX_CFLAGS + WX_CXXFLAGS=$WX_CFLAGS - CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + WX_CFLAGS_ONLY=$WX_CFLAGS + WX_CXXFLAGS_ONLY=$WX_CFLAGS + else + WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags $WXELIBS` + WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags $WXELIBS` + WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $WXELIBS` -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"` + WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"` + fi + + wxWinWithGL=1 + + else + + if test "x$WX_VERSION" = x; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - ;; -esac -fi + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (version $WX_VERSION is not new enough)" >&5 +printf "%s\n" "no (version $WX_VERSION is not new enough)" >&6; } + fi + WX_CFLAGS="" + WX_CPPFLAGS="" + WX_CXXFLAGS="" + WX_LIBS="" + WX_LIBS_STATIC="" + WX_RESCOMP="" -fi + if test ! -z "--unicode --debug=no"; then + wx_error_message=" + The configuration you asked for $PACKAGE_NAME requires a wxWidgets + build with the following settings: + --unicode --debug=no + but such build is not available. + To see the wxWidgets builds available on this system, please use + 'wx-config --list' command. To use the default build, returned by + 'wx-config --selected-config', use the options with their 'auto' + default values." + fi + wx_error_message=" + The requested wxWidgets build couldn't be found. + $wx_error_message + If you still get this error, then check that 'wx-config' is + in path, the directory where wxWidgets libraries are installed + (returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH + or equivalent variable and wxWidgets version is $reqwx or above." + wxWinWithGL=0 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-clash-protection to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -fstack-clash-protection to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fstack-clash-protection $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + fi + else + + WX_CFLAGS="" + WX_CPPFLAGS="" + WX_CXXFLAGS="" + WX_LIBS="" + WX_LIBS_STATIC="" + WX_RESCOMP="" + + wxWinWithGL=0 + + fi -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - can_enable_flag=true -else case e in #( - e) can_enable_flag=false ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : - CFLAGS="-fstack-clash-protection $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac -fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-protector-strong to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -fstack-protector-strong to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fstack-protector-strong $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - can_enable_flag=true -else case e in #( - e) can_enable_flag=false ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : - CFLAGS="-fstack-protector-strong $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac -fi - if test "X$can_enable_flag" = "Xfalse" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-protector to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -fstack-protector to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fstack-protector $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + WX_VERSION_MAJOR="$wx_config_major_version" + WX_VERSION_MINOR="$wx_config_minor_version" + WX_VERSION_MICRO="$wx_config_micro_version" -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - can_enable_flag=true -else case e in #( - e) can_enable_flag=false ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : - CFLAGS="-fstack-protector $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac -fi -else case e in #( - e) - # Some systems (solaris) also require this to be part of LDFLAGS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-protector-strong to LDFLAGS (via LDFLAGS)" >&5 -printf %s "checking if we can add -fstack-protector-strong to LDFLAGS (via LDFLAGS)... " >&6; } - saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-fstack-protector-strong; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for standard build of wxWidgets" >&5 +printf %s "checking for standard build of wxWidgets... " >&6; } + if test "$wxWinWithGL" = 1; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; }; + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; + fi -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 -then : - can_enable_flag=true -fi + if test "x$WX_LIBS_STATIC" = "x"; then + WX_HAVE_STATIC_LIBS=false + else + WX_HAVE_STATIC_LIBS=true + fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - LDFLAGS=$saved_LDFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : + wxWin=0 - LDFLAGS="$saved_LDFLAG $LDFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + if test "$wxWinWithGLDBG" = 1; then + if test "$wxWinWithGL" = 1; then + wxWin=1 + FORCED_DEBUG_BUILD=false + else + wxWin=1 + FORCED_DEBUG_BUILD=debug + WX_CFLAGS=$DEBUG_WX_CFLAGS + WX_CXXFLAGS=$DEBUG_WX_CXXFLAGS + WX_LIBS=$DEBUG_WX_LIBS + WX_LIBS_STATIC=$DEBUG_WX_LIBS_STATIC + fi + elif test "$wxWinWithGL" = 1; then + wxWin=1 + FORCED_DEBUG_BUILD=false + fi -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac -fi + RC_FILE_TYPE=o + if test "$wxWin" != 1; then + echo " + wxWidgets must be installed on your system. - ;; -esac -fi + Please check that wx-config is in path, the directory + where wxWidgets libraries are installed (returned by + 'wx-config --libs' or 'wx-config --static --libs' command) + is in LD_LIBRARY_PATH or equivalent variable and + wxWidgets version is $reqwx or above." >> ./CONF_INFO + WXERL_CAN_BUILD_DRIVER=false + if test X"$with_wx" = X"yes" ; then + as_fn_error $? " + wxWidgets must be installed on your system. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fcf-protection=full to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -fcf-protection=full to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fcf-protection=full $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + Please check that wx-config is in path, the directory + where wxWidgets libraries are installed (returned by + 'wx-config --libs' or 'wx-config --static --libs' command) + is in LD_LIBRARY_PATH or equivalent variable and + wxWidgets version is $reqwx or above." "$LINENO" 5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: + wxWidgets must be installed on your system. + + Please check that wx-config is in path, the directory + where wxWidgets libraries are installed (returned by + 'wx-config --libs' or 'wx-config --static --libs' command) + is in LD_LIBRARY_PATH or equivalent variable and + wxWidgets version is $reqwx or above." >&5 +printf "%s\n" "$as_me: WARNING: + wxWidgets must be installed on your system. + + Please check that wx-config is in path, the directory + where wxWidgets libraries are installed (returned by + 'wx-config --libs' or 'wx-config --static --libs' command) + is in LD_LIBRARY_PATH or equivalent variable and + wxWidgets version is $reqwx or above." >&2;} + fi + + fi -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - can_enable_flag=true else case e in #( - e) can_enable_flag=false ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : + e) #else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxWidgets in standard locations" >&5 +printf %s "checking for wxWidgets in standard locations... " >&6; } + echo + # Check whether --with-wxdir was given. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OptionCheck: $with_wxdir $with_wx_prefix" >&5 +printf "%s\n" "$as_me: OptionCheck: $with_wxdir $with_wx_prefix" >&6;} + + if test "${with_wxdir+set}" = set; then : + withval=$with_wxdir; CWXWIN0=$withval + else + # Check whether --with-wx-prefix was given. + if test "${with_wx_prefix+set}" = set; then : + withval=$with_wx_prefix; CWXWIN0=$withval + else + CWXWIN0="" + fi + fi + + CWXWIN_CONFIG=`win32_path.sh -u $wx_config_name 2>/dev/null` + CWXWIN1=`dirname $CWXWIN_CONFIG 2>/dev/null` + CWXWIN2=`dirname $CWXWIN1 2>/dev/null` - CFLAGS="-fcf-protection=full $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + if test -z "$PROGRAMFILES" ; then + PROGRAMFILES="c:/Program Files" + fi -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac -fi + CWXWIN_PROG=`win32_path.sh -u "$PROGRAMFILES" 2>/dev/null` + CWXWIN3="$CWXWIN_PROG/wxWidgets-3.*.* + CWXWIN4="$CWXWIN_PROG/wxMSW-3.*.* - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -mbranch-protection=standard to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -mbranch-protection=standard to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -mbranch-protection=standard $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + DOC_OPT1=/opt/local/pgm + DOC_OPT2=/mnt/c/opt/local/pgm + CWX_DOCUMENTED="$DOC_OPT1/wxWidgets-3.*.* $DOC_OPT1/wxMSW-3.*.*" + CWX_DOCUMENTED="$DOC_OPT2/wxWidgets-3.*.* $DOC_OPT2/wxMSW-3.*.* $CWX_DOCUMENTED" -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - can_enable_flag=true -else case e in #( - e) can_enable_flag=false ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : + case $ac_cv_sizeof_void_p in + 8) + case $host_cpu in + aarch64) + VC_LIB=lib/vc_arm64_lib + WX_ARCH=aarch64 + ;; + *) + VC_LIB=lib/vc_x64_lib + WX_ARCH=x64 + ;; + esac + DOC_OPT64_1=/opt/local64/pgm + DOC_OPT64_2=/mnt/c/opt/local64/pgm + CWX_DOCUMENTED="$DOC_OPT64_1/wxWidgets-3.*.* $DOC_OPT64_1/wxMSW-3.*.* $CWX_DOCUMENTED" + CWX_DOCUMENTED="$DOC_OPT64_2/wxWidgets-3.*.* $DOC_OPT64_2/wxMSW-3.*.* $CWX_DOCUMENTED" + ;; + *) + VC_LIB=lib/vc_lib + WX_ARCH=x86 + DOC_OPT3=/opt/local32/pgm + DOC_OPT4=/mnt/c/opt/local32/pgm + CWX_DOCUMENTED="$DOC_OPT3/wxWidgets-3.*.* $DOC_OPT3/wxMSW-3.*.* $CWX_DOCUMENTED" + CWX_DOCUMENTED="$DOC_OPT4/wxWidgets-3.*.* $DOC_OPT4/wxMSW-3.*.* $CWX_DOCUMENTED" + ;; + esac - CFLAGS="-mbranch-protection=standard $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + CWXPATH="$CWXWIN0 $CWXWIN1 $CWXWIN2 $CWX_DOCUMENTED $CWXWIN3 $CWXWIN4" -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac -fi + for dir in $CWXPATH; do + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Checking: $dir" >&5 +printf "%s\n" "$as_me: Checking: $dir" >&6;} + if test -f $dir/include/wx/wx.h; then + WXINCLUDE_MSVC=$dir/include/msvc + WXINCLUDE_PLAIN=$dir/include + WX_CFLAGS="-EHsc -D_UNICODE -DUNICODE -I$WXINCLUDE_MSVC -I$WXINCLUDE_PLAIN -D__WXMSW__" + WX_CXXFLAGS="-TP $WX_CFLAGS" + WX_LIBDIR=$dir/$VC_LIB + WX_RESCOMP="rc.sh -I$WXINCLUDE_PLAIN -D __WIN32__" + RC_FILE_TYPE=res + base=`ls $WX_LIBDIR/wxbase*.lib 2> /dev/null | egrep 'wxbase[0-9]*u\.lib'` + corelib_number=`echo $base | sed 's,.*\([0-9].\)u\.lib,\1,'` + if test '!' -z "$corelib_number"; then + WXLIBNO=$corelib_number + WX_LIBS0="wxmsw${WXLIBNO}u_stc wxmsw${WXLIBNO}u_xrc wxmsw${WXLIBNO}u_html" + WX_LIBS1="wxmsw${WXLIBNO}u_adv wxbase${WXLIBNO}u_xml wxmsw${WXLIBNO}u_core" + WX_LIBS2="wxbase${WXLIBNO}u wxmsw${WXLIBNO}u_gl wxmsw${WXLIBNO}u_aui" + WX_LIBS3="wxregexu wxexpat wxtiff wxjpeg wxpng wxzlib" + WX_SYSLIBS="winspool winmm oleaut32 ole32 gdiplus" + WX_LIBS_STATIC="-L$WX_LIBDIR" + for lib in $WX_LIBS0 $WX_LIBS1 $WX_LIBS2 $WX_LIBS3 $WX_SYSLIBS; do + WX_LIBS_STATIC="$WX_LIBS_STATIC -l$lib" + done + WXDIR=$dir + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found: $dir" >&5 +printf "%s\n" "Found: $dir" >&6; } + break + fi + fi + done + if test -z "$WX_LIBS_STATIC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +printf "%s\n" "failed" >&6; } + echo "Cannot find core lib version for wxWidgets" >> ./CONF_INFO + WXERL_CAN_BUILD_DRIVER=false + if test X"$with_wx" = X"yes" ; then + as_fn_error $? "Cannot find core lib version for wxWidgets" "$LINENO" 5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find core lib version for wxWidgets" >&5 +printf "%s\n" "$as_me: WARNING: Cannot find core lib version for wxWidgets" >&2;} + fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fexceptions to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -fexceptions to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fexceptions $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + fi -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - can_enable_flag=true -else case e in #( - e) can_enable_flag=false ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for edge webview loader" >&5 +printf %s "checking for edge webview loader... " >&6; } + WEBVIEW_DLL=$WXDIR/3rdparty/webview2/build/native/$WX_ARCH/WebView2Loader.dll + if test -f "$WEBVIEW_DLL"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WEBVIEW_DLL" >&5 +printf "%s\n" "$WEBVIEW_DLL" >&6; } + WX_WEBVIEW_DLL=$WEBVIEW_DLL + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in $WEBVIEW_DLL" >&5 +printf "%s\n" "not found in $WEBVIEW_DLL" >&6; } + WX_WEBVIEW_DLL= + fi - CFLAGS="-fexceptions $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac -fi + WX_HAVE_STATIC_LIBS=true - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-strict-overflow to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -fno-strict-overflow to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fno-strict-overflow $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - can_enable_flag=true -else case e in #( - e) can_enable_flag=false ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : - CFLAGS="-fno-strict-overflow $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + printf "%s\n" "#define WXE_WEBVIEW 1" >>confdefs.h -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; + ;; esac fi +if test "$WXERL_CAN_BUILD_DRIVER" != "false" +then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-delete-null-pointer-checks to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -fno-delete-null-pointer-checks to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fno-delete-null-pointer-checks $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - can_enable_flag=true -else case e in #( - e) can_enable_flag=false ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : - CFLAGS="-fno-delete-null-pointer-checks $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac -fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxwidgets 3.0 compatibility " >&5 +printf %s "checking for wxwidgets 3.0 compatibility ... " >&6; } +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +saved_CXXFLAGS=$CXXFLAGS +CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-strict-aliasing to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -fno-strict-aliasing to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fno-strict-aliasing $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include "wx/wx.h" + int main (void) { -return 0; + + #if wxMAJOR_VERSION > 2 && (wxMINOR_VERSION == 0 || WXWIN_COMPATIBILITY_3_0 == 1) + ; + #else + #error barf + #endif + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_cxx_try_compile "$LINENO" then : - can_enable_flag=true + HAVE_COMPAT30_SUPPORT=yes else case e in #( - e) can_enable_flag=false ;; + e) HAVE_COMPAT30_SUPPORT=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : - CFLAGS="-fno-strict-aliasing $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +CXXFLAGS=$saved_CXXFLAGS +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_COMPAT30_SUPPORT" >&5 +printf "%s\n" "$HAVE_COMPAT30_SUPPORT" >&6; } + +if test X"$HAVE_COMPAT30_SUPPORT" != X"yes" ; then + echo "wxWidgets was not compiled with --enable-compat30, wx will NOT be useable" >> ./CONF_INFO + WXERL_CAN_BUILD_DRIVER=false + if test X"$with_wx" = X"yes" ; then + as_fn_error $? "wxWidgets was not compiled with --enable-compat30, wx will NOT be useable" "$LINENO" 5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: wxWidgets was not compiled with --enable-compat30, wx will NOT be useable" >&5 +printf "%s\n" "$as_me: WARNING: wxWidgets was not compiled with --enable-compat30, wx will NOT be useable" >&2;} + fi -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wxwidgets opengl support" >&5 +printf %s "checking for wxwidgets opengl support... " >&6; } +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -ftrivial-auto-var-init=zero to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -ftrivial-auto-var-init=zero to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -ftrivial-auto-var-init=zero $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +saved_CXXFLAGS=$CXXFLAGS +CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS" + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include "wx/wx.h" + int main (void) { -return 0; + + #if wxUSE_GLCANVAS + ; + #else + #error barf + #endif + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_cxx_try_compile "$LINENO" then : - can_enable_flag=true + HAVE_GL_SUPPORT=yes + +printf "%s\n" "#define HAVE_GL_SUPPORT 1" >>confdefs.h + else case e in #( - e) can_enable_flag=false ;; + e) HAVE_GL_SUPPORT=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : - CFLAGS="-ftrivial-auto-var-init=zero $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +CXXFLAGS=$saved_CXXFLAGS +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_GL_SUPPORT" >&5 +printf "%s\n" "$HAVE_GL_SUPPORT" >&6; } + + +if test X"$HAVE_GL_SUPPORT" != X"yes" ; then + echo "wxWidgets don't have gl support, wx will NOT be useable" >> ./CONF_INFO + WXERL_CAN_BUILD_DRIVER=false + if test X"$with_wx" = X"yes" ; then + as_fn_error $? "wxWidgets don't have gl support, wx will NOT be useable" "$LINENO" 5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: wxWidgets don't have gl support, wx will NOT be useable" >&5 +printf "%s\n" "$as_me: WARNING: wxWidgets don't have gl support, wx will NOT be useable" >&2;} + fi -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstrict-flex-arrays=3 to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -fstrict-flex-arrays=3 to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fstrict-flex-arrays=3 $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +ac_fn_c_check_type "$LINENO" "GLintptr" "ac_cv_type_GLintptr" "#ifdef WIN32 + # include + # include + #elif defined(HAVE_GL_GL_H) + # include + #elif defined(HAVE_OPENGL_GL_H) + # include + #endif -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" +" +if test "x$ac_cv_type_GLintptr" = xyes then : - can_enable_flag=true -else case e in #( - e) can_enable_flag=false ;; -esac + +printf "%s\n" "#define HAVE_GLINTPTR 1" >>confdefs.h + + fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" +ac_fn_c_check_type "$LINENO" "GLintptrARB" "ac_cv_type_GLintptrARB" "#ifdef WIN32 + # include + # include + #elif defined(HAVE_GL_GL_H) + # include + #elif defined(HAVE_OPENGL_GL_H) + # include + #endif + +" +if test "x$ac_cv_type_GLintptrARB" = xyes then : - CFLAGS="-fstrict-flex-arrays=3 $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +printf "%s\n" "#define HAVE_GLINTPTRARB 1" >>confdefs.h + -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac fi +ac_fn_c_check_type "$LINENO" "GLchar" "ac_cv_type_GLchar" "#ifdef WIN32 + # include + # include + #elif defined(HAVE_GL_GL_H) + # include + #elif defined(HAVE_OPENGL_GL_H) + # include + #endif - if test "X$can_enable_flag" = "Xfalse" +" +if test "x$ac_cv_type_GLchar" = xyes then : +printf "%s\n" "#define HAVE_GLCHAR 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstrict-flex-arrays=2 to CFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -fstrict-flex-arrays=2 to CFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -fstrict-flex-arrays=2 $CFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - can_enable_flag=true -else case e in #( - e) can_enable_flag=false ;; -esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" +ac_fn_c_check_type "$LINENO" "GLcharARB" "ac_cv_type_GLcharARB" "#ifdef WIN32 + # include + # include + #elif defined(HAVE_GL_GL_H) + # include + #elif defined(HAVE_OPENGL_GL_H) + # include + #endif + +" +if test "x$ac_cv_type_GLcharARB" = xyes then : - CFLAGS="-fstrict-flex-arrays=2 $CFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +printf "%s\n" "#define HAVE_GLCHARARB 1" >>confdefs.h + -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac fi +ac_fn_c_check_type "$LINENO" "GLhalfARB" "ac_cv_type_GLhalfARB" "#ifdef WIN32 + # include + # include + #elif defined(HAVE_GL_GL_H) + # include + #elif defined(HAVE_OPENGL_GL_H) + # include + #endif + +" +if test "x$ac_cv_type_GLhalfARB" = xyes +then : +printf "%s\n" "#define HAVE_GLHALFARB 1" >>confdefs.h + + +fi +ac_fn_c_check_type "$LINENO" "GLint64EXT" "ac_cv_type_GLint64EXT" "#ifdef WIN32 + # include + # include + #elif defined(HAVE_GL_GL_H) + # include + #elif defined(HAVE_OPENGL_GL_H) + # include + #endif -else case e in #( - e) if test "X$can_enable_flag" != "Xtrue" +" +if test "x$ac_cv_type_GLint64EXT" = xyes then : - exit 1 -fi - ;; -esac -fi + +printf "%s\n" "#define HAVE_GLINT64EXT 1" >>confdefs.h + fi - if test "$ossf_security_hardening" = "yes" -then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking GLU Callbacks uses Tiger Style" >&5 +printf %s "checking GLU Callbacks uses Tiger Style... " >&6; } +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +saved_CXXFLAGS=$CXXFLAGS +CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -D_GLIBCXX_ASSERTIONS to CXXFLAGS (via CFLAGS)" >&5 -printf %s "checking if we can add -D_GLIBCXX_ASSERTIONS to CXXFLAGS (via CFLAGS)... " >&6; } - saved_CFLAGS=$CFLAGS; - CFLAGS="-Werror -D_GLIBCXX_ASSERTIONS $CXXFLAGS"; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #ifdef WIN32 + # include + # include + #elif defined(HAVE_GL_GL_H) + # include + #elif defined(HAVE_OPENGL_GL_H) + # include + #endif + #ifndef CALLBACK + # define CALLBACK + #endif + void CALLBACK foo() {}; + int main (void) { -return 0; + + GLUtesselator* tess; + gluTessCallback(tess,GLU_TESS_VERTEX,(GLvoid (*)(...)) foo); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_cxx_try_compile "$LINENO" then : - can_enable_flag=true + TESS_CB_TIGER_STYLE=yes + +printf "%s\n" "#define TESS_CB_TIGER_STYLE 1" >>confdefs.h + else case e in #( - e) can_enable_flag=false ;; + e) TESS_CB_TIGER_STYLE=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$saved_CFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TESS_CB_TIGER_STYLE" >&5 +printf "%s\n" "$TESS_CB_TIGER_STYLE" >&6; } - CXXFLAGS="-D_GLIBCXX_ASSERTIONS $CXXFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac -fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can link wxwidgets programs" >&5 +printf %s "checking if we can link wxwidgets programs... " >&6; } +saved_LIBS=$LIBS +if test X"$WX_HAVE_STATIC_LIBS" = X"true" ; then + LIBS=$WX_LIBS_STATIC +else + LIBS=$WX_LIBS fi +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - if test "$ossf_security_hardening" = "yes" -then : + #include "wx/wx.h" + #include "wx/stc/stc.h" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,noexecstack to LDFLAGS (via LDFLAGS)" >&5 -printf %s "checking if we can add -Wl,-z,noexecstack to LDFLAGS (via LDFLAGS)... " >&6; } - saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,noexecstack; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + class MyApp : public wxApp + { + virtual bool OnInit() { + // Test that we have a FromUTF8 + // it isn't in too old wxWidgets versions + wxString test = wxString::FromUTF8((const char *)"foo"); + wxStyledTextCtrl * foo = new wxStyledTextCtrl(); + return foo; + }; + }; + IMPLEMENT_APP(MyApp) -int -main (void) -{ -return 0; - ; - return 0; -} _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 -then : - can_enable_flag=true -fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - LDFLAGS=$saved_LDFLAGS; - if test "X$can_enable_flag" = "Xtrue" +if ac_fn_cxx_try_link "$LINENO" then : - LDFLAGS="$saved_LDFLAG $LDFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + CAN_LINK_WX=yes else case e in #( e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; + CAN_LINK_WX=no + ;; esac fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +CXXFLAGS=$saved_CXXFLAGS +LIBS=$saved_LIBS +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,relro to LDFLAGS (via LDFLAGS)" >&5 -printf %s "checking if we can add -Wl,-z,relro to LDFLAGS (via LDFLAGS)... " >&6; } - saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,relro; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CAN_LINK_WX" >&5 +printf "%s\n" "$CAN_LINK_WX" >&6; } -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 -then : - can_enable_flag=true -fi +if test X"$CAN_LINK_WX" != X"yes" ; then + echo "Can not link wx program are all developer packages installed?" >> ./CONF_INFO + WXERL_CAN_BUILD_DRIVER=false + if test X"$with_wx" = X"yes" ; then + as_fn_error $? "Can not link wx program are all developer packages installed?" "$LINENO" 5 + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Can not link wx program are all developer packages installed?" >&5 +printf "%s\n" "$as_me: WARNING: Can not link wx program are all developer packages installed?" >&2;} + fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - LDFLAGS=$saved_LDFLAGS; - if test "X$can_enable_flag" = "Xtrue" -then : - LDFLAGS="$saved_LDFLAG $LDFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac fi +LDFLAGS="$LDFLAGS$EXTRA_LDFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,now to LDFLAGS (via LDFLAGS)" >&5 -printf %s "checking if we can add -Wl,-z,now to LDFLAGS (via LDFLAGS)... " >&6; } - saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,now; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 -then : - can_enable_flag=true -fi -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - LDFLAGS=$saved_LDFLAGS; - if test "X$can_enable_flag" = "Xtrue" +if test "x$GCC" = xyes then : - LDFLAGS="$saved_LDFLAG $LDFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -else case e in #( - e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - ;; -esac -fi - + # Treat certain GCC warnings as errors - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,--as-needed to LDFLAGS (via LDFLAGS)" >&5 -printf %s "checking if we can add -Wl,--as-needed to LDFLAGS (via LDFLAGS)... " >&6; } - saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,--as-needed; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Werror=return-type to CFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -Werror=return-type to CFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -Werror=return-type $CFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8209,19 +8417,18 @@ return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 then : can_enable_flag=true -fi - +else case e in #( + e) can_enable_flag=false ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - LDFLAGS=$saved_LDFLAGS; + CFLAGS=$saved_CFLAGS; if test "X$can_enable_flag" = "Xtrue" then : - LDFLAGS="$saved_LDFLAG $LDFLAGS" + CFLAGS="-Werror=return-type $CFLAGS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } @@ -8234,12 +8441,10 @@ esac fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,--no-copy-dt-needed-entries to LDFLAGS (via LDFLAGS)" >&5 -printf %s "checking if we can add -Wl,--no-copy-dt-needed-entries to LDFLAGS (via LDFLAGS)... " >&6; } - saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,--no-copy-dt-needed-entries; - LDFLAGS="-Werror $saved_LDFLAG $LDFLAGS"; - can_enable_flag=false; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Werror=return-type to CXXFLAGS (via CFLAGS)" >&5 +printf %s "checking if we can add -Werror=return-type to CXXFLAGS (via CFLAGS)... " >&6; } + saved_CFLAGS=$CFLAGS; + CFLAGS="-Werror -Werror=return-type $CXXFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8252,19 +8457,18 @@ return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 then : can_enable_flag=true -fi - +else case e in #( + e) can_enable_flag=false ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - LDFLAGS=$saved_LDFLAGS; + CFLAGS=$saved_CFLAGS; if test "X$can_enable_flag" = "Xtrue" then : - LDFLAGS="$saved_LDFLAG $LDFLAGS" + CXXFLAGS="-Werror=return-type $CXXFLAGS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } @@ -8279,8 +8483,6 @@ fi fi - - ############################################################################# diff --git a/make/configure b/make/configure index ef4090889fb0..6961df7c9102 100755 --- a/make/configure +++ b/make/configure @@ -5039,9 +5039,57 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +for ac_prog in ld.sh +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_LD+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$LD"; then + ac_cv_prog_LD="$LD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_LD="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi ;; +esac +fi +LD=$ac_cv_prog_LD +if test -n "$LD"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +printf "%s\n" "$LD" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$LD" && break +done + if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args. -set dummy ${ac_tool_prefix}ld; ac_word=$2 + # Extract the first word of "${ac_tool_prefix}${CC}", so it can be a program name with args. +set dummy ${ac_tool_prefix}${CC}; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_LD+y} @@ -5062,7 +5110,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_LD="${ac_tool_prefix}ld" + ac_cv_prog_LD="${ac_tool_prefix}${CC}" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5086,8 +5134,8 @@ fi fi if test -z "$ac_cv_prog_LD"; then ac_ct_LD=$LD - # Extract the first word of "ld", so it can be a program name with args. -set dummy ld; ac_word=$2 + # Extract the first word of "${CC}", so it can be a program name with args. +set dummy ${CC}; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_LD+y} @@ -5108,7 +5156,7 @@ do esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_LD="ld" + ac_cv_prog_ac_ct_LD="${CC}" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5129,7 +5177,7 @@ printf "%s\n" "no" >&6; } fi if test "x$ac_ct_LD" = x; then - LD="" + LD="'$(CC)'" else case $cross_compiling:$ac_tool_warned in yes:) @@ -6971,12 +7019,10 @@ if test "x$DED_LD" = "x"; then DED_LD_FLAG_RUNTIME_LIBRARY_PATH="-R" case $host_os in win32) - DED_LD="ld.sh" DED_LDFLAGS="-dll" DED_LD_FLAG_RUNTIME_LIBRARY_PATH= ;; solaris2*|sysv4*) - DED_LD="$CC" DED_LDFLAGS="-G" if test X${enable_m64_build} = Xyes; then DED_LDFLAGS="-64 $DED_LDFLAGS" @@ -6992,8 +7038,6 @@ if test "x$DED_LD" = "x"; then darwin*) # Mach-O linker: a shared lib and a loadable object file is not the same thing. - DED_LD="$CC" - if test "X${ERL_DED_FLAT_BUNDLE}" = "Xtrue"; then # EI sets this variable when building its .so file as beam.smp # has not been built yet and any ei lib will not @@ -7060,7 +7104,6 @@ printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH" ;; linux*) - DED_LD="$CC" DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH" DED_LDFLAGS="-shared -Wl,-Bsymbolic" if test X${enable_m64_build} = Xyes; then @@ -7071,7 +7114,6 @@ printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h fi ;; freebsd*) - DED_LD="$CC" DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH" DED_LDFLAGS="-shared" if test X${enable_m64_build} = Xyes; then @@ -7082,7 +7124,6 @@ printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h fi ;; openbsd*) - DED_LD="$CC" DED_LD_FLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH" DED_LDFLAGS="-shared" ;; @@ -7214,8 +7255,6 @@ fi test "$DED_LD" != "false" || as_fn_error $? "No linker found" "$LINENO" 5 -saved_LD="$LD" -LD="${DED_LD:-$LD}"" if test "X$host" = "Xwin32" then : @@ -7457,9 +7496,8 @@ else case e in #( { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fstack-protector-strong to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -fstack-protector-strong to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-fstack-protector-strong; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-fstack-protector-strong"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7471,15 +7509,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -7884,9 +7923,8 @@ then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,noexecstack to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,-z,noexecstack to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,noexecstack; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,-z,noexecstack"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7898,15 +7936,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -7927,9 +7966,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,relro to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,-z,relro to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,relro; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,-z,relro"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7941,15 +7979,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -7970,9 +8009,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,-z,now to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,-z,now to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,-z,now; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,-z,now"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7984,15 +8022,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -8013,9 +8052,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,--as-needed to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,--as-needed to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,--as-needed; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,--as-needed"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8027,15 +8065,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -8056,9 +8095,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Wl,--no-copy-dt-needed-entries to DED_LDFLAGS (via LDFLAGS)" >&5 printf %s "checking if we can add -Wl,--no-copy-dt-needed-entries to DED_LDFLAGS (via LDFLAGS)... " >&6; } saved_LDFLAGS=$LDFLAGS; - saved_LDFLAG=-Wl,--no-copy-dt-needed-entries; - LDFLAGS="-Werror $saved_LDFLAG $DED_LDFLAGS"; - can_enable_flag=false; + saved_LDFLAG="-Wl,--no-copy-dt-needed-entries"; + LDFLAGS="$saved_LDFLAG $DED_LDFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8070,15 +8108,16 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if $LD -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$OBJEXT $LIBS >&5 +if ac_fn_c_try_link "$LINENO" then : can_enable_flag=true +else case e in #( + e) can_enable_flag=false + ;; +esac fi - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$saved_LDFLAGS; if test "X$can_enable_flag" = "Xtrue" then : @@ -8098,7 +8137,6 @@ fi fi -LD="$saved_LD" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for static compiler flags" >&5 printf %s "checking for static compiler flags... " >&6; }