From: Dennis Glatting <> Date: Wed, 12 Feb 2014 08:54:42 +0000 (-0700) Subject: Various fixes to configure for FreeBSD 10 X-Git-Tag: SQUID_3_4_4~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a5e95818616fddecc3e1ed86a53aac4416c5e4c;p=thirdparty%2Fsquid.git Various fixes to configure for FreeBSD 10 * Detect cstdio file presence for libcompat, and restrict to C++ * Fix shell syntax in Heimdal Kerberos library detection --- diff --git a/compat/stdio.h b/compat/stdio.h index 9db46782c4..a474d21f55 100644 --- a/compat/stdio.h +++ b/compat/stdio.h @@ -46,8 +46,8 @@ inline FILE * tmpfile(void) { return tmpfile64(); } #endif /* __USE_FILE_OFFSET64 && !__REDIRECT */ // Finally import the stuff we actually use -#if HAVE_CSTDIO -#include +#if HAVE_CSTDIO && defined(__cplusplus) +#include #endif #ifndef MAXPATHLEN diff --git a/configure.ac b/configure.ac index 3c2dc3ee58..6e0702b3ed 100644 --- a/configure.ac +++ b/configure.ac @@ -1876,7 +1876,7 @@ if test "x$ac_krb5_config" = "xyes" ; then CPPFLAGS="$CPPFLAGS $KRB5INCS" LIBS="$LIBS $KRB5LIBS" AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h gssapi/gssapi_krb5.h) - if test "x$ac_heimdal" == "x" ; then + if test "x$ac_heimdal" = "x" ; then AC_CHECK_HEADERS(gssapi/gssapi_generic.h) AC_CHECK_HEADERS(profile.h) fi @@ -1896,9 +1896,9 @@ if test "x$ac_krb5_config" = "xyes" ; then AC_CHECK_HEADERS(krb5.h com_err.h et/com_err.h) ac_com_error_message=no - if test "x$ac_cv_header_com_err_h" == "xyes" ; then + if test "x$ac_cv_header_com_err_h" = "xyes" ; then AC_EGREP_HEADER(error_message,com_err.h,ac_com_error_message=yes) - elif test "x$ac_cv_header_et_com_err_h" == "xyes" ; then + elif test "x$ac_cv_header_et_com_err_h" = "xyes" ; then AC_EGREP_HEADER(error_message,et/com_err.h,ac_com_error_message=yes) fi @@ -1907,11 +1907,11 @@ if test "x$ac_krb5_config" = "xyes" ; then AC_DEFINE(HAVE_MAX_SKEW_IN_KRB5_CONTEXT, 1, [Define to 1 if max_skew in struct krb5_context]) fi - if test `echo $KRB5LIBS | grep -c com_err` -ne 0 -a "x$ac_com_error_message" == "xyes" ; then + if test `echo $KRB5LIBS | grep -c com_err` -ne 0 -a "x$ac_com_error_message" = "xyes" ; then AC_CHECK_LIB(com_err,error_message, AC_DEFINE(HAVE_ERROR_MESSAGE,1, [Define to 1 if you have error_message]),) - elif test "x$ac_com_error_message" == "xyes" ; then + elif test "x$ac_com_error_message" = "xyes" ; then AC_CHECK_LIB(krb5,error_message, AC_DEFINE(HAVE_ERROR_MESSAGE,1, [Define to 1 if you have error_message]),) @@ -2212,6 +2212,7 @@ AC_CHECK_HEADERS( \ cassert \ crypt.h \ cstdarg \ + cstdio \ cstdlib \ cstring \ list \ @@ -2929,6 +2930,7 @@ case "$host" in CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9]]*//'`" fi ;; + *-sgi-irix*) AC_MSG_NOTICE([Removing -lsocket for IRIX...]) LIBS=`echo $LIBS | sed -e s/-lsocket//` @@ -2991,7 +2993,7 @@ assert(myBar != NULL); # Remove optimization for GCC 2.95.[123] # gcc -O[2] on *BSD and Linux (x86) causes pointers to magically become NULL if test "x$GCC" = "xyes"; then - GCCVER=`$CC -v 2>&1 | awk '$2 == "version" {print $3}'` + GCCVER=`$CC -v 2>&1 | awk '$2 == "version" {print $3}'` case "$GCCVER" in [2.95.[123]]) AC_MSG_NOTICE([Removing -O for gcc on $host with GCC $GCCVER])