[Opalvoip-svn] SF.net SVN: opalvoip:[20685] ptlib/trunk
Brought to you by:
csoutheren,
rjongbloed
From: <dsa...@us...> - 2008-08-18 17:26:26
|
Revision: 20685 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=20685&view=rev Author: dsandras Date: 2008-08-18 17:26:33 +0000 (Mon, 18 Aug 2008) Log Message: ----------- Improved build thanks to Mr M. Modified Paths: -------------- ptlib/trunk/configure ptlib/trunk/configure.ac ptlib/trunk/make/unix.mak Modified: ptlib/trunk/configure =================================================================== --- ptlib/trunk/configure 2008-08-18 09:21:13 UTC (rev 20684) +++ ptlib/trunk/configure 2008-08-18 17:26:33 UTC (rev 20685) @@ -651,6 +651,7 @@ host_alias target_alias subdirs +PKG_CONFIG CC CFLAGS LDFLAGS @@ -698,10 +699,13 @@ HAS_REGEX HAS_PLUGINS HAS_SAMPLES +CPP HAS_RESOLVER HAS_SASL HAS_SASL2 HAS_OPENLDAP +OPENSSL_CFLAGS +OPENSSL_LIBS HAS_OPENSSL P_STATIC_ENDLDLIBS P_STATIC_LDFLAGS @@ -717,6 +721,8 @@ HAS_SOAP HAS_TTS HAS_IPV6 +SDL_CFLAGS +SDL_LIBS HAS_SDL HAS_VIDEO HAS_VIDEO_CAPTURE @@ -754,6 +760,7 @@ ac_precious_vars='build_alias host_alias target_alias +PKG_CONFIG CC CFLAGS LDFLAGS @@ -762,7 +769,12 @@ CXX CXXFLAGS CCC -CXXCPP' +CXXCPP +CPP +OPENSSL_CFLAGS +OPENSSL_LIBS +SDL_CFLAGS +SDL_LIBS' ac_subdirs_all='plugins' # Initialize some variables set by options. @@ -1400,6 +1412,7 @@ Location of DirectX include files Some influential environment variables: + PKG_CONFIG path to pkg-config utility CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a @@ -1410,6 +1423,13 @@ CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor + CPP C preprocessor + OPENSSL_CFLAGS + C compiler flags for OPENSSL, overriding pkg-config + OPENSSL_LIBS + linker flags for OPENSSL, overriding pkg-config + SDL_CFLAGS C compiler flags for SDL, overriding pkg-config + SDL_LIBS linker flags for SDL, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1834,6 +1854,11 @@ +if test \! -e ./aclocal.m4 ; then + echo "ERROR: you must run 'aclocal' before 'autoconf'" + exit +fi + ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then @@ -1868,6 +1893,126 @@ subdirs="$subdirs plugins" + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 +echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to aut...@gn...." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to aut...@gn...." >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 +echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + PKG_CONFIG="" + fi + +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3163,10 +3308,21 @@ + + + + + + + + + + + PTLIBDIR=`pwd` -9 + if test "x$prefix" = "xNONE"; then INSTALLPREFIX="/usr/local" else @@ -6925,25 +7081,10 @@ -LIBS="" -HAS_LIBDL=no -P_DYNALINK=0 -if test ${OSTYPE} = beos ; then - P_DYNALINK=1 -cat >>confdefs.h <<\_ACEOF -#define P_DYNALINK 1 -_ACEOF -elif test ${OSTYPE} = Darwin ; then - P_DYNALINK=1 + ptlib_libdl=no -cat >>confdefs.h <<\_ACEOF -#define P_DYNALINK 1 -_ACEOF - -else - for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -7078,17 +7219,23 @@ cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - HAS_DLFCN=yes + ptlib_dlfcn=yes else - HAS_DLFCN=no + ptlib_dlfcn=no fi done - if test "$HAS_DLFCN" = yes ; then - { echo "$as_me:$LINENO: checking if dlopen is available" >&5 + if test "$ptlib_dlfcn" = yes ; then + { echo "$as_me:$LINENO: checking if dlopen is available" >&5 echo $ECHO_N "checking if dlopen is available... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF + 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 + + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -7117,31 +7264,99 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - HAS_DLOPEN=yes + ptlib_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - HAS_DLOPEN=no + ptlib_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "$HAS_DLOPEN" = no ; then - { echo "$as_me:$LINENO: result: no" >&5 + if test "$ptlib_dlopen" = no ; then + { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } - else - { echo "$as_me:$LINENO: result: yes" >&5 + else + { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } - P_DYNALINK=1 + case "$target_os" in + freebsd*|openbsd*|netbsd*|darwin*|beos*) + { echo "$as_me:$LINENO: checking for dlopen in -lc" >&5 +echo $ECHO_N "checking for dlopen in -lc... $ECHO_C" >&6; } +if test "${ac_cv_lib_c_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -cat >>confdefs.h <<\_ACEOF -#define P_DYNALINK 1 +/* 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 dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} _ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_c_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 + ac_cv_lib_c_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_c_dlopen" >&6; } +if test $ac_cv_lib_c_dlopen = yes; then + + ptlib_libdl=yes + DL_LIBS="-lc" + +else + ptlib_libdl=no +fi + + ;; + *) + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7184,7 +7399,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then @@ -7203,14 +7418,32 @@ { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then + + ptlib_libdl=yes + DL_LIBS="-ldl" + +else + ptlib_libdl=no +fi + + ;; + esac + fi + fi + if test $ptlib_libdl = yes; then HAS_LIBDL=yes else HAS_LIBDL=no fi - fi + +if test "x$HAS_LIBDL" = "xyes" ; then + +cat >>confdefs.h <<\_ACEOF +#define P_DYNALINK 1 +_ACEOF + fi -fi @@ -7230,7 +7463,7 @@ if test "${enable_plugins}" = "no" ; then { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } -elif test "${P_DYNALINK:-unset}" = "unset" ; then +elif test "x${HAS_LIBDL}" != "xyes" ; then { echo "$as_me:$LINENO: result: plugins disabled as dlopen not available" >&5 echo "${ECHO_T}plugins disabled as dlopen not available" >&6; } else @@ -7301,7 +7534,238 @@ { echo "$as_me:$LINENO: DNS resolver disabled" >&5 echo "$as_me: DNS resolver disabled" >&6;} else + 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 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +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 + + + ptlib_has_resolver=no HAS_RES_NINIT= @@ -7369,7 +7833,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then @@ -7422,7 +7886,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then @@ -7510,7 +7974,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then @@ -7561,7 +8025,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then @@ -7633,7 +8097,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then @@ -7719,7 +8183,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then @@ -7796,7 +8260,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes @@ -7835,7 +8299,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes @@ -7851,7 +8315,7 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} @@ -7976,7 +8440,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then @@ -8024,7 +8488,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then @@ -8071,7 +8535,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then HAS_INCLUDE_SASL_H=1 @@ -8110,7 +8574,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then P_HAS_SASL_SASL_H=1 @@ -8204,7 +8668,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then @@ -8294,7 +8758,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes @@ -8333,7 +8797,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes @@ -8349,7 +8813,7 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} @@ -8443,7 +8907,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then @@ -8535,7 +8999,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then @@ -8585,300 +9049,106 @@ - # Check whether --enable-openssl was given. if test "${enable_openssl+set}" = set; then - enableval=$enable_openssl; + enableval=$enable_openssl; enable_openssl=$enableval +else + enable_openssl=$default_openssl + fi -if test "${enable_openssl}z" = "z" ; then - enable_openssl=$default_openssl -fi - -HAS_OPENSSL= if test "$enable_openssl" = "no" ; then { echo "$as_me:$LINENO: OpenSSL disabled" >&5 echo "$as_me: OpenSSL disabled" >&6;} else - if test ${OPENSSLDIR:-unset} != "unset" ; then - { echo "$as_me:$LINENO: checking for ${OPENSSLDIR}/include/openssl/ssl.h" >&5 -echo $ECHO_N "checking for ${OPENSSLDIR}/include/openssl/ssl.h... $ECHO_C" >&6; } - if test -e ${OPENSSLDIR}/include/openssl/ssl.h ; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - SSLHDR=1 - SSLINCLUDEDIR="${OPENSSLDIR}/include" - SSLLIBDIR="${OPENSSLDIR}/lib" +pkg_failed=no +{ echo "$as_me:$LINENO: checking for OPENSSL" >&5 +echo $ECHO_N "checking for OPENSSL... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$OPENSSL_CFLAGS"; then + pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS" else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - - - if test "${SSLHDR:-unset}" = "unset" ; then - -for ac_header in openssl/ssl.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"openssl\"") >&5 + ($PKG_CONFIG --exists --print-errors "openssl") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + (exit $ac_status); }; then + pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null` else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + pkg_failed=yes fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$OPENSSL_LIBS"; then + pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"openssl\"") >&5 + ($PKG_CONFIG --exists --print-errors "openssl") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + (exit $ac_status); }; then + pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 2>/dev/null` else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + pkg_failed=yes fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + fi else - eval "$as_ac_Header=\$ac_header_preproc" + pkg_failed=untried fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - SSLHDR=1 -fi -done - if test "${SSLHDR:-unset}" = "unset" ; then - { echo "$as_me:$LINENO: checking if openssl/ssl.h works with OPENSSL_NO_KRB5" >&5 -echo $ECHO_N "checking if openssl/ssl.h works with OPENSSL_NO_KRB5... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF -#define OPENSSL_NO_KRB5 -#include <openssl/ssl.h> -int main(int argc,char **argv){} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - SSLHDR=1 +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - + _pkg_short_errors_supported=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "${SSLHDR:-unset}" != "unset" ; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - SSLCCFLAGS=" -DOPENSSL_NO_KRB5" - P_STATIC_LDFLAGS="$P_STATIC_LDFLAGS -L/usr/kerberos/lib" - if test ${OSTYPE} = linux ; then - P_STATIC_ENDLDLIBS="-lkrb5 -lk5crypto -lcom_err" + if test $_pkg_short_errors_supported = yes; then + OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "openssl"` + else + OPENSSL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "openssl"` fi - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - fi + # Put the nasty error message in config.log where it belongs + echo "$OPENSSL_PKG_ERRORS" >&5 - if test "${SSLHDR:-unset}" = "unset" ; then - - for openssl_dir in /usr/local/openssl /usr/local/ssl ; do - { echo "$as_me:$LINENO: checking for OpenSSL in $openssl_dir" >&5 -echo $ECHO_N "checking for OpenSSL in $openssl_dir... $ECHO_C" >&6; } - if test ! -f ${openssl_dir}/include/openssl/ssl.h ; then - { echo "$as_me:$LINENO: result: no" >&5 + { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } - else - cat >conftest.$ac_ext <<_ACEOF -#include "${openssl_dir}/include/openssl/ssl.h" -int main(int argc,char **argv){ return 0; } -_ACEOF - $CXX $CXXFLAGS -I${openssl_dir}/include -c conftest.$ac_ext > /dev/null 2>&1 - if test $? = 0 ; then - { echo "$as_me:$LINENO: result: yes" >&5 + HAS_OPENSSL= +elif test $pkg_failed = untried; then + HAS_OPENSSL= +else + OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS + OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } - SSLHDR=1 - SSLCCFLAGS="" - SSLINCLUDEDIR="${openssl_dir}/include" - SSLLIBDIR="${openssl_dir}/lib" - break - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - { echo "$as_me:$LINENO: checking if ${openssl_dir}/include/openssl/ssl.h works with OPENSSL_NO_KRB5..." >&5 -echo $ECHO_N "checking if ${openssl_dir}/include/openssl/ssl.h works with OPENSSL_NO_KRB5...... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF -#define OPENSSL_NO_KRB5 -#include "${openssl_dir}/include/openssl/ssl.h" -int main(int argc,char **argv){} -_ACEOF - $CXX $CXXFLAGS -I${openssl_dir}/openssl/include -c conftest.$ac_ext > /dev/null 2>&1 - if test $? = 0 ; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - SSLHDR=1 - SSLCCFLAGS=" -DOPENSSL_NO_KRB5" - SSLINCLUDEDIR="${openssl_dir}/include" - SSLLIBDIR="${openssl_dir}/lib" - P_STATIC_LDFLAGS="$P_STATIC_LDFLAGS -L/usr/kerberos/lib" - if test ${OSTYPE} = linux ; then - P_STATIC_ENDLDLIBS="-lkrb5 -lk5crypto -lcom_err" - fi - break - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - fi - fi - done - fi - if test ${SSLHDR:-unset} != "unset" ; then + HAS_OPENSSL=1 cat >>confdefs.h <<\_ACEOF #define P_OSSL 1 _ACEOF - HAS_OPENSSL=1 - if test ${SSLINCLUDEDIR:-unset} != "unset" ; then - STDCCFLAGS="$STDCCFLAGS -I${SSLINCLUDEDIR}" - fi - if test ${SSLLIBDIR:-unset} != "unset" ; then - LDFLAGS="$LDFLAGS -L${SSLLIBDIR}" - fi - STDCCFLAGS="${STDCCFLAGS}${SSLCCFLAGS}" - ENDLDLIBS="$ENDLDLIBS -lssl -lcrypto" + ptlib_openssl_aes=no + old_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $OPENSSL_CFLAGS" + 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 + for ac_header in openssl/aes.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -8918,7 +9188,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes @@ -8957,7 +9227,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes @@ -8973,7 +9243,7 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} @@ -9013,24 +9283,40 @@ cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - HAS_SSL_AES=yes -else - HAS_SSL_AES=no + ptlib_openssl_aes=yes fi done - if test "$HAS_SSL_AES" = yes ; then + 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 + CFLAGS="${old_CFLAGS}" + if test $ptlib_openssl_aes = yes; then + cat >>confdefs.h <<\_ACEOF #define P_OSSL_AES 1 _ACEOF - fi +fi - { echo "$as_me:$LINENO: checking for const arg to d2i_AutoPrivateKey" >&5 + + + ptlib_openssl_const=no + old_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $OPENSSL_CFLAGS" + 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 + + { echo "$as_me:$LINENO: checking for const arg to d2i_AutoPrivateKey" >&5 echo $ECHO_N "checking for const arg to d2i_AutoPrivateKey... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -9040,9 +9326,10 @@ int main () { - EVP_PKEY **a; const unsigned char **p; long l; - d2i_AutoPrivateKey(a, p, l); + EVP_PKEY **a; const unsigned char **p; long l; + d2i_AutoPrivateKey(a, p, l); + ; return 0; } @@ -9061,10 +9348,11 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - P_SSL_USE_CONST=yes + ptlib_openssl_const=yes + else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -9073,28 +9361,39 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "${P_SSL_USE_CONST}x" = "x" ; then - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - else - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { echo "$as_me:$LINENO: result: ${ptlib_openssl_const}" >&5 +echo "${ECHO_T}${ptlib_openssl_const}" >&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 + CFLAGS="${old_CFLAGS}" + + if test $ptlib_openssl_const = yes; then + cat >>confdefs.h <<\_ACEOF #define P_SSL_USE_CONST 1 _ACEOF - fi - fi fi + STDCCFLAGS="$STDCCFLAGS ${OPENSSL_CFLAGS}" + ENDLDLIBS="$ENDLDLIBS ${OPENSSL_LIBS}" +fi +fi + + + + # Check whether --enable-configfile was given. if test "${enable_configfile+set}" = set; then enableval=$enable_configfile; @@ -10125,397 +10424,146 @@ # Check whether --enable-sdl was given. if test "${enable_sdl+set}" = set; then - enableval=$enable_sdl; + enableval=$enable_sdl; enable_sdl=$enableval +else + enable_sdl=$default_sdl + fi -if test "${enable_sdl}z" = "z" ; then - enable_sdl=$default_sdl -fi - HAS_SDL= if test "$enable_sdl" = "no" ; then { echo "$as_me:$LINENO: SDL disabled" >&5 echo "$as_me: SDL disabled" >&6;} - cat >>confdefs.h <<\_ACEOF -#define P_SDL 0 -_ACEOF - else - if test "${SDLLIB:-unset}" = "unset" ; then - SDLLIB=SDL - fi -for ac_header in SDL/SDL.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +pkg_failed=no +{ echo "$as_me:$LINENO: checking for SDL" >&5 +echo $ECHO_N "checking for SDL... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$SDL_CFLAGS"; then + pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"sdl\"") >&5 + ($PKG_CONFIG --exists --print-errors "sdl") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + (exit $ac_status); }; then + pkg_cv_SDL_CFLAGS=`$PKG_CONFIG --cflags "sdl" 2>/dev/null` else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + pkg_failed=yes fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$SDL_LIBS"; then + pkg_cv_SDL_LIBS="$SDL_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"sdl\"") >&5 + ($PKG_CONFIG --exists --print-errors "sdl") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + (exit $ac_status); }; then + pkg_cv_SDL_LIBS=`$PKG_CONFIG --libs "sdl" 2>/dev/null` else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + pkg_failed=yes fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + fi else - eval "$as_ac_Header=\$ac_header_preproc" + pkg_failed=untried fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - HAS_SDL=1 -fi -done - if test "${HAS_SDL:-unset}" != "unset" ; then - if test "${X11LIBDIR:-unset}" == "unset" ; then - X11LIBDIR=/usr/X11R6/lib - fi - { echo "$as_me:$LINENO: checking for SDL_CreateYUVOverlay in -lSDL" >&5 -echo $ECHO_N "checking for SDL_CreateYUVOverlay in -lSDL... $ECHO_C" >&6; } -if test "${ac_cv_lib_SDL_SDL_CreateYUVOverlay+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lSDL -L${X11LIBDIR} -lpthread -lX11 -lXext $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +if test $pkg_failed = yes; then -/* 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 SDL_CreateYUVOverlay (); -int -main () -{ -return SDL_CreateYUVOverlay (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_SDL_SDL_CreateYUVOverlay=yes +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_SDL_SDL_CreateYUVOverlay=no + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "sdl"` + else + SDL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "sdl"` + fi + # Put the nasty error message in config.log where it belongs + echo "$SDL_PKG_ERRORS" >&5 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_SDL_CreateYUVOverlay" >&5 -echo "${ECHO_T}$ac_cv_lib_SDL_SDL_CreateYUVOverlay" >&6; } -if test $ac_cv_lib_SDL_SDL_CreateYUVOverlay = yes; then - HAS_SDL=1 -else - HAS_SDL= -fi + { { echo "$as_me:$LINENO: error: Package requirements (sdl) were not met: - fi +$SDL_PKG_ERRORS - if test "${HAS_SDL:-unset}" = "unset" ; then - if test "${ac_cv_header_SDL11_SDL_h+set}" = set; then - { echo "$as_me:$LINENO: checking for SDL11/SDL.h" >&5 -echo $ECHO_N "checking for SDL11/SDL.h... $ECHO_C" >&6; } -if test "${ac_cv_header_SDL11_SDL_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_SDL11_SDL_h" >&5 -echo "${ECHO_T}$ac_cv_header_SDL11_SDL_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking SDL11/SDL.h usability" >&5 -echo $ECHO_N "checking SDL11/SDL.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <SDL11/SDL.h> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - ac_header_compiler=no -fi +Alternatively, you may set the environment variables SDL_CFLAGS +and SDL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (sdl) were not met: -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +$SDL_PKG_ERRORS -# Is the header present? -{ echo "$as_me:$LINENO: checking SDL11/SDL.h presence" >&5 -echo $ECHO_N "checking SDL11/SDL.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <SDL11/SDL.h> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - ac_header_preproc=no -fi +Alternatively, you may set the environment variables SDL_CFLAGS +and SDL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +Alternatively, you may set the environment variables SDL_CFLAGS +and SDL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: SDL11/SDL.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: SDL11/SDL.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: SDL11/SDL.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: SDL11/SDL.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: SDL11/SDL.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: SDL11/SDL.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: SDL11/SDL.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: SDL11/SDL.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: SDL11/SDL.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: SDL11/SDL.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: SDL11/SDL.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: SDL11/SDL.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: SDL11/SDL.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: SDL11/SDL.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: SDL11/SDL.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: SDL11/SDL.h: in the future, the compiler will take precedence" >&2;} +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. - ;; -esac -{ echo "$as_me:$LINENO: checking for SDL11/SDL.h" >&5 -echo $ECHO_N "checking for SDL11/SDL.h... $ECHO_C" >&6; } -if test "${ac_cv_header_SDL11_SDL_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +Alternatively, you may set the environment variables SDL_CFLAGS +and SDL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } else - ac_cv_header_SDL11_SDL_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_SDL11_SDL_h" >&5 -echo "${ECHO_T}$ac_cv_header_SDL11_SDL_h" >&6; } + SDL_CFLAGS=$pkg_cv_SDL_CFLAGS + SDL_LIBS=$pkg_cv_SDL_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } -fi -if test $ac_cv_header_SDL11_SDL_h = yes; then - HAS_SDL=1 -fi + HAS_SDL=1 - - if test "${HAS_SDL:-unset}" != "unset" ; then - SDLLIB=SDL-1.1 - fi - fi - - if test "${HAS_SDL:-unset}" != "unset" ; then - HAS_SDL=1 - cat >>confdefs.h <<\_ACEOF #define P_SDL 1 _ACEOF - if test ${SDLINCLUDEDIR:-unset} != "unset" ; then - STDCCFLAGS="$STDCCFLAGS -I${SDLINCLUDEDIR}" - fi - if test ${SDLLIBDIR:-unset} != "unset" ; then - LDFLAGS="$LDFLAGS -L${SDLLIBDIR}" - fi - ENDLDLIBS="$ENDLDLIBS -l${SDLLIB}" - fi + STDCCFLAGS="$STDCCFLAGS ${SDL_CFLAGS}" + ENDLDLIBS="$ENDLDLIBS ${SDL_LIBS}" + fi +fi + # Check whether --enable-video was given. if test "${enable_video+set}" = set; then enableval=$enable_video; @@ -13220,14 +13268,13 @@ if test "${HAS_RESOLVER:-unset}" != "unset" ; then if test "${RESOLVER_LIBS:-unset}" != "unset" ; then - ENDLDLIBS="$ENDLDLIBS $RESOLVER_LIBS" + ENDLDLIBS="$ENDLDLIBS ${RESOLVER_LIBS}" fi fi -if test "${OSTYPE}" != "Darwin" ; then - if test ${HAS_LIBDL} = yes ; then - ENDLDLIBS="$ENDLDLIBS -ldl" - fi +if test "x${HAS_LIBDL}" = "xyes" ; then + ENDLDLIBS="$ENDLDLIBS $DL_LIBS" + STDCCFLAGS="$STDCCFLAGS $DL_CFLAGS" fi @@ -14013,6 +14060,7 @@ host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim subdirs!$subdirs$ac_delim +PKG_CONFIG!$PKG_CONFIG$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim @@ -14060,18 +14108,17 @@ HAS_REGEX!$HAS_REGEX$ac_delim HAS_PLUGINS!$HAS_PLUGINS$ac_delim HAS_SAMPLES!$HAS_SAMPLES$ac_delim +CPP!$CPP$ac_delim HAS_RESOLVER!$HAS_RESOLVER$ac_delim HAS_SASL!$HAS_SASL$ac_delim HAS_SASL2!$HAS_SASL2$ac_delim HAS_OPENLDAP!$HAS_OPENLDAP$ac_delim +OPENSSL_CFLAGS!$OPENSSL_CFLAGS$ac_delim +OPENSSL_LIBS!$OPENSSL_LIBS$ac_delim HAS_OPENSSL!$HAS_OPENSSL$ac_delim P_STATIC_ENDLDLIBS!$P_STATIC_ENDLDLIBS$ac_delim P_STATIC_LDFLAGS!$P_STATIC_LDFLAGS$ac_delim HAS_CONFIG_FILE!$HAS_CONFIG_FILE$ac_delim -HAS_URL!$HAS_URL$ac_delim -HAS_HTTP!$HAS_HTTP$ac_delim -HAS_HTTPFORMS!$HAS_HTTPFORMS$ac_delim -HAS_HTTPSVC!$HAS_HTTPSVC$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -14113,6 +14160,10 @@ ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +HAS_URL!$HAS_URL$ac_delim +HAS_HTTP!$HAS_HTTP$ac_delim +HAS_HTTPFORMS!$HAS_HTTPFORMS$ac_delim +HAS_HTTPSVC!$HAS_HTTPSVC$ac_delim HAS_EXP... [truncated message content] |