diff --git a/Makefile b/Makefile index 296b42b..e08ecd1 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,11 @@ VERSION=1.6 CC=gcc -LIBS= libUseful-4/libUseful.a +LIBS= -lcrypto -lssl -lUseful-5 FLAGS=-g -O2 -DVERSION=\"$(VERSION)\" OBJ=common.o net.o netdev.o runcommand.o iw.o wireless_tools.o wpa_supplicant.o wifi.o interactive.o settings.o help.o -all: $(OBJ) libUseful-4/libUseful.a +all: $(OBJ) $(CC) $(FLAGS) -oterm_wifi $(OBJ) main.c $(LIBS) libUseful-4/libUseful.a: diff --git a/Makefile.in b/Makefile.in index 3c3bacb..9f2e1ba 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,11 +1,11 @@ VERSION=1.6 CC=@CC@ -LIBS=@LDFLAGS@ @LIBS@ @STATIC_LIBS@ +LIBS=@LDFLAGS@ @LIBS@ @LIBUSEFUL_BUNDLED@ FLAGS=@CFLAGS@ -DVERSION=\"$(VERSION)\" OBJ=common.o net.o netdev.o runcommand.o iw.o wireless_tools.o wpa_supplicant.o wifi.o interactive.o settings.o help.o -all: $(OBJ) @STATIC_LIBS@ +all: $(OBJ) @LIBUSEFUL_BUNDLED@ $(CC) $(FLAGS) -oterm_wifi $(OBJ) main.c $(LIBS) libUseful-4/libUseful.a: diff --git a/autom4te.cache/output.0 b/autom4te.cache/output.0 index 354c4dd..9fc0d2d 100644 --- a/autom4te.cache/output.0 +++ b/autom4te.cache/output.0 @@ -583,11 +583,47 @@ PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="main.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + enable_option_checking=no ac_subst_vars='LTLIBOBJS LIB@&t@OBJS subdirs -STATIC_LIBS +LIBUSEFUL_BUNDLED EGREP GREP CPP @@ -641,7 +677,7 @@ ac_subst_files='' ac_user_opts=' enable_option_checking enable_largefile -with_system_libuseful +with_libuseful ' ac_precious_vars='build_alias host_alias @@ -1264,7 +1300,7 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-system-libuseful use systemwide libUseful.so rather than bundled version + --with-libuseful use system-wide libUseful (default=auto) Some influential environment variables: CC C compiler command @@ -1518,6 +1554,124 @@ fi as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_link + +@%:@ ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +@%:@ ------------------------------------------------------- +@%:@ Tests whether HEADER exists, giving a warning if it cannot be compiled using +@%:@ the include files in INCLUDES and setting the cache variable VAR +@%:@ accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +@%:@include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +@%:@include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} @%:@ ac_fn_c_check_header_mongrel + +@%:@ ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +@%:@ ------------------------------------------------------- +@%:@ Tests whether HEADER exists and can be compiled using the include files in +@%:@ INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +@%:@include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} @%:@ ac_fn_c_check_header_compile cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -3280,21 +3434,159 @@ fi -@%:@ Check whether --with-system-libuseful was given. -if test "${with_system_libuseful+set}" = set; then : - withval=$with_system_libuseful; cf_with_libuseful=$withval + +@%:@ Check whether --with-libuseful was given. +if test "${with_libuseful+set}" = set; then : + withval=$with_libuseful; cf_system_libuseful=$withval +fi + + +if test "$cf_system_libuseful" != "no" +then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GetToken in -lUseful-5" >&5 +$as_echo_n "checking for GetToken in -lUseful-5... " >&6; } +if ${ac_cv_lib_Useful_5_GetToken+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lUseful-5 $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. */ +#ifdef __cplusplus +extern "C" +#endif +char GetToken (); +int +main () +{ +return GetToken (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Useful_5_GetToken=yes +else + ac_cv_lib_Useful_5_GetToken=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Useful_5_GetToken" >&5 +$as_echo "$ac_cv_lib_Useful_5_GetToken" >&6; } +if test "x$ac_cv_lib_Useful_5_GetToken" = xyes; then : + cf_have_libUseful5=yes +else + cf_have_libUseful5=no +fi + + if test "$cf_have_libUseful5" = "yes" + then + # On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +@%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in libUseful-5/libUseful.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libUseful-5/libUseful.h" "ac_cv_header_libUseful_5_libUseful_h" "$ac_includes_default" +if test "x$ac_cv_header_libUseful_5_libUseful_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_LIBUSEFUL_5_LIBUSEFUL_H 1 +_ACEOF + +fi + +done + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GetToken in -lUseful-4" >&5 +$as_echo_n "checking for GetToken in -lUseful-4... " >&6; } +if ${ac_cv_lib_Useful_4_GetToken+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lUseful-4 $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. */ +#ifdef __cplusplus +extern "C" +#endif +char GetToken (); +int +main () +{ +return GetToken (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Useful_4_GetToken=yes +else + ac_cv_lib_Useful_4_GetToken=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Useful_4_GetToken" >&5 +$as_echo "$ac_cv_lib_Useful_4_GetToken" >&6; } +if test "x$ac_cv_lib_Useful_4_GetToken" = xyes; then : + cf_have_libUseful4=yes +else + cf_have_libUseful4=no +fi + + for ac_header in libUseful-4/libUseful.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libUseful-4/libUseful.h" "ac_cv_header_libUseful_4_libUseful_h" "$ac_includes_default" +if test "x$ac_cv_header_libUseful_4_libUseful_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_LIBUSEFUL_4_LIBUSEFUL_H 1 +_ACEOF + fi +done + + fi +fi -if test "$cf_with_libuseful" != "no" -a "$cf_with_libuseful" != "" +if test "$cf_have_libUseful5" = "yes" then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSLVerifyCallback in -lUseful" >&5 -$as_echo_n "checking for OpenSSLVerifyCallback in -lUseful... " >&6; } -if ${ac_cv_lib_Useful_OpenSSLVerifyCallback+:} false; then : + echo "installed libUseful-5 found, using that instead of bundled libUseful." + echo "if you want to use bundled libUseful, force it with --with-libuseful=no" + LIBUSEFUL_BUNDLED="" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GetToken in -lUseful-5" >&5 +$as_echo_n "checking for GetToken in -lUseful-5... " >&6; } +if ${ac_cv_lib_Useful_5_GetToken+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lUseful -lssl -lcrypto -lz $LIBS" +LIBS="-lUseful-5 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3304,34 +3596,43 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char OpenSSLVerifyCallback (); +char GetToken (); int main () { -return OpenSSLVerifyCallback (); +return GetToken (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Useful_OpenSSLVerifyCallback=yes + ac_cv_lib_Useful_5_GetToken=yes else - ac_cv_lib_Useful_OpenSSLVerifyCallback=no + ac_cv_lib_Useful_5_GetToken=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Useful_OpenSSLVerifyCallback" >&5 -$as_echo "$ac_cv_lib_Useful_OpenSSLVerifyCallback" >&6; } -if test "x$ac_cv_lib_Useful_OpenSSLVerifyCallback" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5 -$as_echo_n "checking for SSL_new in -lssl... " >&6; } -if ${ac_cv_lib_ssl_SSL_new+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Useful_5_GetToken" >&5 +$as_echo "$ac_cv_lib_Useful_5_GetToken" >&6; } +if test "x$ac_cv_lib_Useful_5_GetToken" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_LIBUSEFUL_5 1 +_ACEOF + + LIBS="-lUseful-5 $LIBS" + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5 +$as_echo_n "checking for SSL_library_init in -lssl... " >&6; } +if ${ac_cv_lib_ssl_SSL_library_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lssl -lcrypto -lz $LIBS" +LIBS="-lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3341,27 +3642,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char SSL_new (); +char SSL_library_init (); int main () { -return SSL_new (); +return SSL_library_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ssl_SSL_new=yes + ac_cv_lib_ssl_SSL_library_init=yes else - ac_cv_lib_ssl_SSL_new=no + ac_cv_lib_ssl_SSL_library_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5 -$as_echo "$ac_cv_lib_ssl_SSL_new" >&6; } -if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5 +$as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; } +if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBSSL 1 _ACEOF @@ -3370,13 +3671,13 @@ _ACEOF fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ERR_load_CRYPTO_strings in -lcrypto" >&5 -$as_echo_n "checking for ERR_load_CRYPTO_strings in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_ERR_load_CRYPTO_strings+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_CIPHER_CTX_init in -lcrypto" >&5 +$as_echo_n "checking for EVP_CIPHER_CTX_init in -lcrypto... " >&6; } +if ${ac_cv_lib_crypto_EVP_CIPHER_CTX_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lcrypto -lz $LIBS" +LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3386,27 +3687,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char ERR_load_CRYPTO_strings (); +char EVP_CIPHER_CTX_init (); int main () { -return ERR_load_CRYPTO_strings (); +return EVP_CIPHER_CTX_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_crypto_ERR_load_CRYPTO_strings=yes + ac_cv_lib_crypto_EVP_CIPHER_CTX_init=yes else - ac_cv_lib_crypto_ERR_load_CRYPTO_strings=no + ac_cv_lib_crypto_EVP_CIPHER_CTX_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_ERR_load_CRYPTO_strings" >&5 -$as_echo "$ac_cv_lib_crypto_ERR_load_CRYPTO_strings" >&6; } -if test "x$ac_cv_lib_crypto_ERR_load_CRYPTO_strings" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_CIPHER_CTX_init" >&5 +$as_echo "$ac_cv_lib_crypto_EVP_CIPHER_CTX_init" >&6; } +if test "x$ac_cv_lib_crypto_EVP_CIPHER_CTX_init" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBCRYPTO 1 _ACEOF @@ -3415,13 +3716,19 @@ _ACEOF fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5 -$as_echo_n "checking for inflate in -lz... " >&6; } -if ${ac_cv_lib_z_inflate+:} false; then : +elif test "$cf_have_libUseful4" = "yes" +then + echo "installed libUseful-4 found, using that instead of bundled libUseful." + echo "if you want to use bundled libUseful, force it with --with-libuseful=no" + LIBUSEFUL_BUNDLED="" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GetToken in -lUseful-4" >&5 +$as_echo_n "checking for GetToken in -lUseful-4... " >&6; } +if ${ac_cv_lib_Useful_4_GetToken+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" +LIBS="-lUseful-4 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3431,45 +3738,88 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char inflate (); +char GetToken (); int main () { -return inflate (); +return GetToken (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_z_inflate=yes + ac_cv_lib_Useful_4_GetToken=yes else - ac_cv_lib_z_inflate=no + ac_cv_lib_Useful_4_GetToken=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5 -$as_echo "$ac_cv_lib_z_inflate" >&6; } -if test "x$ac_cv_lib_z_inflate" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Useful_4_GetToken" >&5 +$as_echo "$ac_cv_lib_Useful_4_GetToken" >&6; } +if test "x$ac_cv_lib_Useful_4_GetToken" = xyes; then : cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LIBZ 1 +@%:@define HAVE_LIBUSEFUL_4 1 _ACEOF - LIBS="-lz $LIBS" + LIBS="-lUseful-4 $LIBS" fi - + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5 +$as_echo_n "checking for SSL_library_init in -lssl... " >&6; } +if ${ac_cv_lib_ssl_SSL_library_init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lssl $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. */ +#ifdef __cplusplus +extern "C" +#endif +char SSL_library_init (); +int +main () +{ +return SSL_library_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ssl_SSL_library_init=yes +else + ac_cv_lib_ssl_SSL_library_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5 +$as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; } +if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_LIBSSL 1 +_ACEOF + + LIBS="-lssl $LIBS" + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GetToken in -lUseful" >&5 -$as_echo_n "checking for GetToken in -lUseful... " >&6; } -if ${ac_cv_lib_Useful_GetToken+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_CIPHER_CTX_init in -lcrypto" >&5 +$as_echo_n "checking for EVP_CIPHER_CTX_init in -lcrypto... " >&6; } +if ${ac_cv_lib_crypto_EVP_CIPHER_CTX_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lUseful $LIBS" +LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3479,42 +3829,40 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char GetToken (); +char EVP_CIPHER_CTX_init (); int main () { -return GetToken (); +return EVP_CIPHER_CTX_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Useful_GetToken=yes + ac_cv_lib_crypto_EVP_CIPHER_CTX_init=yes else - ac_cv_lib_Useful_GetToken=no + ac_cv_lib_crypto_EVP_CIPHER_CTX_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Useful_GetToken" >&5 -$as_echo "$ac_cv_lib_Useful_GetToken" >&6; } -if test "x$ac_cv_lib_Useful_GetToken" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_CIPHER_CTX_init" >&5 +$as_echo "$ac_cv_lib_crypto_EVP_CIPHER_CTX_init" >&6; } +if test "x$ac_cv_lib_crypto_EVP_CIPHER_CTX_init" = xyes; then : cat >>confdefs.h <<_ACEOF -@%:@define HAVE_LIBUSEFUL 1 +@%:@define HAVE_LIBCRYPTO 1 _ACEOF - LIBS="-lUseful $LIBS" + LIBS="-lcrypto $LIBS" fi -LUSEFUL="system" else -LUSEFUL="bundled" -STATIC_LIBS="libUseful-4/libUseful.a" + LIBUSEFUL_BUNDLED="libUseful-4/libUseful.a" -ac_aux_dir= + ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir diff --git a/autom4te.cache/requests b/autom4te.cache/requests index 690d086..6f03158 100644 --- a/autom4te.cache/requests +++ b/autom4te.cache/requests @@ -14,65 +14,65 @@ 'configure.ac' ], { - 'AC_SUBST' => 1, - 'AM_NLS' => 1, - 'LT_INIT' => 1, - 'AM_XGETTEXT_OPTION' => 1, 'AM_POT_TOOLS' => 1, - '_AM_COND_ELSE' => 1, - 'LT_SUPPORTED_TAG' => 1, + 'AC_CANONICAL_BUILD' => 1, + 'AC_CONFIG_LINKS' => 1, + 'AC_FC_PP_SRCEXT' => 1, + 'm4_include' => 1, + 'AM_AUTOMAKE_VERSION' => 1, + 'AC_CONFIG_HEADERS' => 1, + '_AM_MAKEFILE_INCLUDE' => 1, + 'AC_LIBSOURCE' => 1, + 'LT_INIT' => 1, + 'AM_ENABLE_MULTILIB' => 1, + 'AH_OUTPUT' => 1, + 'AC_CONFIG_AUX_DIR' => 1, + 'AM_PROG_AR' => 1, + 'AM_INIT_AUTOMAKE' => 1, + 'm4_pattern_allow' => 1, + 'sinclude' => 1, 'AC_FC_SRCEXT' => 1, - 'AM_PROG_MKDIR_P' => 1, - 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, + 'AC_SUBST' => 1, 'AC_FC_PP_DEFINE' => 1, - 'AC_CONFIG_SUBDIRS' => 1, - 'm4_include' => 1, - 'include' => 1, - 'AM_PROG_FC_C_O' => 1, - 'm4_pattern_forbid' => 1, - 'AC_FC_PP_SRCEXT' => 1, - 'AM_PROG_MOC' => 1, - 'AC_REQUIRE_AUX_FILE' => 1, - 'AC_CANONICAL_BUILD' => 1, - 'AC_SUBST_TRACE' => 1, 'AM_MAKEFILE_INCLUDE' => 1, + 'AC_CONFIG_LIBOBJ_DIR' => 1, + 'AM_NLS' => 1, 'AM_GNU_GETTEXT' => 1, - '_AM_COND_ENDIF' => 1, + 'm4_pattern_forbid' => 1, + 'AM_EXTRA_RECURSIVE_TARGETS' => 1, + 'AC_INIT' => 1, + 'AC_CANONICAL_SYSTEM' => 1, + 'AC_CONFIG_FILES' => 1, + 'AC_CANONICAL_TARGET' => 1, '_LT_AC_TAGCONFIG' => 1, - 'AM_CONDITIONAL' => 1, - 'AM_PATH_GUILE' => 1, 'm4_sinclude' => 1, - 'LT_CONFIG_LTDL_DIR' => 1, - 'AC_DEFINE_TRACE_LITERAL' => 1, - 'AM_AUTOMAKE_VERSION' => 1, - 'AC_CANONICAL_TARGET' => 1, + 'AC_SUBST_TRACE' => 1, + 'include' => 1, + '_AM_COND_ENDIF' => 1, + 'AC_PROG_LIBTOOL' => 1, + '_AM_COND_ELSE' => 1, + 'AM_PROG_MKDIR_P' => 1, 'AM_MAINTAINER_MODE' => 1, + '_m4_warn' => 1, '_AM_COND_IF' => 1, + 'AM_CONDITIONAL' => 1, 'AC_FC_FREEFORM' => 1, - '_AM_MAKEFILE_INCLUDE' => 1, - 'sinclude' => 1, - 'AM_PROG_AR' => 1, - 'm4_pattern_allow' => 1, + '_AM_SUBST_NOTMAKE' => 1, + 'AM_PROG_CXX_C_O' => 1, + 'AM_PROG_MOC' => 1, + 'AM_PROG_FC_C_O' => 1, + 'AC_CONFIG_SUBDIRS' => 1, + 'LT_CONFIG_LTDL_DIR' => 1, + 'AM_PATH_GUILE' => 1, + 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, + 'AC_DEFINE_TRACE_LITERAL' => 1, + 'LT_SUPPORTED_TAG' => 1, + 'AC_REQUIRE_AUX_FILE' => 1, 'AM_SILENT_RULES' => 1, + 'AM_XGETTEXT_OPTION' => 1, 'AC_CANONICAL_HOST' => 1, - 'AC_CONFIG_LINKS' => 1, - 'AH_OUTPUT' => 1, - '_AM_SUBST_NOTMAKE' => 1, - 'AC_CANONICAL_SYSTEM' => 1, - 'AM_ENABLE_MULTILIB' => 1, - 'AC_CONFIG_AUX_DIR' => 1, - 'AC_CONFIG_FILES' => 1, - 'AM_EXTRA_RECURSIVE_TARGETS' => 1, - 'AC_CONFIG_LIBOBJ_DIR' => 1, - 'AC_INIT' => 1, - 'AM_PROG_F77_C_O' => 1, 'AM_PROG_CC_C_O' => 1, - 'AM_INIT_AUTOMAKE' => 1, - 'AC_CONFIG_HEADERS' => 1, - 'AC_LIBSOURCE' => 1, - 'AC_PROG_LIBTOOL' => 1, - '_m4_warn' => 1, - 'AM_PROG_CXX_C_O' => 1 + 'AM_PROG_F77_C_O' => 1 } ], 'Autom4te::Request' ) ); diff --git a/autom4te.cache/traces.0 b/autom4te.cache/traces.0 index 4959b23..0445449 100644 --- a/autom4te.cache/traces.0 +++ b/autom4te.cache/traces.0 @@ -219,44 +219,84 @@ m4trace:configure.ac:7: -1- AH_OUTPUT([_DARWIN_USE_64_BIT_INODE], [/* Enable lar #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 #endif]) -m4trace:configure.ac:13: -1- AH_OUTPUT([HAVE_LIBSSL], [/* Define to 1 if you have the `ssl\' library (-lssl). */ +m4trace:configure.ac:17: -1- AH_OUTPUT([HAVE_LIBUSEFUL_5_LIBUSEFUL_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_LIBUSEFUL_5_LIBUSEFUL_H]) +m4trace:configure.ac:17: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_SYS_TYPES_H]) +m4trace:configure.ac:17: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_SYS_STAT_H]) +m4trace:configure.ac:17: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_STDLIB_H]) +m4trace:configure.ac:17: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_STRING_H]) +m4trace:configure.ac:17: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_MEMORY_H]) +m4trace:configure.ac:17: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_STRINGS_H]) +m4trace:configure.ac:17: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_INTTYPES_H]) +m4trace:configure.ac:17: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_STDINT_H]) +m4trace:configure.ac:17: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_UNISTD_H]) +m4trace:configure.ac:17: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBUSEFUL_5_LIBUSEFUL_H]) +m4trace:configure.ac:17: -1- m4_pattern_allow([^HAVE_LIBUSEFUL_5_LIBUSEFUL_H$]) +m4trace:configure.ac:20: -1- AH_OUTPUT([HAVE_LIBUSEFUL_4_LIBUSEFUL_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_LIBUSEFUL_4_LIBUSEFUL_H]) +m4trace:configure.ac:20: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBUSEFUL_4_LIBUSEFUL_H]) +m4trace:configure.ac:20: -1- m4_pattern_allow([^HAVE_LIBUSEFUL_4_LIBUSEFUL_H$]) +m4trace:configure.ac:28: -1- AC_SUBST([LIBUSEFUL_BUNDLED], [""]) +m4trace:configure.ac:28: -1- AC_SUBST_TRACE([LIBUSEFUL_BUNDLED]) +m4trace:configure.ac:28: -1- m4_pattern_allow([^LIBUSEFUL_BUNDLED$]) +m4trace:configure.ac:31: -1- AH_OUTPUT([HAVE_LIBUSEFUL_5], [/* Define to 1 if you have the `Useful-5\' library (-lUseful-5). */ +@%:@undef HAVE_LIBUSEFUL_5]) +m4trace:configure.ac:31: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBUSEFUL_5]) +m4trace:configure.ac:31: -1- m4_pattern_allow([^HAVE_LIBUSEFUL_5$]) +m4trace:configure.ac:35: -1- AH_OUTPUT([HAVE_LIBSSL], [/* Define to 1 if you have the `ssl\' library (-lssl). */ @%:@undef HAVE_LIBSSL]) -m4trace:configure.ac:13: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBSSL]) -m4trace:configure.ac:13: -1- m4_pattern_allow([^HAVE_LIBSSL$]) -m4trace:configure.ac:13: -1- AH_OUTPUT([HAVE_LIBCRYPTO], [/* Define to 1 if you have the `crypto\' library (-lcrypto). */ +m4trace:configure.ac:35: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBSSL]) +m4trace:configure.ac:35: -1- m4_pattern_allow([^HAVE_LIBSSL$]) +m4trace:configure.ac:36: -1- AH_OUTPUT([HAVE_LIBCRYPTO], [/* Define to 1 if you have the `crypto\' library (-lcrypto). */ @%:@undef HAVE_LIBCRYPTO]) -m4trace:configure.ac:13: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBCRYPTO]) -m4trace:configure.ac:13: -1- m4_pattern_allow([^HAVE_LIBCRYPTO$]) -m4trace:configure.ac:13: -1- AH_OUTPUT([HAVE_LIBZ], [/* Define to 1 if you have the `z\' library (-lz). */ -@%:@undef HAVE_LIBZ]) -m4trace:configure.ac:13: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBZ]) -m4trace:configure.ac:13: -1- m4_pattern_allow([^HAVE_LIBZ$]) -m4trace:configure.ac:18: -1- AH_OUTPUT([HAVE_LIBUSEFUL], [/* Define to 1 if you have the `Useful\' library (-lUseful). */ -@%:@undef HAVE_LIBUSEFUL]) -m4trace:configure.ac:18: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBUSEFUL]) -m4trace:configure.ac:18: -1- m4_pattern_allow([^HAVE_LIBUSEFUL$]) -m4trace:configure.ac:24: -1- AC_SUBST([STATIC_LIBS]) -m4trace:configure.ac:24: -1- AC_SUBST_TRACE([STATIC_LIBS]) -m4trace:configure.ac:24: -1- m4_pattern_allow([^STATIC_LIBS$]) -m4trace:configure.ac:25: -1- AC_CONFIG_SUBDIRS([libUseful-4]) -m4trace:configure.ac:25: -1- AC_SUBST([subdirs], ["$subdirs m4_normalize([libUseful-4])"]) -m4trace:configure.ac:25: -1- AC_SUBST_TRACE([subdirs]) -m4trace:configure.ac:25: -1- m4_pattern_allow([^subdirs$]) -m4trace:configure.ac:30: -1- AC_CONFIG_FILES([Makefile]) -m4trace:configure.ac:30: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments. +m4trace:configure.ac:36: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBCRYPTO]) +m4trace:configure.ac:36: -1- m4_pattern_allow([^HAVE_LIBCRYPTO$]) +m4trace:configure.ac:41: -1- AC_SUBST([LIBUSEFUL_BUNDLED], [""]) +m4trace:configure.ac:41: -1- AC_SUBST_TRACE([LIBUSEFUL_BUNDLED]) +m4trace:configure.ac:41: -1- m4_pattern_allow([^LIBUSEFUL_BUNDLED$]) +m4trace:configure.ac:44: -1- AH_OUTPUT([HAVE_LIBUSEFUL_4], [/* Define to 1 if you have the `Useful-4\' library (-lUseful-4). */ +@%:@undef HAVE_LIBUSEFUL_4]) +m4trace:configure.ac:44: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBUSEFUL_4]) +m4trace:configure.ac:44: -1- m4_pattern_allow([^HAVE_LIBUSEFUL_4$]) +m4trace:configure.ac:48: -1- AH_OUTPUT([HAVE_LIBSSL], [/* Define to 1 if you have the `ssl\' library (-lssl). */ +@%:@undef HAVE_LIBSSL]) +m4trace:configure.ac:48: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBSSL]) +m4trace:configure.ac:48: -1- m4_pattern_allow([^HAVE_LIBSSL$]) +m4trace:configure.ac:49: -1- AH_OUTPUT([HAVE_LIBCRYPTO], [/* Define to 1 if you have the `crypto\' library (-lcrypto). */ +@%:@undef HAVE_LIBCRYPTO]) +m4trace:configure.ac:49: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBCRYPTO]) +m4trace:configure.ac:49: -1- m4_pattern_allow([^HAVE_LIBCRYPTO$]) +m4trace:configure.ac:52: -1- AC_SUBST([LIBUSEFUL_BUNDLED], ["libUseful-4/libUseful.a"]) +m4trace:configure.ac:52: -1- AC_SUBST_TRACE([LIBUSEFUL_BUNDLED]) +m4trace:configure.ac:52: -1- m4_pattern_allow([^LIBUSEFUL_BUNDLED$]) +m4trace:configure.ac:53: -1- AC_CONFIG_SUBDIRS([libUseful-4]) +m4trace:configure.ac:53: -1- AC_SUBST([subdirs], ["$subdirs m4_normalize([libUseful-4])"]) +m4trace:configure.ac:53: -1- AC_SUBST_TRACE([subdirs]) +m4trace:configure.ac:53: -1- m4_pattern_allow([^subdirs$]) +m4trace:configure.ac:58: -1- AC_CONFIG_FILES([Makefile]) +m4trace:configure.ac:58: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments. You should run autoupdate.], []) -m4trace:configure.ac:30: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) -m4trace:configure.ac:30: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) -m4trace:configure.ac:30: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:30: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) -m4trace:configure.ac:30: -1- AC_SUBST_TRACE([LTLIBOBJS]) -m4trace:configure.ac:30: -1- m4_pattern_allow([^LTLIBOBJS$]) -m4trace:configure.ac:30: -1- AC_SUBST_TRACE([top_builddir]) -m4trace:configure.ac:30: -1- AC_SUBST_TRACE([top_build_prefix]) -m4trace:configure.ac:30: -1- AC_SUBST_TRACE([srcdir]) -m4trace:configure.ac:30: -1- AC_SUBST_TRACE([abs_srcdir]) -m4trace:configure.ac:30: -1- AC_SUBST_TRACE([top_srcdir]) -m4trace:configure.ac:30: -1- AC_SUBST_TRACE([abs_top_srcdir]) -m4trace:configure.ac:30: -1- AC_SUBST_TRACE([builddir]) -m4trace:configure.ac:30: -1- AC_SUBST_TRACE([abs_builddir]) -m4trace:configure.ac:30: -1- AC_SUBST_TRACE([abs_top_builddir]) +m4trace:configure.ac:58: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) +m4trace:configure.ac:58: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) +m4trace:configure.ac:58: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:58: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) +m4trace:configure.ac:58: -1- AC_SUBST_TRACE([LTLIBOBJS]) +m4trace:configure.ac:58: -1- m4_pattern_allow([^LTLIBOBJS$]) +m4trace:configure.ac:58: -1- AC_SUBST_TRACE([top_builddir]) +m4trace:configure.ac:58: -1- AC_SUBST_TRACE([top_build_prefix]) +m4trace:configure.ac:58: -1- AC_SUBST_TRACE([srcdir]) +m4trace:configure.ac:58: -1- AC_SUBST_TRACE([abs_srcdir]) +m4trace:configure.ac:58: -1- AC_SUBST_TRACE([top_srcdir]) +m4trace:configure.ac:58: -1- AC_SUBST_TRACE([abs_top_srcdir]) +m4trace:configure.ac:58: -1- AC_SUBST_TRACE([builddir]) +m4trace:configure.ac:58: -1- AC_SUBST_TRACE([abs_builddir]) +m4trace:configure.ac:58: -1- AC_SUBST_TRACE([abs_top_builddir]) diff --git a/common.h b/common.h index ffd7587..f379eb5 100644 --- a/common.h +++ b/common.h @@ -2,7 +2,13 @@ #ifndef WMAN_COMMON_H #define WMAN_COMMON_H +#ifdef HAVE_LIBUSEFUL5_LIBUSEFUL_H +#include "libUseful-5/libUseful.h" +#else #include "libUseful-4/libUseful.h" +#endif + + #include #define NET_WPA1 1 diff --git a/config.log b/config.log index e911a19..e9686c3 100644 --- a/config.log +++ b/config.log @@ -10,14 +10,14 @@ generated by GNU Autoconf 2.69. Invocation command line was ## Platform. ## ## --------- ## -hostname = hplap -uname -m = x86_64 +hostname = lifebook3 +uname -m = i486 uname -r = 5.19.6-64 uname -s = Linux uname -v = #1 SMP PREEMPT_DYNAMIC Sat Sep 3 14:17:57 BST 2022 /usr/bin/uname -p = unknown -/bin/uname -X = unknown +/bin/uname -X = /bin/arch = unknown /usr/bin/arch -k = unknown @@ -27,6 +27,7 @@ uname -v = #1 SMP PREEMPT_DYNAMIC Sat Sep 3 14:17:57 BST 2022 /usr/bin/oslevel = unknown /bin/universe = unknown +PATH: /home/colum/bin PATH: /usr/prebin PATH: /usr/local/bin PATH: /usr/bin @@ -39,107 +40,105 @@ PATH: /opt/Drawing/bin PATH: /opt/FLTK/bin PATH: /opt/GTK/bin PATH: /opt/LibreCAD/bin -PATH: /opt/Python-3.7.1/bin +PATH: /opt/Python-2.7.15/bin +PATH: /opt/Python-3.5.6/bin PATH: /opt/Qt5/bin PATH: /opt/SDL/bin PATH: /opt/SDL2/bin -PATH: /opt/boinc_client-7.14.2/bin -PATH: /opt/chess/bin +PATH: /opt/blender-2.79b/bin +PATH: /opt/brlcad-7.26.4/bin PATH: /opt/games/bin -PATH: /opt/ghostscript-9.22/bin -PATH: /opt/git-2.16.2/bin +PATH: /opt/gdbm-1.18.1/bin +PATH: /opt/ghostscript-9.26/bin +PATH: /opt/git-2.20.1/bin PATH: /opt/lua-5.3.4/bin -PATH: /opt/mujs-1.0.3/bin PATH: /opt/netpbm-10.66.02/bin PATH: /opt/opengl/bin -PATH: /opt/openjdk-15.0.2/bin PATH: /opt/perl-5.24.1/bin -PATH: /opt/qemu-5.2.1_SDL/bin -PATH: /opt/ruby-2.5.0/bin -PATH: /opt/rust-1.57.0/bin -PATH: /opt/schily/bin -PATH: /opt/tcl-8.6.8/bin -PATH: /opt/timekeeper/bin -PATH: /opt/wine-6.0/bin +PATH: /opt/ruby-2.5.2/bin +PATH: /opt/sound-studio/bin +PATH: /opt/tcl-8.6.9/bin +PATH: /opt/wine-6.19/bin +PATH: /opt/xboinc_client-7.14.2/bin ## ----------- ## ## Core tests. ## ## ----------- ## -configure:1922: checking for gcc -configure:1938: found /usr/bin/gcc -configure:1949: result: gcc -configure:2178: checking for C compiler version -configure:2187: gcc --version >&5 -gcc (GCC) 8.1.0 +configure:2076: checking for gcc +configure:2092: found /usr/bin/gcc +configure:2103: result: gcc +configure:2332: checking for C compiler version +configure:2341: gcc --version >&5 +gcc (GCC) 8.2.0 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -configure:2198: $? = 0 -configure:2187: gcc -v >&5 +configure:2352: $? = 0 +configure:2341: gcc -v >&5 Using built-in specs. COLLECT_GCC=gcc -COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i486-pc-linux-gnu/8.1.0/lto-wrapper +COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i486-pc-linux-gnu/8.2.0/lto-wrapper Target: i486-pc-linux-gnu -Configured with: ../gcc-8.1.0-src/configure --prefix=/usr --sysconfdir=/etc --includedir=/usr/include --localstatedir=/var --mandir=/usr/share/man --infodir=/usr/share/info --host=i486-pc-linux-gnu --build=i486-pc-linux-gnu --target=i486-pc-linux-gnu --enable-languages=c,c++,go --disable-nls --disable-multilib +Configured with: ../gcc-8.2.0-src/configure --enable-languages=c,c++,go --disable-nls --disable-multilib --prefix=/usr --sysconfdir=/etc --includedir=/usr/include --localstatedir=/var --mandir=/usr/share/man --infodir=/usr/share/info --host=i486-pc-linux-gnu --build=i486-pc-linux-gnu --target=i486-pc-linux-gnu Thread model: posix -gcc version 8.1.0 (GCC) -configure:2198: $? = 0 -configure:2187: gcc -V >&5 +gcc version 8.2.0 (GCC) +configure:2352: $? = 0 +configure:2341: gcc -V >&5 gcc: error: unrecognized command line option '-V' gcc: fatal error: no input files compilation terminated. -configure:2198: $? = 1 -configure:2187: gcc -qversion >&5 +configure:2352: $? = 1 +configure:2341: gcc -qversion >&5 gcc: error: unrecognized command line option '-qversion'; did you mean '--version'? gcc: fatal error: no input files compilation terminated. -configure:2198: $? = 1 -configure:2218: checking whether the C compiler works -configure:2240: gcc conftest.c >&5 -configure:2244: $? = 0 -configure:2292: result: yes -configure:2295: checking for C compiler default output file name -configure:2297: result: a.out -configure:2303: checking for suffix of executables -configure:2310: gcc -o conftest conftest.c >&5 -configure:2314: $? = 0 -configure:2336: result: -configure:2358: checking whether we are cross compiling -configure:2366: gcc -o conftest conftest.c >&5 -configure:2370: $? = 0 -configure:2377: ./conftest -configure:2381: $? = 0 -configure:2396: result: no -configure:2401: checking for suffix of object files -configure:2423: gcc -c conftest.c >&5 -configure:2427: $? = 0 -configure:2448: result: o -configure:2452: checking whether we are using the GNU C compiler -configure:2471: gcc -c conftest.c >&5 -configure:2471: $? = 0 -configure:2480: result: yes -configure:2489: checking whether gcc accepts -g -configure:2509: gcc -c -g conftest.c >&5 -configure:2509: $? = 0 -configure:2550: result: yes -configure:2567: checking for gcc option to accept ISO C89 -configure:2630: gcc -c -g -O2 conftest.c >&5 -configure:2630: $? = 0 -configure:2643: result: none needed -configure:2669: checking whether make sets $(MAKE) -configure:2691: result: yes -configure:2706: checking how to run the C preprocessor -configure:2737: gcc -E conftest.c -configure:2737: $? = 0 -configure:2751: gcc -E conftest.c +configure:2352: $? = 1 +configure:2372: checking whether the C compiler works +configure:2394: gcc conftest.c >&5 +configure:2398: $? = 0 +configure:2446: result: yes +configure:2449: checking for C compiler default output file name +configure:2451: result: a.out +configure:2457: checking for suffix of executables +configure:2464: gcc -o conftest conftest.c >&5 +configure:2468: $? = 0 +configure:2490: result: +configure:2512: checking whether we are cross compiling +configure:2520: gcc -o conftest conftest.c >&5 +configure:2524: $? = 0 +configure:2531: ./conftest +configure:2535: $? = 0 +configure:2550: result: no +configure:2555: checking for suffix of object files +configure:2577: gcc -c conftest.c >&5 +configure:2581: $? = 0 +configure:2602: result: o +configure:2606: checking whether we are using the GNU C compiler +configure:2625: gcc -c conftest.c >&5 +configure:2625: $? = 0 +configure:2634: result: yes +configure:2643: checking whether gcc accepts -g +configure:2663: gcc -c -g conftest.c >&5 +configure:2663: $? = 0 +configure:2704: result: yes +configure:2721: checking for gcc option to accept ISO C89 +configure:2784: gcc -c -g -O2 conftest.c >&5 +configure:2784: $? = 0 +configure:2797: result: none needed +configure:2823: checking whether make sets $(MAKE) +configure:2845: result: yes +configure:2860: checking how to run the C preprocessor +configure:2891: gcc -E conftest.c +configure:2891: $? = 0 +configure:2905: gcc -E conftest.c conftest.c:9:10: fatal error: ac_nonexistent.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~ compilation terminated. -configure:2751: $? = 1 +configure:2905: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "" @@ -150,15 +149,15 @@ configure: failed program was: | #define PACKAGE_URL "" | /* end confdefs.h. */ | #include -configure:2776: result: gcc -E -configure:2796: gcc -E conftest.c -configure:2796: $? = 0 -configure:2810: gcc -E conftest.c +configure:2930: result: gcc -E +configure:2950: gcc -E conftest.c +configure:2950: $? = 0 +configure:2964: gcc -E conftest.c conftest.c:9:10: fatal error: ac_nonexistent.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~ compilation terminated. -configure:2810: $? = 1 +configure:2964: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "" @@ -169,22 +168,22 @@ configure: failed program was: | #define PACKAGE_URL "" | /* end confdefs.h. */ | #include -configure:2839: checking for grep that handles long lines and -e -configure:2897: result: /bin/grep -configure:2902: checking for egrep -configure:2964: result: /bin/grep -E -configure:2969: checking for ANSI C header files -configure:2989: gcc -c -g -O2 conftest.c >&5 -configure:2989: $? = 0 -configure:3062: gcc -o conftest -g -O2 conftest.c >&5 -configure:3062: $? = 0 -configure:3062: ./conftest -configure:3062: $? = 0 -configure:3073: result: yes -configure:3088: checking for special C compiler options needed for large files -configure:3133: result: no -configure:3139: checking for _FILE_OFFSET_BITS value needed for large files -configure:3164: gcc -c -g -O2 conftest.c >&5 +configure:2993: checking for grep that handles long lines and -e +configure:3051: result: /bin/grep +configure:3056: checking for egrep +configure:3118: result: /bin/grep -E +configure:3123: checking for ANSI C header files +configure:3143: gcc -c -g -O2 conftest.c >&5 +configure:3143: $? = 0 +configure:3216: gcc -o conftest -g -O2 conftest.c >&5 +configure:3216: $? = 0 +configure:3216: ./conftest +configure:3216: $? = 0 +configure:3227: result: yes +configure:3242: checking for special C compiler options needed for large files +configure:3287: result: no +configure:3293: checking for _FILE_OFFSET_BITS value needed for large files +configure:3318: gcc -c -g -O2 conftest.c >&5 conftest.c:15:33: warning: left shift count >= width of type [-Wshift-count-overflow] #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) ^~ @@ -212,7 +211,7 @@ conftest.c:17:13: note: in expansion of macro 'LARGE_OFF_T' conftest.c:16:7: error: variably modified 'off_t_is_large' at file scope int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 ^~~~~~~~~~~~~~ -configure:3164: $? = 1 +configure:3318: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "" @@ -239,10 +238,70 @@ configure: failed program was: | ; | return 0; | } -configure:3188: gcc -c -g -O2 conftest.c >&5 -configure:3188: $? = 0 -configure:3196: result: 64 -configure:3705: creating ./config.status +configure:3342: gcc -c -g -O2 conftest.c >&5 +configure:3342: $? = 0 +configure:3350: result: 64 +configure:3446: checking for GetToken in -lUseful-5 +configure:3471: gcc -o conftest -g -O2 conftest.c -lUseful-5 >&5 +configure:3471: $? = 0 +configure:3480: result: yes +configure:3495: checking for sys/types.h +configure:3495: gcc -c -g -O2 conftest.c >&5 +configure:3495: $? = 0 +configure:3495: result: yes +configure:3495: checking for sys/stat.h +configure:3495: gcc -c -g -O2 conftest.c >&5 +configure:3495: $? = 0 +configure:3495: result: yes +configure:3495: checking for stdlib.h +configure:3495: gcc -c -g -O2 conftest.c >&5 +configure:3495: $? = 0 +configure:3495: result: yes +configure:3495: checking for string.h +configure:3495: gcc -c -g -O2 conftest.c >&5 +configure:3495: $? = 0 +configure:3495: result: yes +configure:3495: checking for memory.h +configure:3495: gcc -c -g -O2 conftest.c >&5 +configure:3495: $? = 0 +configure:3495: result: yes +configure:3495: checking for strings.h +configure:3495: gcc -c -g -O2 conftest.c >&5 +configure:3495: $? = 0 +configure:3495: result: yes +configure:3495: checking for inttypes.h +configure:3495: gcc -c -g -O2 conftest.c >&5 +configure:3495: $? = 0 +configure:3495: result: yes +configure:3495: checking for stdint.h +configure:3495: gcc -c -g -O2 conftest.c >&5 +configure:3495: $? = 0 +configure:3495: result: yes +configure:3495: checking for unistd.h +configure:3495: gcc -c -g -O2 conftest.c >&5 +configure:3495: $? = 0 +configure:3495: result: yes +configure:3509: checking libUseful-5/libUseful.h usability +configure:3509: gcc -c -g -O2 conftest.c >&5 +configure:3509: $? = 0 +configure:3509: result: yes +configure:3509: checking libUseful-5/libUseful.h presence +configure:3509: gcc -E conftest.c +configure:3509: $? = 0 +configure:3509: result: yes +configure:3509: checking for libUseful-5/libUseful.h +configure:3509: result: yes +configure:3583: checking for GetToken in -lUseful-5 +configure:3617: result: yes +configure:3629: checking for SSL_library_init in -lssl +configure:3654: gcc -o conftest -g -O2 conftest.c -lssl -lUseful-5 >&5 +configure:3654: $? = 0 +configure:3663: result: yes +configure:3674: checking for EVP_CIPHER_CTX_init in -lcrypto +configure:3699: gcc -o conftest -g -O2 conftest.c -lcrypto -lssl -lUseful-5 >&5 +configure:3699: $? = 0 +configure:3708: result: yes +configure:4053: creating ./config.status ## ---------------------- ## ## Running config.status. ## @@ -257,11 +316,9 @@ generated by GNU Autoconf 2.69. Invocation command line was CONFIG_COMMANDS = $ ./config.status -on hplap +on lifebook3 -config.status:725: creating Makefile -configure:4776: === configuring in libUseful-4 (/home/colum/work/term_wifi/libUseful-4) -configure:4839: running /bin/sh ./configure --disable-option-checking '--prefix=/usr/local' --cache-file=/dev/null --srcdir=. +config.status:726: creating Makefile ## ---------------- ## ## Cache variables. ## @@ -286,7 +343,20 @@ ac_cv_env_host_alias_set= ac_cv_env_host_alias_value= ac_cv_env_target_alias_set= ac_cv_env_target_alias_value= +ac_cv_header_inttypes_h=yes +ac_cv_header_libUseful_5_libUseful_h=yes +ac_cv_header_memory_h=yes ac_cv_header_stdc=yes +ac_cv_header_stdint_h=yes +ac_cv_header_stdlib_h=yes +ac_cv_header_string_h=yes +ac_cv_header_strings_h=yes +ac_cv_header_sys_stat_h=yes +ac_cv_header_sys_types_h=yes +ac_cv_header_unistd_h=yes +ac_cv_lib_Useful_5_GetToken=yes +ac_cv_lib_crypto_EVP_CIPHER_CTX_init=yes +ac_cv_lib_ssl_SSL_library_init=yes ac_cv_objext=o ac_cv_path_EGREP='/bin/grep -E' ac_cv_path_GREP=/bin/grep @@ -306,7 +376,7 @@ CC='gcc' CFLAGS='-g -O2' CPP='gcc -E' CPPFLAGS='' -DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -D_FILE_OFFSET_BITS=64' +DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -D_FILE_OFFSET_BITS=64 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBUSEFUL_5_LIBUSEFUL_H=1 -DHAVE_LIBUSEFUL_5=1 -DHAVE_LIBSSL=1 -DHAVE_LIBCRYPTO=1' ECHO_C='' ECHO_N='-n' ECHO_T='' @@ -315,7 +385,8 @@ EXEEXT='' GREP='/bin/grep' LDFLAGS='' LIBOBJS='' -LIBS='' +LIBS='-lcrypto -lssl -lUseful-5 ' +LIBUSEFUL_BUNDLED='' LTLIBOBJS='' OBJEXT='o' PACKAGE_BUGREPORT='' @@ -327,7 +398,6 @@ PACKAGE_VERSION='' PATH_SEPARATOR=':' SET_MAKE='' SHELL='/bin/sh' -STATIC_LIBS='libUseful-4/libUseful.a' ac_ct_CC='gcc' bindir='${exec_prefix}/bin' build_alias='' @@ -352,7 +422,7 @@ program_transform_name='s,x,x,' psdir='${docdir}' sbindir='${exec_prefix}/sbin' sharedstatedir='${prefix}/com' -subdirs=' libUseful-4' +subdirs='' sysconfdir='${prefix}/etc' target_alias='' @@ -369,5 +439,18 @@ target_alias='' #define PACKAGE_URL "" #define STDC_HEADERS 1 #define _FILE_OFFSET_BITS 64 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_LIBUSEFUL_5_LIBUSEFUL_H 1 +#define HAVE_LIBUSEFUL_5 1 +#define HAVE_LIBSSL 1 +#define HAVE_LIBCRYPTO 1 configure: exit 0 diff --git a/config.status b/config.status index 180e583..8fccf85 100755 --- a/config.status +++ b/config.status @@ -427,7 +427,7 @@ Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -ac_pwd='/home/colum/work/term_wifi' +ac_pwd='/home/colum/term_wifi' srcdir='.' test -n "$AWK" || AWK=awk # The default lists apply if the user does not specify any file. @@ -583,8 +583,8 @@ echo 'BEGIN {' >"$ac_tmp/subs1.awk" && cat >>"$ac_tmp/subs1.awk" <<\_ACAWK && S["LTLIBOBJS"]="" S["LIBOBJS"]="" -S["subdirs"]=" libUseful-4" -S["STATIC_LIBS"]="libUseful-4/libUseful.a" +S["subdirs"]="" +S["LIBUSEFUL_BUNDLED"]="" S["EGREP"]="/bin/grep -E" S["GREP"]="/bin/grep" S["CPP"]="gcc -E" @@ -599,12 +599,13 @@ S["CC"]="gcc" S["target_alias"]="" S["host_alias"]="" S["build_alias"]="" -S["LIBS"]="" +S["LIBS"]="-lcrypto -lssl -lUseful-5 " S["ECHO_T"]="" S["ECHO_N"]="-n" S["ECHO_C"]="" S["DEFS"]="-DPACKAGE_NAME=\\\"\\\" -DPACKAGE_TARNAME=\\\"\\\" -DPACKAGE_VERSION=\\\"\\\" -DPACKAGE_STRING=\\\"\\\" -DPACKAGE_BUGREPORT=\\\"\\\" -DPACKAGE_URL=\\\"\\\" -DSTDC_HEADERS=1"\ -" -D_FILE_OFFSET_BITS=64" +" -D_FILE_OFFSET_BITS=64 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INT"\ +"TYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBUSEFUL_5_LIBUSEFUL_H=1 -DHAVE_LIBUSEFUL_5=1 -DHAVE_LIBSSL=1 -DHAVE_LIBCRYPTO=1" S["mandir"]="${datarootdir}/man" S["localedir"]="${datarootdir}/locale" S["libdir"]="${exec_prefix}/lib" diff --git a/configure b/configure index 250ebe9..46de034 100755 --- a/configure +++ b/configure @@ -583,11 +583,47 @@ PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="main.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + enable_option_checking=no ac_subst_vars='LTLIBOBJS LIBOBJS subdirs -STATIC_LIBS +LIBUSEFUL_BUNDLED EGREP GREP CPP @@ -641,7 +677,7 @@ ac_subst_files='' ac_user_opts=' enable_option_checking enable_largefile -with_system_libuseful +with_libuseful ' ac_precious_vars='build_alias host_alias @@ -1264,7 +1300,7 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-system-libuseful use systemwide libUseful.so rather than bundled version + --with-libuseful use system-wide libUseful (default=auto) Some influential environment variables: CC C compiler command @@ -1518,6 +1554,124 @@ fi as_fn_set_status $ac_retval } # ac_fn_c_try_link + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -3280,21 +3434,159 @@ fi -# Check whether --with-system-libuseful was given. -if test "${with_system_libuseful+set}" = set; then : - withval=$with_system_libuseful; cf_with_libuseful=$withval + +# Check whether --with-libuseful was given. +if test "${with_libuseful+set}" = set; then : + withval=$with_libuseful; cf_system_libuseful=$withval +fi + + +if test "$cf_system_libuseful" != "no" +then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GetToken in -lUseful-5" >&5 +$as_echo_n "checking for GetToken in -lUseful-5... " >&6; } +if ${ac_cv_lib_Useful_5_GetToken+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lUseful-5 $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. */ +#ifdef __cplusplus +extern "C" +#endif +char GetToken (); +int +main () +{ +return GetToken (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Useful_5_GetToken=yes +else + ac_cv_lib_Useful_5_GetToken=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Useful_5_GetToken" >&5 +$as_echo "$ac_cv_lib_Useful_5_GetToken" >&6; } +if test "x$ac_cv_lib_Useful_5_GetToken" = xyes; then : + cf_have_libUseful5=yes +else + cf_have_libUseful5=no +fi + + if test "$cf_have_libUseful5" = "yes" + then + # On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in libUseful-5/libUseful.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libUseful-5/libUseful.h" "ac_cv_header_libUseful_5_libUseful_h" "$ac_includes_default" +if test "x$ac_cv_header_libUseful_5_libUseful_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBUSEFUL_5_LIBUSEFUL_H 1 +_ACEOF + +fi + +done + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GetToken in -lUseful-4" >&5 +$as_echo_n "checking for GetToken in -lUseful-4... " >&6; } +if ${ac_cv_lib_Useful_4_GetToken+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lUseful-4 $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. */ +#ifdef __cplusplus +extern "C" +#endif +char GetToken (); +int +main () +{ +return GetToken (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Useful_4_GetToken=yes +else + ac_cv_lib_Useful_4_GetToken=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Useful_4_GetToken" >&5 +$as_echo "$ac_cv_lib_Useful_4_GetToken" >&6; } +if test "x$ac_cv_lib_Useful_4_GetToken" = xyes; then : + cf_have_libUseful4=yes +else + cf_have_libUseful4=no +fi + + for ac_header in libUseful-4/libUseful.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libUseful-4/libUseful.h" "ac_cv_header_libUseful_4_libUseful_h" "$ac_includes_default" +if test "x$ac_cv_header_libUseful_4_libUseful_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBUSEFUL_4_LIBUSEFUL_H 1 +_ACEOF + +fi + +done + fi +fi -if test "$cf_with_libuseful" != "no" -a "$cf_with_libuseful" != "" +if test "$cf_have_libUseful5" = "yes" then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSLVerifyCallback in -lUseful" >&5 -$as_echo_n "checking for OpenSSLVerifyCallback in -lUseful... " >&6; } -if ${ac_cv_lib_Useful_OpenSSLVerifyCallback+:} false; then : + echo "installed libUseful-5 found, using that instead of bundled libUseful." + echo "if you want to use bundled libUseful, force it with --with-libuseful=no" + LIBUSEFUL_BUNDLED="" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GetToken in -lUseful-5" >&5 +$as_echo_n "checking for GetToken in -lUseful-5... " >&6; } +if ${ac_cv_lib_Useful_5_GetToken+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lUseful -lssl -lcrypto -lz $LIBS" +LIBS="-lUseful-5 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3304,34 +3596,43 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char OpenSSLVerifyCallback (); +char GetToken (); int main () { -return OpenSSLVerifyCallback (); +return GetToken (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Useful_OpenSSLVerifyCallback=yes + ac_cv_lib_Useful_5_GetToken=yes else - ac_cv_lib_Useful_OpenSSLVerifyCallback=no + ac_cv_lib_Useful_5_GetToken=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Useful_OpenSSLVerifyCallback" >&5 -$as_echo "$ac_cv_lib_Useful_OpenSSLVerifyCallback" >&6; } -if test "x$ac_cv_lib_Useful_OpenSSLVerifyCallback" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5 -$as_echo_n "checking for SSL_new in -lssl... " >&6; } -if ${ac_cv_lib_ssl_SSL_new+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Useful_5_GetToken" >&5 +$as_echo "$ac_cv_lib_Useful_5_GetToken" >&6; } +if test "x$ac_cv_lib_Useful_5_GetToken" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBUSEFUL_5 1 +_ACEOF + + LIBS="-lUseful-5 $LIBS" + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5 +$as_echo_n "checking for SSL_library_init in -lssl... " >&6; } +if ${ac_cv_lib_ssl_SSL_library_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lssl -lcrypto -lz $LIBS" +LIBS="-lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3341,27 +3642,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char SSL_new (); +char SSL_library_init (); int main () { -return SSL_new (); +return SSL_library_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ssl_SSL_new=yes + ac_cv_lib_ssl_SSL_library_init=yes else - ac_cv_lib_ssl_SSL_new=no + ac_cv_lib_ssl_SSL_library_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5 -$as_echo "$ac_cv_lib_ssl_SSL_new" >&6; } -if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5 +$as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; } +if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSSL 1 _ACEOF @@ -3370,13 +3671,13 @@ _ACEOF fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ERR_load_CRYPTO_strings in -lcrypto" >&5 -$as_echo_n "checking for ERR_load_CRYPTO_strings in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_ERR_load_CRYPTO_strings+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_CIPHER_CTX_init in -lcrypto" >&5 +$as_echo_n "checking for EVP_CIPHER_CTX_init in -lcrypto... " >&6; } +if ${ac_cv_lib_crypto_EVP_CIPHER_CTX_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lcrypto -lz $LIBS" +LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3386,27 +3687,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char ERR_load_CRYPTO_strings (); +char EVP_CIPHER_CTX_init (); int main () { -return ERR_load_CRYPTO_strings (); +return EVP_CIPHER_CTX_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_crypto_ERR_load_CRYPTO_strings=yes + ac_cv_lib_crypto_EVP_CIPHER_CTX_init=yes else - ac_cv_lib_crypto_ERR_load_CRYPTO_strings=no + ac_cv_lib_crypto_EVP_CIPHER_CTX_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_ERR_load_CRYPTO_strings" >&5 -$as_echo "$ac_cv_lib_crypto_ERR_load_CRYPTO_strings" >&6; } -if test "x$ac_cv_lib_crypto_ERR_load_CRYPTO_strings" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_CIPHER_CTX_init" >&5 +$as_echo "$ac_cv_lib_crypto_EVP_CIPHER_CTX_init" >&6; } +if test "x$ac_cv_lib_crypto_EVP_CIPHER_CTX_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCRYPTO 1 _ACEOF @@ -3415,13 +3716,19 @@ _ACEOF fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5 -$as_echo_n "checking for inflate in -lz... " >&6; } -if ${ac_cv_lib_z_inflate+:} false; then : +elif test "$cf_have_libUseful4" = "yes" +then + echo "installed libUseful-4 found, using that instead of bundled libUseful." + echo "if you want to use bundled libUseful, force it with --with-libuseful=no" + LIBUSEFUL_BUNDLED="" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GetToken in -lUseful-4" >&5 +$as_echo_n "checking for GetToken in -lUseful-4... " >&6; } +if ${ac_cv_lib_Useful_4_GetToken+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" +LIBS="-lUseful-4 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3431,45 +3738,88 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char inflate (); +char GetToken (); int main () { -return inflate (); +return GetToken (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_z_inflate=yes + ac_cv_lib_Useful_4_GetToken=yes else - ac_cv_lib_z_inflate=no + ac_cv_lib_Useful_4_GetToken=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5 -$as_echo "$ac_cv_lib_z_inflate" >&6; } -if test "x$ac_cv_lib_z_inflate" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Useful_4_GetToken" >&5 +$as_echo "$ac_cv_lib_Useful_4_GetToken" >&6; } +if test "x$ac_cv_lib_Useful_4_GetToken" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_LIBZ 1 +#define HAVE_LIBUSEFUL_4 1 _ACEOF - LIBS="-lz $LIBS" + LIBS="-lUseful-4 $LIBS" fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5 +$as_echo_n "checking for SSL_library_init in -lssl... " >&6; } +if ${ac_cv_lib_ssl_SSL_library_init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lssl $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. */ +#ifdef __cplusplus +extern "C" +#endif +char SSL_library_init (); +int +main () +{ +return SSL_library_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ssl_SSL_library_init=yes +else + ac_cv_lib_ssl_SSL_library_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5 +$as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; } +if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSSL 1 +_ACEOF + + LIBS="-lssl $LIBS" + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GetToken in -lUseful" >&5 -$as_echo_n "checking for GetToken in -lUseful... " >&6; } -if ${ac_cv_lib_Useful_GetToken+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_CIPHER_CTX_init in -lcrypto" >&5 +$as_echo_n "checking for EVP_CIPHER_CTX_init in -lcrypto... " >&6; } +if ${ac_cv_lib_crypto_EVP_CIPHER_CTX_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lUseful $LIBS" +LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3479,42 +3829,40 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char GetToken (); +char EVP_CIPHER_CTX_init (); int main () { -return GetToken (); +return EVP_CIPHER_CTX_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Useful_GetToken=yes + ac_cv_lib_crypto_EVP_CIPHER_CTX_init=yes else - ac_cv_lib_Useful_GetToken=no + ac_cv_lib_crypto_EVP_CIPHER_CTX_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Useful_GetToken" >&5 -$as_echo "$ac_cv_lib_Useful_GetToken" >&6; } -if test "x$ac_cv_lib_Useful_GetToken" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_CIPHER_CTX_init" >&5 +$as_echo "$ac_cv_lib_crypto_EVP_CIPHER_CTX_init" >&6; } +if test "x$ac_cv_lib_crypto_EVP_CIPHER_CTX_init" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_LIBUSEFUL 1 +#define HAVE_LIBCRYPTO 1 _ACEOF - LIBS="-lUseful $LIBS" + LIBS="-lcrypto $LIBS" fi -LUSEFUL="system" else -LUSEFUL="bundled" -STATIC_LIBS="libUseful-4/libUseful.a" + LIBUSEFUL_BUNDLED="libUseful-4/libUseful.a" -ac_aux_dir= + ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir diff --git a/configure.ac b/configure.ac index f541016..45402a5 100644 --- a/configure.ac +++ b/configure.ac @@ -6,23 +6,51 @@ AC_PROG_MAKE_SET AC_HEADER_STDC AC_SYS_LARGEFILE -AC_ARG_WITH(system-libuseful, [ --with-system-libuseful use systemwide libUseful.so rather than bundled version], cf_with_libuseful=$withval ) -if test "$cf_with_libuseful" != "no" -a "$cf_with_libuseful" != "" +AC_ARG_WITH(libuseful, [ --with-libuseful use system-wide libUseful (default=auto) ], cf_system_libuseful=$withval ) + +if test "$cf_system_libuseful" != "no" +then + AC_CHECK_LIB([Useful-5],GetToken,[cf_have_libUseful5=yes],[cf_have_libUseful5=no]) + if test "$cf_have_libUseful5" = "yes" + then + AC_CHECK_HEADERS([libUseful-5/libUseful.h]) + else + AC_CHECK_LIB([Useful-4],GetToken,[cf_have_libUseful4=yes],[cf_have_libUseful4=no]) + AC_CHECK_HEADERS([libUseful-4/libUseful.h]) + fi +fi + +if test "$cf_have_libUseful5" = "yes" then -AC_CHECK_LIB([Useful],[OpenSSLVerifyCallback], - [AC_CHECK_LIB([ssl],[SSL_new],,,[-lcrypto -lz])] - [AC_CHECK_LIB([crypto],[ERR_load_CRYPTO_strings],,,[-lz])] - [AC_CHECK_LIB([z],[inflate])] - ,,[-lssl -lcrypto -lz]) -AC_CHECK_LIB(Useful,GetToken) - -LUSEFUL="system" + echo "installed libUseful-5 found, using that instead of bundled libUseful." + echo "if you want to use bundled libUseful, force it with --with-libuseful=no" + AC_SUBST(LIBUSEFUL_BUNDLED,"") + dnl Default behavior of AC_CHECK_LIB is to add the library to the LIBS variable + dnl previous AC_CHECK_LIB don't do this, because an action is supplied for them + AC_CHECK_LIB([Useful-5],GetToken) + + dnl openssl isn't really needed, but if it exists and we're using a system-wide libUseful, then that will + dnl likely be linked against it + AC_CHECK_LIB(ssl,SSL_library_init,,) + AC_CHECK_LIB(crypto,EVP_CIPHER_CTX_init,,) +elif test "$cf_have_libUseful4" = "yes" +then + echo "installed libUseful-4 found, using that instead of bundled libUseful." + echo "if you want to use bundled libUseful, force it with --with-libuseful=no" + AC_SUBST(LIBUSEFUL_BUNDLED,"") + dnl Default behavior of AC_CHECK_LIB is to add the library to the LIBS variable + dnl previous AC_CHECK_LIB don't do this, because an action is supplied for them + AC_CHECK_LIB([Useful-4],GetToken) + + dnl openssl isn't really needed, but if it exists and we're using a system-wide libUseful, then that will + dnl likely be linked against it + AC_CHECK_LIB(ssl,SSL_library_init,,) + AC_CHECK_LIB(crypto,EVP_CIPHER_CTX_init,,) + else -LUSEFUL="bundled" -STATIC_LIBS="libUseful-4/libUseful.a" -AC_SUBST(STATIC_LIBS) -AC_CONFIG_SUBDIRS([libUseful-4]) + AC_SUBST(LIBUSEFUL_BUNDLED,"libUseful-4/libUseful.a") + AC_CONFIG_SUBDIRS([libUseful-4]) fi