Make Iconv optional, controlled by --enable-iconv; set package url & bugreport fields; detect OSX crypto lib (for hashes) but don't actually use it yet.

This commit is contained in:
Brian Cox 2016-06-07 01:57:00 -07:00
parent d9aa52e943
commit 704829cbd5
3 changed files with 74 additions and 22 deletions

View File

@ -12,6 +12,9 @@
/* Define to 1 if you have the <bits/signum.h> header file. */ /* Define to 1 if you have the <bits/signum.h> header file. */
#undef HAVE_BITS_SIGNUM_H #undef HAVE_BITS_SIGNUM_H
/* Define to 1 if you have the <CommonCrypto/CommonDigest.h> header file. */
#undef HAVE_COMMONCRYPTO_COMMONDIGEST_H
/* Define to 1 if you have the <fcntl.h> header file. */ /* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H #undef HAVE_FCNTL_H

65
configure vendored
View File

@ -2,6 +2,8 @@
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for tripwire 2.4.3.2. # Generated by GNU Autoconf 2.69 for tripwire 2.4.3.2.
# #
# Report bugs to <https://github.com/Tripwire/tripwire-open-source/issues>.
#
# #
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
# #
@ -264,10 +266,12 @@ fi
$as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
$as_echo "$0: be upgraded to zsh 4.3.4 or later." $as_echo "$0: be upgraded to zsh 4.3.4 or later."
else else
$as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $as_echo "$0: Please tell bug-autoconf@gnu.org and
$0: including any error possibly output before this $0: https://github.com/Tripwire/tripwire-open-source/issues
$0: message. Then install a modern shell, or manually run $0: about your system, including any error possibly output
$0: the script under such a shell if you do have one." $0: before this message. Then install a modern shell, or
$0: manually run the script under such a shell if you do
$0: have one."
fi fi
exit 1 exit 1
fi fi
@ -579,8 +583,8 @@ PACKAGE_NAME='tripwire'
PACKAGE_TARNAME='tripwire' PACKAGE_TARNAME='tripwire'
PACKAGE_VERSION='2.4.3.2' PACKAGE_VERSION='2.4.3.2'
PACKAGE_STRING='tripwire 2.4.3.2' PACKAGE_STRING='tripwire 2.4.3.2'
PACKAGE_BUGREPORT='' PACKAGE_BUGREPORT='https://github.com/Tripwire/tripwire-open-source/issues'
PACKAGE_URL='' PACKAGE_URL='https://github.com/Tripwire/tripwire-open-source'
ac_unique_file="src/tw/tw.cpp" ac_unique_file="src/tw/tw.cpp"
# Factoring default headers for most tests. # Factoring default headers for most tests.
@ -742,6 +746,7 @@ enable_silent_rules
enable_static enable_static
enable_debug enable_debug
enable_dependency_tracking enable_dependency_tracking
enable_iconv
enable_openssl enable_openssl
with_ssl_dir with_ssl_dir
' '
@ -1387,6 +1392,7 @@ Optional Features:
do not reject slow dependency extractors do not reject slow dependency extractors
--disable-dependency-tracking --disable-dependency-tracking
speeds up one-time build speeds up one-time build
--enable-iconv Use iconv for locale-independent report and db files
--disable-openssl don't link against OpenSSL libraries --disable-openssl don't link against OpenSSL libraries
Optional Packages: Optional Packages:
@ -1416,7 +1422,8 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations. it to find libraries and programs with nonstandard names/locations.
Report bugs to the package provider. Report bugs to <https://github.com/Tripwire/tripwire-open-source/issues>.
tripwire home page: <https://github.com/Tripwire/tripwire-open-source>.
_ACEOF _ACEOF
ac_status=$? ac_status=$?
fi fi
@ -1718,6 +1725,10 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} $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:${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;} $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
( $as_echo "## ---------------------------------------------------------------------- ##
## Report this to https://github.com/Tripwire/tripwire-open-source/issues ##
## ---------------------------------------------------------------------- ##"
) | sed "s/^/$as_me: WARNING: /" >&2
;; ;;
esac esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
@ -2223,6 +2234,10 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} $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:${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;} $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
( $as_echo "## ---------------------------------------------------------------------- ##
## Report this to https://github.com/Tripwire/tripwire-open-source/issues ##
## ---------------------------------------------------------------------- ##"
) | sed "s/^/$as_me: WARNING: /" >&2
;; ;;
esac esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
@ -6160,6 +6175,19 @@ fi
done done
for ac_header in CommonCrypto/CommonDigest.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "CommonCrypto/CommonDigest.h" "ac_cv_header_CommonCrypto_CommonDigest_h" "$ac_includes_default"
if test "x$ac_cv_header_CommonCrypto_CommonDigest_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_COMMONCRYPTO_COMMONDIGEST_H 1
_ACEOF
fi
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lc" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lc" >&5
$as_echo_n "checking for socket in -lc... " >&6; } $as_echo_n "checking for socket in -lc... " >&6; }
@ -6376,7 +6404,16 @@ fi
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -lc" >&5
# Check whether --enable-iconv was given.
if test "${enable_iconv+set}" = set; then :
enableval=$enable_iconv;
fi
if test "x${enable_iconv}" = xyes
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -lc" >&5
$as_echo_n "checking for iconv in -lc... " >&6; } $as_echo_n "checking for iconv in -lc... " >&6; }
if ${ac_cv_lib_c_iconv+:} false; then : if ${ac_cv_lib_c_iconv+:} false; then :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
@ -6414,7 +6451,7 @@ fi
$as_echo "$ac_cv_lib_c_iconv" >&6; } $as_echo "$ac_cv_lib_c_iconv" >&6; }
if test "x$ac_cv_lib_c_iconv" = xyes; then : if test "x$ac_cv_lib_c_iconv" = xyes; then :
for ac_header in iconv.h for ac_header in iconv.h
do : do :
ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default" ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
if test "x$ac_cv_header_iconv_h" = xyes; then : if test "x$ac_cv_header_iconv_h" = xyes; then :
@ -6429,7 +6466,7 @@ done
else else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -liconv" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -liconv" >&5
$as_echo_n "checking for iconv in -liconv... " >&6; } $as_echo_n "checking for iconv in -liconv... " >&6; }
if ${ac_cv_lib_iconv_iconv+:} false; then : if ${ac_cv_lib_iconv_iconv+:} false; then :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
@ -6467,8 +6504,8 @@ fi
$as_echo "$ac_cv_lib_iconv_iconv" >&6; } $as_echo "$ac_cv_lib_iconv_iconv" >&6; }
if test "x$ac_cv_lib_iconv_iconv" = xyes; then : if test "x$ac_cv_lib_iconv_iconv" = xyes; then :
LIBS="-liconv $LIBS" LIBS="-liconv $LIBS"
for ac_header in iconv.h for ac_header in iconv.h
do : do :
ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default" ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
if test "x$ac_cv_header_iconv_h" = xyes; then : if test "x$ac_cv_header_iconv_h" = xyes; then :
@ -6487,6 +6524,7 @@ fi
fi fi
fi
ac_ext=cpp ac_ext=cpp
@ -7686,7 +7724,8 @@ $config_headers
Configuration commands: Configuration commands:
$config_commands $config_commands
Report bugs to the package provider." Report bugs to <https://github.com/Tripwire/tripwire-open-source/issues>.
tripwire home page: <https://github.com/Tripwire/tripwire-open-source>."
_ACEOF _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1

View File

@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
dnl dnl
dnl dnl
AC_INIT([tripwire], [2.4.3.2]) AC_INIT([tripwire], [2.4.3.2], [https://github.com/Tripwire/tripwire-open-source/issues], [tripwire], [https://github.com/Tripwire/tripwire-open-source])
AC_CONFIG_SRCDIR([src/tw/tw.cpp]) AC_CONFIG_SRCDIR([src/tw/tw.cpp])
AC_CANONICAL_TARGET([]) AC_CANONICAL_TARGET([])
AM_INIT_AUTOMAKE AM_INIT_AUTOMAKE
@ -109,6 +109,9 @@ AC_CHECK_FUNCS(mkstemp mktemp, break)
dnl check for posix_fadvise dnl check for posix_fadvise
AC_CHECK_HEADERS(fcntl.h, [AC_CHECK_FUNCS(posix_fadvise)]) AC_CHECK_HEADERS(fcntl.h, [AC_CHECK_FUNCS(posix_fadvise)])
dnl check for OSX builtin hash algorithms
AC_CHECK_HEADERS(CommonCrypto/CommonDigest.h)
dnl ############################################## dnl ##############################################
dnl Checks for various platform specific libraries dnl Checks for various platform specific libraries
dnl ############################################## dnl ##############################################
@ -127,14 +130,21 @@ AC_CHECK_LIB(c, gethostbyname, [:], [
AC_CHECK_LIB(network, gethostbyname, [LIBS="-lnetwork $LIBS"] [:]) AC_CHECK_LIB(network, gethostbyname, [LIBS="-lnetwork $LIBS"] [:])
]) ]) ]) ])
dnl iconv? check the usual locations
AC_CHECK_LIB(c, iconv, [ AC_ARG_ENABLE(iconv,
AC_CHECK_HEADERS(iconv.h) [ --enable-iconv Use iconv for locale-independent report and db files])
], [
AC_CHECK_LIB(iconv, iconv, [ if test "x${enable_iconv}" = xyes
LIBS="-liconv $LIBS" then
AC_CHECK_HEADERS(iconv.h) dnl iconv? check the usual locations
], [:]) ]) AC_CHECK_LIB(c, iconv, [
AC_CHECK_HEADERS(iconv.h)
], [
AC_CHECK_LIB(iconv, iconv, [
LIBS="-liconv $LIBS"
AC_CHECK_HEADERS(iconv.h)
], [:]) ])
fi
dnl check for stl library dnl check for stl library
AC_LANG_SAVE AC_LANG_SAVE