LDFLAGS
CFLAGS
CC
-DARWIN_CFLAGS
-XCODEBUILD
-SW_VERS
target_os
target_vendor
target_cpu
program_prefix=${target_alias}-
-case "$host" in
- *-darwin*)
- LDFLAGS="-L/usr/local/lib -L/usr/lib"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if cc is apple llvm" >&5
-$as_echo_n "checking if cc is apple llvm... " >&6; }
- if ! $CC --version 2>&1 | grep -I 'Apple LLVM' > /dev/null; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- # Extract the first word of "sw_vers", so it can be a program name with args.
-set dummy sw_vers; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_SW_VERS+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$SW_VERS"; then
- ac_cv_prog_SW_VERS="$SW_VERS" # Let the user override the test.
-else
-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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_SW_VERS="yes"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_prog_SW_VERS" && ac_cv_prog_SW_VERS="no"
-fi
-fi
-SW_VERS=$ac_cv_prog_SW_VERS
-if test -n "$SW_VERS"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SW_VERS" >&5
-$as_echo "$SW_VERS" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- # Extract the first word of "xcodebuild", so it can be a program name with args.
-set dummy xcodebuild; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_XCODEBUILD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$XCODEBUILD"; then
- ac_cv_prog_XCODEBUILD="$XCODEBUILD" # Let the user override the test.
-else
-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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_XCODEBUILD="yes"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_prog_XCODEBUILD" && ac_cv_prog_XCODEBUILD="no"
-fi
-fi
-XCODEBUILD=$ac_cv_prog_XCODEBUILD
-if test -n "$XCODEBUILD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
-$as_echo "$XCODEBUILD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
- if test "x$SW_VERS" = "xyes" && test "x$XCODEBUILD" = "xyes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: determining OSX SDK path" >&5
-$as_echo "$as_me: determining OSX SDK path" >&6;}
- osx_sdk_path=$(xcodebuild -version -sdk macosx$(sw_vers -productVersion | egrep -o '^[0-9]+\.[0-9]+') Path)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $osx_sdk_path" >&5
-$as_echo "$osx_sdk_path" >&6; }
-
- export CFLAGS="$CFLAGS --sysroot=$osx_sdk_path"
- export LDFLAGS="$LDFLAGS -L$osx_sdk_path/usr/lib/"
- DARWIN_CFLAGS="--sysroot=$osx_sdk_path"
-
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- fi
- ;;
-esac
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
if test "x$GCC" = "xyes"; then
- CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE"
+ CFLAGS="$CFLAGS -Wall -std=c99 -D_GNU_SOURCE"
fi
ac_safe=`echo "talloc.h" | sed 'y%./+-%__pm%'`
old_CPPFLAGS="$CPPFLAGS"
smart_include=
-smart_include_dir=
+smart_include_dir="/usr/local/include /opt/include"
-if test "x$smart_try_dir" != "x"; then
- for try in $smart_try_dir; do
+_smart_try_dir=
+_smart_include_dir=
+
+for _prefix in $smart_prefix ""; do
+ for _dir in $smart_try_dir; do
+ _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
+ done
+
+ for _dir in $smart_include_dir; do
+ _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
+ done
+done
+
+if test "x$_smart_try_dir" != "x"; then
+ for try in $_smart_try_dir; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc.h in $try" >&5
$as_echo_n "checking for talloc.h in $try... " >&6; }
CPPFLAGS="-isystem $try $old_CPPFLAGS"
fi
if test "x$smart_include" = "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc.h" >&5
+ for _prefix in $smart_prefix; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/talloc.h" >&5
+$as_echo_n "checking for ${_prefix}/talloc.h... " >&6; }
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <talloc.h>
+int
+main ()
+{
+int a = 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ smart_include="-isystem ${_prefix}/"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ break
+
+else
+
+ smart_include=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+fi
+
+if test "x$smart_include" = "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc.h" >&5
$as_echo_n "checking for talloc.h... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <talloc.h>
+ #include <talloc.h>
int
main ()
{
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- smart_include=" "
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ smart_include=" "
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- break
+ break
else
- smart_include=
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ smart_include=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$smart_include" = "x"; then
+ for prefix in $smart_prefix; do
+
+
+if test "x$LOCATE" != "x"; then
+ DIRS=
+ file="${_prefix}/${1}"
+
+ for x in `${LOCATE} $file 2>/dev/null`; do
+ base=`echo $x | sed "s%/${file}%%"`
+ if test "x$x" = "x$base"; then
+ continue;
+ fi
+
+ dir=`${DIRNAME} $x 2>/dev/null`
+ exclude=`echo ${dir} | ${GREP} /home`
+ if test "x$exclude" != "x"; then
+ continue
+ fi
+
+ already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
+ if test "x$already" = "x"; then
+ DIRS="$DIRS $dir"
+ fi
+ done
+fi
+
+eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
+
+ done
+
if test "x$LOCATE" != "x"; then
DIRS=
continue
fi
- already=`echo \$smart_include_dir ${DIRS} | ${GREP} ${dir}`
+ already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
if test "x$already" = "x"; then
DIRS="$DIRS $dir"
fi
done
fi
-eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
+eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
+
- for try in $smart_include_dir /usr/local/include /opt/include; do
+ for try in $_smart_include_dir; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc.h in $try" >&5
$as_echo_n "checking for talloc.h in $try... " >&6; }
CPPFLAGS="-isystem $try $old_CPPFLAGS"
SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
fi
+smart_prefix=
+
if test "x$ac_cv_header_talloc_h" != "xyes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: talloc headers not found. Use --with-talloc-include-dir=<path>." >&5
$as_echo "$as_me: WARNING: talloc headers not found. Use --with-talloc-include-dir=<path>." >&2;}
fnmatch.h \
sia.h \
siad.h \
- features.h
+ features.h \
+ limits.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_safe=`echo "openssl/ssl.h" | sed 'y%./+-%__pm%'`
old_CPPFLAGS="$CPPFLAGS"
smart_include=
-smart_include_dir=
+smart_include_dir="/usr/local/include /opt/include"
-if test "x$smart_try_dir" != "x"; then
- for try in $smart_try_dir; do
+_smart_try_dir=
+_smart_include_dir=
+
+for _prefix in $smart_prefix ""; do
+ for _dir in $smart_try_dir; do
+ _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
+ done
+
+ for _dir in $smart_include_dir; do
+ _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
+ done
+done
+
+if test "x$_smart_try_dir" != "x"; then
+ for try in $_smart_try_dir; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $try" >&5
$as_echo_n "checking for openssl/ssl.h in $try... " >&6; }
CPPFLAGS="-isystem $try $old_CPPFLAGS"
fi
if test "x$smart_include" = "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h" >&5
+ for _prefix in $smart_prefix; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/openssl/ssl.h" >&5
+$as_echo_n "checking for ${_prefix}/openssl/ssl.h... " >&6; }
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <openssl/ssl.h>
+int
+main ()
+{
+int a = 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ smart_include="-isystem ${_prefix}/"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ break
+
+else
+
+ smart_include=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+fi
+
+if test "x$smart_include" = "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h" >&5
$as_echo_n "checking for openssl/ssl.h... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <openssl/ssl.h>
+ #include <openssl/ssl.h>
int
main ()
{
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- smart_include=" "
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ smart_include=" "
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- break
+ break
else
- smart_include=
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ smart_include=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$smart_include" = "x"; then
+ for prefix in $smart_prefix; do
+
+
+if test "x$LOCATE" != "x"; then
+ DIRS=
+ file="${_prefix}/${1}"
+
+ for x in `${LOCATE} $file 2>/dev/null`; do
+ base=`echo $x | sed "s%/${file}%%"`
+ if test "x$x" = "x$base"; then
+ continue;
+ fi
+
+ dir=`${DIRNAME} $x 2>/dev/null`
+ exclude=`echo ${dir} | ${GREP} /home`
+ if test "x$exclude" != "x"; then
+ continue
+ fi
+
+ already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
+ if test "x$already" = "x"; then
+ DIRS="$DIRS $dir"
+ fi
+ done
+fi
+
+eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
+
+ done
+
if test "x$LOCATE" != "x"; then
DIRS=
continue
fi
- already=`echo \$smart_include_dir ${DIRS} | ${GREP} ${dir}`
+ already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
if test "x$already" = "x"; then
DIRS="$DIRS $dir"
fi
done
fi
-eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
+eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
- for try in $smart_include_dir /usr/local/include /opt/include; do
+
+ for try in $_smart_include_dir; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $try" >&5
$as_echo_n "checking for openssl/ssl.h in $try... " >&6; }
CPPFLAGS="-isystem $try $old_CPPFLAGS"
SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
fi
+smart_prefix=
+
if test "x$ac_cv_header_openssl_ssl_h" = "xyes"; then
$as_echo "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h
ac_safe=`echo "pcap.h" | sed 'y%./+-%__pm%'`
old_CPPFLAGS="$CPPFLAGS"
smart_include=
-smart_include_dir=
+smart_include_dir="/usr/local/include /opt/include"
-if test "x$smart_try_dir" != "x"; then
- for try in $smart_try_dir; do
+_smart_try_dir=
+_smart_include_dir=
+
+for _prefix in $smart_prefix ""; do
+ for _dir in $smart_try_dir; do
+ _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
+ done
+
+ for _dir in $smart_include_dir; do
+ _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
+ done
+done
+
+if test "x$_smart_try_dir" != "x"; then
+ for try in $_smart_try_dir; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap.h in $try" >&5
$as_echo_n "checking for pcap.h in $try... " >&6; }
CPPFLAGS="-isystem $try $old_CPPFLAGS"
fi
if test "x$smart_include" = "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap.h" >&5
-$as_echo_n "checking for pcap.h... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ for _prefix in $smart_prefix; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/pcap.h" >&5
+$as_echo_n "checking for ${_prefix}/pcap.h... " >&6; }
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <pcap.h>
+ #include <pcap.h>
int
main ()
{
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- smart_include=" "
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ smart_include="-isystem ${_prefix}/"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- break
+ break
else
- smart_include=
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ smart_include=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
fi
if test "x$smart_include" = "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap.h" >&5
+$as_echo_n "checking for pcap.h... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-if test "x$LOCATE" != "x"; then
- DIRS=
- file=pcap.h
+ #include <pcap.h>
+int
+main ()
+{
+int a = 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
- for x in `${LOCATE} $file 2>/dev/null`; do
- base=`echo $x | sed "s%/${file}%%"`
+ smart_include=" "
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ break
+
+else
+
+ smart_include=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+if test "x$smart_include" = "x"; then
+
+ for prefix in $smart_prefix; do
+
+
+if test "x$LOCATE" != "x"; then
+ DIRS=
+ file="${_prefix}/${1}"
+
+ for x in `${LOCATE} $file 2>/dev/null`; do
+ base=`echo $x | sed "s%/${file}%%"`
+ if test "x$x" = "x$base"; then
+ continue;
+ fi
+
+ dir=`${DIRNAME} $x 2>/dev/null`
+ exclude=`echo ${dir} | ${GREP} /home`
+ if test "x$exclude" != "x"; then
+ continue
+ fi
+
+ already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
+ if test "x$already" = "x"; then
+ DIRS="$DIRS $dir"
+ fi
+ done
+fi
+
+eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
+
+ done
+
+
+if test "x$LOCATE" != "x"; then
+ DIRS=
+ file=pcap.h
+
+ for x in `${LOCATE} $file 2>/dev/null`; do
+ base=`echo $x | sed "s%/${file}%%"`
if test "x$x" = "x$base"; then
continue;
fi
continue
fi
- already=`echo \$smart_include_dir ${DIRS} | ${GREP} ${dir}`
+ already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
if test "x$already" = "x"; then
DIRS="$DIRS $dir"
fi
done
fi
-eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
+eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
+
- for try in $smart_include_dir /usr/local/include /opt/include; do
+ for try in $_smart_include_dir; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap.h in $try" >&5
$as_echo_n "checking for pcap.h in $try... " >&6; }
CPPFLAGS="-isystem $try $old_CPPFLAGS"
SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
fi
+smart_prefix=
+
if test "x$ac_cv_header_pcap_h" == "xyes"; then
$as_echo "#define HAVE_PCAP_H 1" >>confdefs.h
ac_safe=`echo "collectd/client.h" | sed 'y%./+-%__pm%'`
old_CPPFLAGS="$CPPFLAGS"
smart_include=
-smart_include_dir=
+smart_include_dir="/usr/local/include /opt/include"
-if test "x$smart_try_dir" != "x"; then
- for try in $smart_try_dir; do
+_smart_try_dir=
+_smart_include_dir=
+
+for _prefix in $smart_prefix ""; do
+ for _dir in $smart_try_dir; do
+ _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
+ done
+
+ for _dir in $smart_include_dir; do
+ _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
+ done
+done
+
+if test "x$_smart_try_dir" != "x"; then
+ for try in $_smart_try_dir; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h in $try" >&5
$as_echo_n "checking for collectd/client.h in $try... " >&6; }
CPPFLAGS="-isystem $try $old_CPPFLAGS"
fi
if test "x$smart_include" = "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h" >&5
+ for _prefix in $smart_prefix; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/collectd/client.h" >&5
+$as_echo_n "checking for ${_prefix}/collectd/client.h... " >&6; }
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <collectd/client.h>
+int
+main ()
+{
+int a = 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ smart_include="-isystem ${_prefix}/"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ break
+
+else
+
+ smart_include=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+fi
+
+if test "x$smart_include" = "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h" >&5
$as_echo_n "checking for collectd/client.h... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <collectd/client.h>
+ #include <collectd/client.h>
int
main ()
{
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- smart_include=" "
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ smart_include=" "
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- break
+ break
else
- smart_include=
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ smart_include=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$smart_include" = "x"; then
+ for prefix in $smart_prefix; do
+
+
+if test "x$LOCATE" != "x"; then
+ DIRS=
+ file="${_prefix}/${1}"
+
+ for x in `${LOCATE} $file 2>/dev/null`; do
+ base=`echo $x | sed "s%/${file}%%"`
+ if test "x$x" = "x$base"; then
+ continue;
+ fi
+
+ dir=`${DIRNAME} $x 2>/dev/null`
+ exclude=`echo ${dir} | ${GREP} /home`
+ if test "x$exclude" != "x"; then
+ continue
+ fi
+
+ already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
+ if test "x$already" = "x"; then
+ DIRS="$DIRS $dir"
+ fi
+ done
+fi
+
+eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
+
+ done
+
if test "x$LOCATE" != "x"; then
DIRS=
continue
fi
- already=`echo \$smart_include_dir ${DIRS} | ${GREP} ${dir}`
+ already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
if test "x$already" = "x"; then
DIRS="$DIRS $dir"
fi
done
fi
-eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
+eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
- for try in $smart_include_dir /usr/local/include /opt/include; do
+
+ for try in $_smart_include_dir; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for collectd/client.h in $try" >&5
$as_echo_n "checking for collectd/client.h in $try... " >&6; }
CPPFLAGS="-isystem $try $old_CPPFLAGS"
SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
fi
+smart_prefix=
+
if test "x$ac_cv_header_collectd_client_h" == "xyes"; then
$as_echo "#define HAVE_COLLECTDC_H 1" >>confdefs.h
fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sig_t" >&5
-$as_echo_n "checking for sig_t... " >&6; }
-if ${ac_cv_type_sig_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_type_sig_t=no
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef HAVE_SIGNAL_H
- # include <signal.h>
- #endif
-
-int
-main ()
-{
-sig_t foo
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_type_sig_t=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_sig_t" >&5
-$as_echo "$ac_cv_type_sig_t" >&6; }
-
- if test "$ac_cv_type_sig_t" != "yes"; then
-
-$as_echo "#define sig_t void(*sig_t)(int)" >>confdefs.h
-
- fi
-
-
ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
if test "x$ac_cv_type___uint128_t" = xyes; then :
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sig_t is defined" >&5
+$as_echo_n "checking if sig_t is defined... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #ifdef HAVE_SIGNAL_H
+ # include <signal.h>
+ #endif
+
+int
+main ()
+{
+
+ sig_t func;
+ return 0;
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_SIG_T 1" >>confdefs.h
+
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
for ac_func in \
getopt_long \
fcntl \
inet_aton \
inet_pton \
inet_ntop \
+ mallopt \
setlinebuf \
setvbuf \
getusershell \
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if htonll is defined" >&5
+$as_echo_n "checking if htonll is defined... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <sys/types.h>
+ #include <netinet/in.h>
+
+int
+main ()
+{
+
+ return htonll(0);
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_HTONLL 1" >>confdefs.h
+
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if htonlll is defined" >&5
+$as_echo_n "checking if htonlll is defined... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <sys/types.h>
+ #include <netinet/in.h>
+
+int
+main ()
+{
+
+ return htonlll(0);
+
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_HTONLLL 1" >>confdefs.h
+
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc_set_memlimit in -ltalloc" >&5
-$as_echo_n "checking for talloc_set_memlimit in -ltalloc... " >&6; }
-if ${ac_cv_lib_talloc_talloc_set_memlimit+:} false; then :
- $as_echo_n "(cached) " >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_choose_expr support in compiler" >&5
+$as_echo_n "checking for __builtin_choose_expr support in compiler... " >&6; }
+ if test "$cross_compiling" = yes; then :
+ have_builtin_choose_expr=no
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltalloc $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
+ int main(int argc, char **argv) {
+ return __builtin_choose_expr(0, 1, 0);
+ }
+
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ have_builtin_choose_expr=yes
+else
+ have_builtin_choose_expr=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_choose_expr" >&5
+$as_echo "$have_builtin_choose_expr" >&6; }
+ if test "x$have_builtin_choose_expr" = "xyes"; then
+
+$as_echo "#define HAVE_BUILTIN_CHOOSE_EXPR 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p support in compiler" >&5
+$as_echo_n "checking for __builtin_types_compatible_p support in compiler... " >&6; }
+ if test "$cross_compiling" = yes; then :
+ have_builtin_types_compatible_p=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int main(int argc, char **argv) {
+ return !(__builtin_types_compatible_p(char *, char *));
+ }
+
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ have_builtin_types_compatible_p=yes
+else
+ have_builtin_types_compatible_p=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_types_compatible_p" >&5
+$as_echo "$have_builtin_types_compatible_p" >&6; }
+ if test "x$have_builtin_types_compatible_p" = "xyes"; then
+
+$as_echo "#define HAVE_BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64 support in compiler" >&5
+$as_echo_n "checking for __builtin_bswap64 support in compiler... " >&6; }
+ if test "$cross_compiling" = yes; then :
+ have_builtin_bswap64=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int main(int argc, char **argv) {
+ return (__builtin_bswap64(0));
+ }
+
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ have_builtin_bswap64=yes
+else
+ have_builtin_bswap64=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_bswap64" >&5
+$as_echo "$have_builtin_bswap64" >&6; }
+ if test "x$have_builtin_bswap64" = "xyes"; then
+
+$as_echo "#define HAVE_BUILTIN_BSWAP_64 1" >>confdefs.h
+
+ fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc_set_memlimit in -ltalloc" >&5
+$as_echo_n "checking for talloc_set_memlimit in -ltalloc... " >&6; }
+if ${ac_cv_lib_talloc_talloc_set_memlimit+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltalloc $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
ac_safe=`echo "execinfo.h" | sed 'y%./+-%__pm%'`
old_CPPFLAGS="$CPPFLAGS"
smart_include=
-smart_include_dir=
+smart_include_dir="/usr/local/include /opt/include"
-if test "x$smart_try_dir" != "x"; then
- for try in $smart_try_dir; do
+_smart_try_dir=
+_smart_include_dir=
+
+for _prefix in $smart_prefix ""; do
+ for _dir in $smart_try_dir; do
+ _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
+ done
+
+ for _dir in $smart_include_dir; do
+ _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
+ done
+done
+
+if test "x$_smart_try_dir" != "x"; then
+ for try in $_smart_try_dir; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for execinfo.h in $try" >&5
$as_echo_n "checking for execinfo.h in $try... " >&6; }
CPPFLAGS="-isystem $try $old_CPPFLAGS"
fi
if test "x$smart_include" = "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for execinfo.h" >&5
+ for _prefix in $smart_prefix; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/execinfo.h" >&5
+$as_echo_n "checking for ${_prefix}/execinfo.h... " >&6; }
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <execinfo.h>
+int
+main ()
+{
+int a = 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ smart_include="-isystem ${_prefix}/"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ break
+
+else
+
+ smart_include=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+fi
+
+if test "x$smart_include" = "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for execinfo.h" >&5
$as_echo_n "checking for execinfo.h... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <execinfo.h>
+ #include <execinfo.h>
int
main ()
{
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- smart_include=" "
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ smart_include=" "
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- break
+ break
else
- smart_include=
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ smart_include=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$smart_include" = "x"; then
+ for prefix in $smart_prefix; do
+
+
+if test "x$LOCATE" != "x"; then
+ DIRS=
+ file="${_prefix}/${1}"
+
+ for x in `${LOCATE} $file 2>/dev/null`; do
+ base=`echo $x | sed "s%/${file}%%"`
+ if test "x$x" = "x$base"; then
+ continue;
+ fi
+
+ dir=`${DIRNAME} $x 2>/dev/null`
+ exclude=`echo ${dir} | ${GREP} /home`
+ if test "x$exclude" != "x"; then
+ continue
+ fi
+
+ already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
+ if test "x$already" = "x"; then
+ DIRS="$DIRS $dir"
+ fi
+ done
+fi
+
+eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
+
+ done
+
if test "x$LOCATE" != "x"; then
DIRS=
continue
fi
- already=`echo \$smart_include_dir ${DIRS} | ${GREP} ${dir}`
+ already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
if test "x$already" = "x"; then
DIRS="$DIRS $dir"
fi
done
fi
-eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
+eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
+
- for try in $smart_include_dir /usr/local/include /opt/include; do
+ for try in $_smart_include_dir; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for execinfo.h in $try" >&5
$as_echo_n "checking for execinfo.h in $try... " >&6; }
CPPFLAGS="-isystem $try $old_CPPFLAGS"
SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
fi
+smart_prefix=
+
if test "x$ac_cv_header_execinfo_h" = "xyes"; then
smart_try_dir=$execinfo_lib_dir
ac_safe=`echo "pcreposix.h" | sed 'y%./+-%__pm%'`
old_CPPFLAGS="$CPPFLAGS"
smart_include=
-smart_include_dir=
+smart_include_dir="/usr/local/include /opt/include"
-if test "x$smart_try_dir" != "x"; then
- for try in $smart_try_dir; do
+_smart_try_dir=
+_smart_include_dir=
+
+for _prefix in $smart_prefix ""; do
+ for _dir in $smart_try_dir; do
+ _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
+ done
+
+ for _dir in $smart_include_dir; do
+ _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
+ done
+done
+
+if test "x$_smart_try_dir" != "x"; then
+ for try in $_smart_try_dir; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcreposix.h in $try" >&5
$as_echo_n "checking for pcreposix.h in $try... " >&6; }
CPPFLAGS="-isystem $try $old_CPPFLAGS"
fi
if test "x$smart_include" = "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcreposix.h" >&5
+ for _prefix in $smart_prefix; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/pcreposix.h" >&5
+$as_echo_n "checking for ${_prefix}/pcreposix.h... " >&6; }
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <pcreposix.h>
+int
+main ()
+{
+int a = 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ smart_include="-isystem ${_prefix}/"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ break
+
+else
+
+ smart_include=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+fi
+
+if test "x$smart_include" = "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcreposix.h" >&5
$as_echo_n "checking for pcreposix.h... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <pcreposix.h>
+ #include <pcreposix.h>
int
main ()
{
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- smart_include=" "
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ smart_include=" "
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- break
+ break
else
- smart_include=
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ smart_include=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$smart_include" = "x"; then
+ for prefix in $smart_prefix; do
+
+
+if test "x$LOCATE" != "x"; then
+ DIRS=
+ file="${_prefix}/${1}"
+
+ for x in `${LOCATE} $file 2>/dev/null`; do
+ base=`echo $x | sed "s%/${file}%%"`
+ if test "x$x" = "x$base"; then
+ continue;
+ fi
+
+ dir=`${DIRNAME} $x 2>/dev/null`
+ exclude=`echo ${dir} | ${GREP} /home`
+ if test "x$exclude" != "x"; then
+ continue
+ fi
+
+ already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
+ if test "x$already" = "x"; then
+ DIRS="$DIRS $dir"
+ fi
+ done
+fi
+
+eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
+
+ done
+
if test "x$LOCATE" != "x"; then
DIRS=
continue
fi
- already=`echo \$smart_include_dir ${DIRS} | ${GREP} ${dir}`
+ already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
if test "x$already" = "x"; then
DIRS="$DIRS $dir"
fi
done
fi
-eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
+eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
+
- for try in $smart_include_dir /usr/local/include /opt/include; do
+ for try in $_smart_include_dir; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcreposix.h in $try" >&5
$as_echo_n "checking for pcreposix.h in $try... " >&6; }
CPPFLAGS="-isystem $try $old_CPPFLAGS"
SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
fi
+smart_prefix=
+
if test "x$ac_cv_header_pcreposix_h" = "xyes"; then
$as_echo "#define HAVE_REGEX_H 1" >>confdefs.h
ac_safe=`echo "regex.h" | sed 'y%./+-%__pm%'`
old_CPPFLAGS="$CPPFLAGS"
smart_include=
-smart_include_dir=
+smart_include_dir="/usr/local/include /opt/include"
-if test "x$smart_try_dir" != "x"; then
- for try in $smart_try_dir; do
+_smart_try_dir=
+_smart_include_dir=
+
+for _prefix in $smart_prefix ""; do
+ for _dir in $smart_try_dir; do
+ _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
+ done
+
+ for _dir in $smart_include_dir; do
+ _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
+ done
+done
+
+if test "x$_smart_try_dir" != "x"; then
+ for try in $_smart_try_dir; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for regex.h in $try" >&5
$as_echo_n "checking for regex.h in $try... " >&6; }
CPPFLAGS="-isystem $try $old_CPPFLAGS"
fi
if test "x$smart_include" = "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regex.h" >&5
+ for _prefix in $smart_prefix; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${_prefix}/regex.h" >&5
+$as_echo_n "checking for ${_prefix}/regex.h... " >&6; }
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <regex.h>
+int
+main ()
+{
+int a = 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ smart_include="-isystem ${_prefix}/"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ break
+
+else
+
+ smart_include=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+fi
+
+if test "x$smart_include" = "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regex.h" >&5
$as_echo_n "checking for regex.h... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <regex.h>
+ #include <regex.h>
int
main ()
{
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- smart_include=" "
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ smart_include=" "
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- break
+ break
else
- smart_include=
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ smart_include=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$smart_include" = "x"; then
+ for prefix in $smart_prefix; do
+
+
+if test "x$LOCATE" != "x"; then
+ DIRS=
+ file="${_prefix}/${1}"
+
+ for x in `${LOCATE} $file 2>/dev/null`; do
+ base=`echo $x | sed "s%/${file}%%"`
+ if test "x$x" = "x$base"; then
+ continue;
+ fi
+
+ dir=`${DIRNAME} $x 2>/dev/null`
+ exclude=`echo ${dir} | ${GREP} /home`
+ if test "x$exclude" != "x"; then
+ continue
+ fi
+
+ already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
+ if test "x$already" = "x"; then
+ DIRS="$DIRS $dir"
+ fi
+ done
+fi
+
+eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
+
+ done
+
if test "x$LOCATE" != "x"; then
DIRS=
continue
fi
- already=`echo \$smart_include_dir ${DIRS} | ${GREP} ${dir}`
+ already=`echo \$_smart_include_dir ${DIRS} | ${GREP} ${dir}`
if test "x$already" = "x"; then
DIRS="$DIRS $dir"
fi
done
fi
-eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
+eval "_smart_include_dir=\"\$_smart_include_dir $DIRS\""
- for try in $smart_include_dir /usr/local/include /opt/include; do
+
+ for try in $_smart_include_dir; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for regex.h in $try" >&5
$as_echo_n "checking for regex.h in $try... " >&6; }
CPPFLAGS="-isystem $try $old_CPPFLAGS"
SMART_CPPFLAGS="$smart_include $SMART_CPPFLAGS"
fi
+smart_prefix=
+
if test "x$ac_cv_header_regex_h" = "xyes"; then
$as_echo "#define HAVE_REGEX_H 1" >>confdefs.h