with_rlm_FOO_lib_dir
with_rlm_FOO_include_dir
with_udpfromto
+with_talloc_include_dir
'
ac_precious_vars='build_alias
host_alias
--with-rlm-FOO-lib-dir=DIR Directory to look for library files used by module FOO
--with-rlm-FOO-include-dir=DIR Directory to look for include files used by module FOO
--with-udpfromto Compile in UDPFROMTO support. (default=no)
+ --with-talloc-include-dir=DIR
+ Directory where the talloc includes may be found
Some influential environment variables:
CC C compiler command
LIBS="$old_LIBS"
+talloc_include_dir=
+
+# Check whether --with-talloc-include-dir was given.
+if test "${with_talloc_include_dir+set}" = set; then :
+ withval=$with_talloc_include_dir; case "$withval" in
+ no)
+ as_fn_error $? "Need talloc-include-dir" "$LINENO" 5
+ ;;
+ yes)
+ ;;
+ *)
+ talloc_include_dir="$withval"
+ ;;
+ esac
+fi
+
+
+
+smart_try_dir="$talloc_include_dir"
+
+
+ac_safe=`echo "talloc.h" | sed 'y%./+-%__pm%'`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for talloc.h" >&5
+$as_echo_n "checking for talloc.h... " >&6; }
+
+old_CFLAGS="$CFLAGS"
+smart_include=
+smart_include_dir=
+
+if test "x$smart_try_dir" != "x"; then
+ for try in $smart_try_dir; do
+ CFLAGS="$old_CFLAGS -I$try"
+ 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="-I$try"
+else
+ smart_include=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test "x$smart_include" != "x"; then
+ break;
+ fi
+ done
+ CFLAGS="$old_CFLAGS"
+fi
+
+if test "x$smart_include" = "x"; then
+ 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=" "
+else
+ smart_include=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+if test "x$smart_include" = "x"; then
+
+
+if test "x$LOCATE" != "x"; then
+ DIRS=
+ file=talloc.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
+
+ 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\""
+
+
+ for try in $smart_include_dir /usr/local/include /opt/include; do
+ CFLAGS="$old_CFLAGS -I$try"
+ 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="-I$try"
+else
+ smart_include=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test "x$smart_include" != "x"; then
+ break;
+ fi
+ done
+ CFLAGS="$old_CFLAGS"
+fi
+
+if test "x$smart_include" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ eval "ac_cv_header_$ac_safe=yes"
+ CFLAGS="$old_CFLAGS $smart_include"
+ SMART_CFLAGS="$SMART_CFLAGS $smart_include"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+if test "x$ac_cv_header_talloc_h" != "xyes"; then
+ have_taloc="no"
+ { $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;}
+ as_fn_error $? "FreeRADIUS requires libtalloc" "$LINENO" 5
+else
+ INCLUDE+="${SMART_CFLAGS}"
+ LIBS+=" -ltalloc"
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
$as_echo_n "checking for crypt in -lcrypt... " >&6; }
if ${ac_cv_lib_crypt_crypt+:} false; then :
AC_CHECK_FUNC(lt_dladvise_init, AC_DEFINE(HAVE_LT_DLADVISE_INIT, [], [Do we have the lt_dladvise_init function]))
LIBS="$old_LIBS"
+dnl Check for talloc
+dnl extra argument: --with-talloc-include-dir=DIR
+talloc_include_dir=
+AC_ARG_WITH(talloc-include-dir,
+ [AS_HELP_STRING([--with-talloc-include-dir=DIR],
+ [Directory where the talloc includes may be found])],
+ [case "$withval" in
+ no)
+ AC_MSG_ERROR(Need talloc-include-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ talloc_include_dir="$withval"
+ ;;
+ esac])
+
+dnl Check for talloc header files
+
+smart_try_dir="$talloc_include_dir"
+FR_SMART_CHECK_INCLUDE([talloc.h])
+if test "x$ac_cv_header_talloc_h" != "xyes"; then
+ AC_MSG_WARN([talloc headers not found. Use --with-talloc-include-dir=<path>.])
+ AC_MSG_ERROR([FreeRADIUS requires libtalloc])
+else
+ INCLUDE="${SMART_CFLAGS} ${INCLUDE}"
+ LIBS="-ltalloc ${LIBS}"
+fi
+
dnl Check for libcrypt
dnl We use crypt(3) which may be in libc, or in libcrypt (eg FreeBSD)
AC_CHECK_LIB(crypt, crypt,