[svn-commits] rizzo: trunk r89452 - in /trunk: acinclude.m4 configure configure.ac

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Nov 20 09:39:00 CST 2007


Author: rizzo
Date: Tue Nov 20 09:39:00 2007
New Revision: 89452

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89452
Log:
add an argument for extra headers to AC_EXT_LIB_CHECK,
and on passing simplify the code.
Too bad that every time we need to regenerate configure...


Modified:
    trunk/acinclude.m4
    trunk/configure
    trunk/configure.ac

Modified: trunk/acinclude.m4
URL: http://svn.digium.com/view/asterisk/trunk/acinclude.m4?view=diff&rev=89452&r1=89451&r2=89452
==============================================================================
--- trunk/acinclude.m4 (original)
+++ trunk/acinclude.m4 Tue Nov 20 09:39:00 2007
@@ -117,11 +117,13 @@
 # in a library, or, if no function is supplied, only check for the
 # existence of the header files.
 
-# AST_EXT_LIB_CHECK([package], [library], [function], [header], [additional LIB data], [version])
+# AST_EXT_LIB_CHECK([package], [library], [function], [header],
+#	 [extra libs], [extra cflags], [version])
 AC_DEFUN([AST_EXT_LIB_CHECK],
 [
 if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then
    pbxlibdir=""
+   # if --with-$1=DIR has been specified, use it.
    if test "x${$1_DIR}" != "x"; then
       if test -d ${$1_DIR}/lib; then
       	 pbxlibdir="-L${$1_DIR}/lib"
@@ -136,22 +138,21 @@
       AC_CHECK_LIB([$2], [${pbxfuncname}], [AST_$1_FOUND=yes], [AST_$1_FOUND=no], ${pbxlibdir} $5)
    fi
 
+   # now check for the header.
    if test "${AST_$1_FOUND}" = "yes"; then
-      $1_LIB="-l$2 $5"
-      $1_HEADER_FOUND="1"
+      $1_LIB="${pbxlibdir} -l$2 $5"
+      # if --with-$1=DIR has been specified, use it.
       if test "x${$1_DIR}" != "x"; then
-         $1_LIB="${pbxlibdir} ${$1_LIB}"
 	 $1_INCLUDE="-I${$1_DIR}/include"
-	 saved_cppflags="${CPPFLAGS}"
-	 CPPFLAGS="${CPPFLAGS} -I${$1_DIR}/include"
-	 if test "x$4" != "x" ; then
-	    AC_CHECK_HEADER([${$1_DIR}/include/$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0])
-	 fi
-	 CPPFLAGS="${saved_cppflags}"
-      else
-	 if test "x$4" != "x" ; then
-            AC_CHECK_HEADER([$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0])
-	 fi
+      fi
+      $1_INCLUDE="${$1_INCLUDE} $6"
+      if test "x$4" = "x" ; then	# no header, assume found
+         $1_HEADER_FOUND="1"
+      else				# check for the header
+         saved_cppflags="${CPPFLAGS}"
+         CPPFLAGS="${CPPFLAGS} ${$1_INCLUDE} $6"
+	 AC_CHECK_HEADER([$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0])
+         CPPFLAGS="${saved_cppflags}"
       fi
       if test "x${$1_HEADER_FOUND}" = "x0" ; then
          $1_LIB=""

Modified: trunk/configure
URL: http://svn.digium.com/view/asterisk/trunk/configure?view=diff&rev=89452&r1=89451&r2=89452
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Tue Nov 20 09:39:00 2007
@@ -17860,6 +17860,7 @@
 
 if test "x${PBX_ALSA}" != "x1" -a "${USE_ALSA}" != "no"; then
    pbxlibdir=""
+   # if --with-ALSA=DIR has been specified, use it.
    if test "x${ALSA_DIR}" != "x"; then
       if test -d ${ALSA_DIR}/lib; then
       	 pbxlibdir="-L${ALSA_DIR}/lib"
@@ -17942,155 +17943,20 @@
 
    fi
 
+   # now check for the header.
    if test "${AST_ALSA_FOUND}" = "yes"; then
-      ALSA_LIB="-lasound -lm -ldl"
-      ALSA_HEADER_FOUND="1"
+      ALSA_LIB="${pbxlibdir} -lasound -lm -ldl"
+      # if --with-ALSA=DIR has been specified, use it.
       if test "x${ALSA_DIR}" != "x"; then
-         ALSA_LIB="${pbxlibdir} ${ALSA_LIB}"
 	 ALSA_INCLUDE="-I${ALSA_DIR}/include"
-	 saved_cppflags="${CPPFLAGS}"
-	 CPPFLAGS="${CPPFLAGS} -I${ALSA_DIR}/include"
-	 if test "xalsa/asoundlib.h" != "x" ; then
-	    as_ac_Header=`echo "ac_cv_header_${ALSA_DIR}/include/alsa/asoundlib.h" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for ${ALSA_DIR}/include/alsa/asoundlib.h" >&5
-echo $ECHO_N "checking for ${ALSA_DIR}/include/alsa/asoundlib.h... $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 ${ALSA_DIR}/include/alsa/asoundlib.h usability" >&5
-echo $ECHO_N "checking ${ALSA_DIR}/include/alsa/asoundlib.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 <${ALSA_DIR}/include/alsa/asoundlib.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_c_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
-
-	ac_header_compiler=no
-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 ${ALSA_DIR}/include/alsa/asoundlib.h presence" >&5
-echo $ECHO_N "checking ${ALSA_DIR}/include/alsa/asoundlib.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 <${ALSA_DIR}/include/alsa/asoundlib.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
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-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_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: ${ALSA_DIR}/include/alsa/asoundlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: ${ALSA_DIR}/include/alsa/asoundlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${ALSA_DIR}/include/alsa/asoundlib.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: ${ALSA_DIR}/include/alsa/asoundlib.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: ${ALSA_DIR}/include/alsa/asoundlib.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: ${ALSA_DIR}/include/alsa/asoundlib.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${ALSA_DIR}/include/alsa/asoundlib.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: ${ALSA_DIR}/include/alsa/asoundlib.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${ALSA_DIR}/include/alsa/asoundlib.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: ${ALSA_DIR}/include/alsa/asoundlib.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${ALSA_DIR}/include/alsa/asoundlib.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: ${ALSA_DIR}/include/alsa/asoundlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${ALSA_DIR}/include/alsa/asoundlib.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: ${ALSA_DIR}/include/alsa/asoundlib.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${ALSA_DIR}/include/alsa/asoundlib.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: ${ALSA_DIR}/include/alsa/asoundlib.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for ${ALSA_DIR}/include/alsa/asoundlib.h" >&5
-echo $ECHO_N "checking for ${ALSA_DIR}/include/alsa/asoundlib.h... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-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
-  ALSA_HEADER_FOUND=1
-else
-  ALSA_HEADER_FOUND=0
-fi
-
-
-	 fi
-	 CPPFLAGS="${saved_cppflags}"
-      else
-	 if test "xalsa/asoundlib.h" != "x" ; then
-            if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then
+      fi
+      ALSA_INCLUDE="${ALSA_INCLUDE} "
+      if test "xalsa/asoundlib.h" = "x" ; then	# no header, assume found
+         ALSA_HEADER_FOUND="1"
+      else				# check for the header
+         saved_cppflags="${CPPFLAGS}"
+         CPPFLAGS="${CPPFLAGS} ${ALSA_INCLUDE} "
+	 if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then
   { echo "$as_me:$LINENO: checking for alsa/asoundlib.h" >&5
 echo $ECHO_N "checking for alsa/asoundlib.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_alsa_asoundlib_h+set}" = set; then
@@ -18222,7 +18088,7 @@
 fi
 
 
-	 fi
+         CPPFLAGS="${saved_cppflags}"
       fi
       if test "x${ALSA_HEADER_FOUND}" = "x0" ; then
          ALSA_LIB=""
@@ -18251,6 +18117,7 @@
 
 if test "x${PBX_CURSES}" != "x1" -a "${USE_CURSES}" != "no"; then
    pbxlibdir=""
+   # if --with-CURSES=DIR has been specified, use it.
    if test "x${CURSES_DIR}" != "x"; then
       if test -d ${CURSES_DIR}/lib; then
       	 pbxlibdir="-L${CURSES_DIR}/lib"
@@ -18333,155 +18200,20 @@
 
    fi
 
+   # now check for the header.
    if test "${AST_CURSES_FOUND}" = "yes"; then
-      CURSES_LIB="-lcurses "
-      CURSES_HEADER_FOUND="1"
+      CURSES_LIB="${pbxlibdir} -lcurses "
+      # if --with-CURSES=DIR has been specified, use it.
       if test "x${CURSES_DIR}" != "x"; then
-         CURSES_LIB="${pbxlibdir} ${CURSES_LIB}"
 	 CURSES_INCLUDE="-I${CURSES_DIR}/include"
-	 saved_cppflags="${CPPFLAGS}"
-	 CPPFLAGS="${CPPFLAGS} -I${CURSES_DIR}/include"
-	 if test "xcurses.h" != "x" ; then
-	    as_ac_Header=`echo "ac_cv_header_${CURSES_DIR}/include/curses.h" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for ${CURSES_DIR}/include/curses.h" >&5
-echo $ECHO_N "checking for ${CURSES_DIR}/include/curses.h... $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 ${CURSES_DIR}/include/curses.h usability" >&5
-echo $ECHO_N "checking ${CURSES_DIR}/include/curses.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 <${CURSES_DIR}/include/curses.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_c_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
-
-	ac_header_compiler=no
-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 ${CURSES_DIR}/include/curses.h presence" >&5
-echo $ECHO_N "checking ${CURSES_DIR}/include/curses.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 <${CURSES_DIR}/include/curses.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
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-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_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: ${CURSES_DIR}/include/curses.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: ${CURSES_DIR}/include/curses.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${CURSES_DIR}/include/curses.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: ${CURSES_DIR}/include/curses.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: ${CURSES_DIR}/include/curses.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: ${CURSES_DIR}/include/curses.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${CURSES_DIR}/include/curses.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: ${CURSES_DIR}/include/curses.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${CURSES_DIR}/include/curses.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: ${CURSES_DIR}/include/curses.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${CURSES_DIR}/include/curses.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: ${CURSES_DIR}/include/curses.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${CURSES_DIR}/include/curses.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: ${CURSES_DIR}/include/curses.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${CURSES_DIR}/include/curses.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: ${CURSES_DIR}/include/curses.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for ${CURSES_DIR}/include/curses.h" >&5
-echo $ECHO_N "checking for ${CURSES_DIR}/include/curses.h... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-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
-  CURSES_HEADER_FOUND=1
-else
-  CURSES_HEADER_FOUND=0
-fi
-
-
-	 fi
-	 CPPFLAGS="${saved_cppflags}"
-      else
-	 if test "xcurses.h" != "x" ; then
-            if test "${ac_cv_header_curses_h+set}" = set; then
+      fi
+      CURSES_INCLUDE="${CURSES_INCLUDE} "
+      if test "xcurses.h" = "x" ; then	# no header, assume found
+         CURSES_HEADER_FOUND="1"
+      else				# check for the header
+         saved_cppflags="${CPPFLAGS}"
+         CPPFLAGS="${CPPFLAGS} ${CURSES_INCLUDE} "
+	 if test "${ac_cv_header_curses_h+set}" = set; then
   { echo "$as_me:$LINENO: checking for curses.h" >&5
 echo $ECHO_N "checking for curses.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_curses_h+set}" = set; then
@@ -18613,7 +18345,7 @@
 fi
 
 
-	 fi
+         CPPFLAGS="${saved_cppflags}"
       fi
       if test "x${CURSES_HEADER_FOUND}" = "x0" ; then
          CURSES_LIB=""
@@ -18643,6 +18375,7 @@
 
 if test "x${PBX_CAP}" != "x1" -a "${USE_CAP}" != "no"; then
    pbxlibdir=""
+   # if --with-CAP=DIR has been specified, use it.
    if test "x${CAP_DIR}" != "x"; then
       if test -d ${CAP_DIR}/lib; then
       	 pbxlibdir="-L${CAP_DIR}/lib"
@@ -18725,155 +18458,20 @@
 
    fi
 
+   # now check for the header.
    if test "${AST_CAP_FOUND}" = "yes"; then
-      CAP_LIB="-lcap "
-      CAP_HEADER_FOUND="1"
+      CAP_LIB="${pbxlibdir} -lcap "
+      # if --with-CAP=DIR has been specified, use it.
       if test "x${CAP_DIR}" != "x"; then
-         CAP_LIB="${pbxlibdir} ${CAP_LIB}"
 	 CAP_INCLUDE="-I${CAP_DIR}/include"
-	 saved_cppflags="${CPPFLAGS}"
-	 CPPFLAGS="${CPPFLAGS} -I${CAP_DIR}/include"
-	 if test "xsys/capability.h" != "x" ; then
-	    as_ac_Header=`echo "ac_cv_header_${CAP_DIR}/include/sys/capability.h" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for ${CAP_DIR}/include/sys/capability.h" >&5
-echo $ECHO_N "checking for ${CAP_DIR}/include/sys/capability.h... $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 ${CAP_DIR}/include/sys/capability.h usability" >&5
-echo $ECHO_N "checking ${CAP_DIR}/include/sys/capability.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 <${CAP_DIR}/include/sys/capability.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_c_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
-
-	ac_header_compiler=no
-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 ${CAP_DIR}/include/sys/capability.h presence" >&5
-echo $ECHO_N "checking ${CAP_DIR}/include/sys/capability.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 <${CAP_DIR}/include/sys/capability.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
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-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_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: ${CAP_DIR}/include/sys/capability.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: ${CAP_DIR}/include/sys/capability.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${CAP_DIR}/include/sys/capability.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: ${CAP_DIR}/include/sys/capability.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: ${CAP_DIR}/include/sys/capability.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: ${CAP_DIR}/include/sys/capability.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${CAP_DIR}/include/sys/capability.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: ${CAP_DIR}/include/sys/capability.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${CAP_DIR}/include/sys/capability.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: ${CAP_DIR}/include/sys/capability.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${CAP_DIR}/include/sys/capability.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: ${CAP_DIR}/include/sys/capability.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${CAP_DIR}/include/sys/capability.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: ${CAP_DIR}/include/sys/capability.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${CAP_DIR}/include/sys/capability.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: ${CAP_DIR}/include/sys/capability.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for ${CAP_DIR}/include/sys/capability.h" >&5
-echo $ECHO_N "checking for ${CAP_DIR}/include/sys/capability.h... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-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
-  CAP_HEADER_FOUND=1
-else
-  CAP_HEADER_FOUND=0
-fi
-
-
-	 fi
-	 CPPFLAGS="${saved_cppflags}"
-      else
-	 if test "xsys/capability.h" != "x" ; then
-            if test "${ac_cv_header_sys_capability_h+set}" = set; then
+      fi
+      CAP_INCLUDE="${CAP_INCLUDE} "
+      if test "xsys/capability.h" = "x" ; then	# no header, assume found
+         CAP_HEADER_FOUND="1"
+      else				# check for the header
+         saved_cppflags="${CPPFLAGS}"
+         CPPFLAGS="${CPPFLAGS} ${CAP_INCLUDE} "
+	 if test "${ac_cv_header_sys_capability_h+set}" = set; then
   { echo "$as_me:$LINENO: checking for sys/capability.h" >&5
 echo $ECHO_N "checking for sys/capability.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_sys_capability_h+set}" = set; then
@@ -19005,7 +18603,7 @@
 fi
 
 
-	 fi
+         CPPFLAGS="${saved_cppflags}"
       fi
       if test "x${CAP_HEADER_FOUND}" = "x0" ; then
          CAP_LIB=""
@@ -19036,6 +18634,7 @@
 
 if test "x${PBX_EXP2L}" != "x1" -a "${USE_EXP2L}" != "no"; then
    pbxlibdir=""
+   # if --with-EXP2L=DIR has been specified, use it.
    if test "x${EXP2L_DIR}" != "x"; then
       if test -d ${EXP2L_DIR}/lib; then
       	 pbxlibdir="-L${EXP2L_DIR}/lib"
@@ -19118,155 +18717,20 @@
 
    fi
 
+   # now check for the header.
    if test "${AST_EXP2L_FOUND}" = "yes"; then
-      EXP2L_LIB="-lm "
-      EXP2L_HEADER_FOUND="1"
+      EXP2L_LIB="${pbxlibdir} -lm "
+      # if --with-EXP2L=DIR has been specified, use it.
       if test "x${EXP2L_DIR}" != "x"; then
-         EXP2L_LIB="${pbxlibdir} ${EXP2L_LIB}"
 	 EXP2L_INCLUDE="-I${EXP2L_DIR}/include"
-	 saved_cppflags="${CPPFLAGS}"
-	 CPPFLAGS="${CPPFLAGS} -I${EXP2L_DIR}/include"
-	 if test "x" != "x" ; then
-	    as_ac_Header=`echo "ac_cv_header_${EXP2L_DIR}/include/" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for ${EXP2L_DIR}/include/" >&5
-echo $ECHO_N "checking for ${EXP2L_DIR}/include/... $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 ${EXP2L_DIR}/include/ usability" >&5
-echo $ECHO_N "checking ${EXP2L_DIR}/include/ 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 <${EXP2L_DIR}/include/>
-_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_c_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
-
-	ac_header_compiler=no
-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 ${EXP2L_DIR}/include/ presence" >&5
-echo $ECHO_N "checking ${EXP2L_DIR}/include/ 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 <${EXP2L_DIR}/include/>
-_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
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-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_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: ${EXP2L_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: ${EXP2L_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${EXP2L_DIR}/include/: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: ${EXP2L_DIR}/include/: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: ${EXP2L_DIR}/include/: present but cannot be compiled" >&5
-echo "$as_me: WARNING: ${EXP2L_DIR}/include/: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${EXP2L_DIR}/include/:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: ${EXP2L_DIR}/include/:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${EXP2L_DIR}/include/: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: ${EXP2L_DIR}/include/: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${EXP2L_DIR}/include/:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: ${EXP2L_DIR}/include/:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${EXP2L_DIR}/include/: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: ${EXP2L_DIR}/include/: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${EXP2L_DIR}/include/: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: ${EXP2L_DIR}/include/: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for ${EXP2L_DIR}/include/" >&5
-echo $ECHO_N "checking for ${EXP2L_DIR}/include/... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-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
-  EXP2L_HEADER_FOUND=1
-else
-  EXP2L_HEADER_FOUND=0
-fi
-
-
-	 fi
-	 CPPFLAGS="${saved_cppflags}"
-      else
-	 if test "x" != "x" ; then
-            if test "${ac_cv_header_+set}" = set; then
+      fi
+      EXP2L_INCLUDE="${EXP2L_INCLUDE} "
+      if test "x" = "x" ; then	# no header, assume found
+         EXP2L_HEADER_FOUND="1"
+      else				# check for the header
+         saved_cppflags="${CPPFLAGS}"
+         CPPFLAGS="${CPPFLAGS} ${EXP2L_INCLUDE} "
+	 if test "${ac_cv_header_+set}" = set; then
   { echo "$as_me:$LINENO: checking for " >&5
 echo $ECHO_N "checking for ... $ECHO_C" >&6; }
 if test "${ac_cv_header_+set}" = set; then
@@ -19398,7 +18862,7 @@
 fi
 
 
-	 fi
+         CPPFLAGS="${saved_cppflags}"
       fi
       if test "x${EXP2L_HEADER_FOUND}" = "x0" ; then
          EXP2L_LIB=""
@@ -19426,6 +18890,7 @@
 
 if test "x${PBX_LOG2L}" != "x1" -a "${USE_LOG2L}" != "no"; then
    pbxlibdir=""
+   # if --with-LOG2L=DIR has been specified, use it.
    if test "x${LOG2L_DIR}" != "x"; then
       if test -d ${LOG2L_DIR}/lib; then
       	 pbxlibdir="-L${LOG2L_DIR}/lib"
@@ -19508,155 +18973,20 @@
 
    fi
 
+   # now check for the header.
    if test "${AST_LOG2L_FOUND}" = "yes"; then
-      LOG2L_LIB="-lm "
-      LOG2L_HEADER_FOUND="1"
+      LOG2L_LIB="${pbxlibdir} -lm "
+      # if --with-LOG2L=DIR has been specified, use it.
       if test "x${LOG2L_DIR}" != "x"; then
-         LOG2L_LIB="${pbxlibdir} ${LOG2L_LIB}"
 	 LOG2L_INCLUDE="-I${LOG2L_DIR}/include"
-	 saved_cppflags="${CPPFLAGS}"
-	 CPPFLAGS="${CPPFLAGS} -I${LOG2L_DIR}/include"
-	 if test "x" != "x" ; then
-	    as_ac_Header=`echo "ac_cv_header_${LOG2L_DIR}/include/" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for ${LOG2L_DIR}/include/" >&5
-echo $ECHO_N "checking for ${LOG2L_DIR}/include/... $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 ${LOG2L_DIR}/include/ usability" >&5
-echo $ECHO_N "checking ${LOG2L_DIR}/include/ 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 <${LOG2L_DIR}/include/>
-_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_c_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
-
-	ac_header_compiler=no
-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 ${LOG2L_DIR}/include/ presence" >&5
-echo $ECHO_N "checking ${LOG2L_DIR}/include/ 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 <${LOG2L_DIR}/include/>
-_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
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-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_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: ${LOG2L_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: ${LOG2L_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${LOG2L_DIR}/include/: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: ${LOG2L_DIR}/include/: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: ${LOG2L_DIR}/include/: present but cannot be compiled" >&5
-echo "$as_me: WARNING: ${LOG2L_DIR}/include/: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${LOG2L_DIR}/include/:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: ${LOG2L_DIR}/include/:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${LOG2L_DIR}/include/: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: ${LOG2L_DIR}/include/: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${LOG2L_DIR}/include/:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: ${LOG2L_DIR}/include/:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${LOG2L_DIR}/include/: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: ${LOG2L_DIR}/include/: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${LOG2L_DIR}/include/: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: ${LOG2L_DIR}/include/: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for ${LOG2L_DIR}/include/" >&5
-echo $ECHO_N "checking for ${LOG2L_DIR}/include/... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-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
-  LOG2L_HEADER_FOUND=1
-else
-  LOG2L_HEADER_FOUND=0
-fi
-
-
-	 fi
-	 CPPFLAGS="${saved_cppflags}"
-      else
-	 if test "x" != "x" ; then
-            if test "${ac_cv_header_+set}" = set; then
+      fi
+      LOG2L_INCLUDE="${LOG2L_INCLUDE} "
+      if test "x" = "x" ; then	# no header, assume found
+         LOG2L_HEADER_FOUND="1"
+      else				# check for the header
+         saved_cppflags="${CPPFLAGS}"
+         CPPFLAGS="${CPPFLAGS} ${LOG2L_INCLUDE} "
+	 if test "${ac_cv_header_+set}" = set; then
   { echo "$as_me:$LINENO: checking for " >&5
 echo $ECHO_N "checking for ... $ECHO_C" >&6; }
 if test "${ac_cv_header_+set}" = set; then
@@ -19788,7 +19118,7 @@
 fi
 
 
-	 fi
+         CPPFLAGS="${saved_cppflags}"
       fi
       if test "x${LOG2L_HEADER_FOUND}" = "x0" ; then
          LOG2L_LIB=""
@@ -19816,6 +19146,7 @@
 
 if test "x${PBX_EXP10L}" != "x1" -a "${USE_EXP10L}" != "no"; then
    pbxlibdir=""
+   # if --with-EXP10L=DIR has been specified, use it.
    if test "x${EXP10L_DIR}" != "x"; then
       if test -d ${EXP10L_DIR}/lib; then
       	 pbxlibdir="-L${EXP10L_DIR}/lib"
@@ -19898,155 +19229,20 @@
 
    fi
 
+   # now check for the header.
    if test "${AST_EXP10L_FOUND}" = "yes"; then
-      EXP10L_LIB="-lm "
-      EXP10L_HEADER_FOUND="1"
+      EXP10L_LIB="${pbxlibdir} -lm "
+      # if --with-EXP10L=DIR has been specified, use it.
       if test "x${EXP10L_DIR}" != "x"; then
-         EXP10L_LIB="${pbxlibdir} ${EXP10L_LIB}"
 	 EXP10L_INCLUDE="-I${EXP10L_DIR}/include"
-	 saved_cppflags="${CPPFLAGS}"
-	 CPPFLAGS="${CPPFLAGS} -I${EXP10L_DIR}/include"
-	 if test "x" != "x" ; then
-	    as_ac_Header=`echo "ac_cv_header_${EXP10L_DIR}/include/" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for ${EXP10L_DIR}/include/" >&5
-echo $ECHO_N "checking for ${EXP10L_DIR}/include/... $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 ${EXP10L_DIR}/include/ usability" >&5

[... 15429 lines stripped ...]



More information about the svn-commits mailing list