[asterisk-dev] Dahdi building: autoconf generated configure script

Łukasz Wójcik lukasz.wojcik at zoho.com
Mon Oct 27 07:19:04 CDT 2014


Hey there,

I've got a trivial question I hope to get a quick response to :)

I am fiddling with dahdi 2.10.0.1 on non-linux variant of UNIX. To be
more specific, I am trying to build dahdi from sources, and am a bit
confused about autoconf.

It seems that 'configure' script generated using 'tools/configure.ac' is
not quite the same as 'tools/configure' (which is supposed to be
generated using corresponding 'configure.ac', right ?).

# autoconf configure.ac > configure.generated_via_autoconf

I am attaching a diff, that suggests that last configure.ac is
out-of-sync, and seems to be stuck in dahdi 2.8.

Is this correct ?

Sincerely,
-Ł
-------------- next part --------------
--- configure.orig	2014-10-27 03:44:37.191346234 -0800
+++ configure.generated_via_autoconf	2014-10-27 04:00:08.520237312 -0800
@@ -1,7 +1,7 @@
 #! /bin/sh
-# From configure.ac Revision.
+# From configure.ac.orig Revision.
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for dahdi 2.8.0.
+# Generated by GNU Autoconf 2.69 for dahdi 2.10.0.1.
 #
 # Report bugs to <www.asterisk.org>.
 #
@@ -583,8 +583,8 @@
 # Identity of this package.
 PACKAGE_NAME='dahdi'
 PACKAGE_TARNAME='dahdi'
-PACKAGE_VERSION='2.8.0'
-PACKAGE_STRING='dahdi 2.8.0'
+PACKAGE_VERSION='2.10.0.1'
+PACKAGE_STRING='dahdi 2.10.0.1'
 PACKAGE_BUGREPORT='www.asterisk.org'
 PACKAGE_URL=''
 
@@ -631,19 +631,6 @@
 ASCIIDOC
 USE_SELINUX
 PBX_HDLC
-PBX_DAHDI23
-PBX_USB
-USB_DIR
-USB_INCLUDE
-USB_LIB
-PBX_NEWT
-NEWT_DIR
-NEWT_INCLUDE
-NEWT_LIB
-PBX_DAHDI
-DAHDI_DIR
-DAHDI_INCLUDE
-DAHDI_LIB
 DAHDI_DECLARATION_AFTER_STATEMENT
 DAHDI_DEVMODE
 DOWNLOAD
@@ -653,7 +640,6 @@
 HOSTCC
 BDFARCH
 BDFNAME
-GNU_MAKE
 LN_S
 INSTALL_DATA
 INSTALL_SCRIPT
@@ -711,9 +697,6 @@
 ac_user_opts='
 enable_option_checking
 enable_dev_mode
-with_dahdi
-with_newt
-with_usb
 with_selinux
 with_ppp
 '
@@ -1266,7 +1249,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures dahdi 2.8.0 to adapt to many kinds of systems.
+\`configure' configures dahdi 2.10.0.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1327,7 +1310,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of dahdi 2.8.0:";;
+     short | recursive ) echo "Configuration of dahdi 2.10.0.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1340,9 +1323,6 @@
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-dahdi=PATH       use DAHDI files in PATH
-  --with-newt=PATH        use newt files in PATH
-  --with-usb=PATH         use usb files in PATH
   --with-selinux          enable (with) / disable (without) SELinux
   --with-ppp=PATH         Use PPP support from PATH
 
@@ -1422,7 +1402,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-dahdi configure 2.8.0
+dahdi configure 2.10.0.1
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1793,7 +1773,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by dahdi $as_me 2.8.0, which was
+It was created by dahdi $as_me 2.10.0.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -4332,34 +4312,7 @@
 $as_echo "no, using $LN_S" >&6; }
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5
-$as_echo_n "checking for GNU make... " >&6; }
-if ${ac_cv_GNU_MAKE+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_GNU_MAKE='Not Found' ;
-   ac_cv_GNU_MAKE_VERSION_MAJOR=0 ;
-   ac_cv_GNU_MAKE_VERSION_MINOR=0 ;
-   for a in make gmake gnumake ; do
-      if test -z "$a" ; then continue ; fi ;
-      if ( sh -c "$a --version" 2> /dev/null | grep GNU  2>&1 > /dev/null ) ;  then
-         ac_cv_GNU_MAKE=$a ;
-         ac_cv_GNU_MAKE_VERSION_MAJOR=`$ac_cv_GNU_MAKE --version | grep "GNU Make" | cut -f3 -d' ' | cut -f1 -d'.'`
-         ac_cv_GNU_MAKE_VERSION_MINOR=`$ac_cv_GNU_MAKE --version | grep "GNU Make" | cut -f2 -d'.' | cut -c1-2`
-         break;
-      fi
-   done ;
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_GNU_MAKE" >&5
-$as_echo "$ac_cv_GNU_MAKE" >&6; } ;
-if test  "x$ac_cv_GNU_MAKE" = "xNot Found"  ; then
-   as_fn_error $? "*** Please install GNU make.  It is required to build Asterisk!" "$LINENO" 5
-   exit 1
-fi
-GNU_MAKE=$ac_cv_GNU_MAKE
-
-
+AST_CHECK_GNU_MAKE
 
 test_obj=conftest.o
 if ac_fn_c_try_compile "$LINENO"; then :
@@ -4620,402 +4573,15 @@
 fi
 
 
+AST_EXT_LIB_SETUP(DAHDI, DAHDI, dahdi)
+AST_EXT_LIB_SETUP(NEWT, newt, newt)
+AST_EXT_LIB_SETUP(USB, usb, usb)
 
-    DAHDI_DESCRIP="DAHDI"
-    DAHDI_OPTION="dahdi"
-
-# Check whether --with-dahdi was given.
-if test "${with_dahdi+set}" = set; then :
-  withval=$with_dahdi;
-	case ${withval} in
-	n|no)
-	USE_DAHDI=no
-	;;
-	y|ye|yes)
-	ac_mandatory_list="${ac_mandatory_list} DAHDI"
-	;;
-	*)
-	DAHDI_DIR="${withval}"
-	ac_mandatory_list="${ac_mandatory_list} DAHDI"
-	;;
-	esac
-
-fi
-
-    PBX_DAHDI=0
-
-
-
-
-
-
-    NEWT_DESCRIP="newt"
-    NEWT_OPTION="newt"
-
-# Check whether --with-newt was given.
-if test "${with_newt+set}" = set; then :
-  withval=$with_newt;
-	case ${withval} in
-	n|no)
-	USE_NEWT=no
-	;;
-	y|ye|yes)
-	ac_mandatory_list="${ac_mandatory_list} NEWT"
-	;;
-	*)
-	NEWT_DIR="${withval}"
-	ac_mandatory_list="${ac_mandatory_list} NEWT"
-	;;
-	esac
-
-fi
-
-    PBX_NEWT=0
-
-
-
-
-
-
-    USB_DESCRIP="usb"
-    USB_OPTION="usb"
-
-# Check whether --with-usb was given.
-if test "${with_usb+set}" = set; then :
-  withval=$with_usb;
-	case ${withval} in
-	n|no)
-	USE_USB=no
-	;;
-	y|ye|yes)
-	ac_mandatory_list="${ac_mandatory_list} USB"
-	;;
-	*)
-	USB_DIR="${withval}"
-	ac_mandatory_list="${ac_mandatory_list} USB"
-	;;
-	esac
-
-fi
-
-    PBX_USB=0
-
-
-
-
-
-
-
-    if test "x${PBX_DAHDI}" != "x1"; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DAHDI_CODE in dahdi/user.h" >&5
-$as_echo_n "checking for DAHDI_CODE in dahdi/user.h... " >&6; }
-	saved_cppflags="${CPPFLAGS}"
-	if test "x${DAHDI_DIR}" != "x"; then
-	    DAHDI_INCLUDE="-I${DAHDI_DIR}/include"
-	fi
-	CPPFLAGS="${CPPFLAGS} ${DAHDI_INCLUDE}"
-
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
- #include <dahdi/user.h>
-int
-main ()
-{
-#if defined(DAHDI_CODE)
-				int foo = 0;
-			        #else
-			        int foo = bar;
-			        #endif
-				0
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-		PBX_DAHDI=1
-
-$as_echo "#define HAVE_DAHDI 1" >>confdefs.h
-
-
-$as_echo "#define HAVE_DAHDI_VERSION /**/" >>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_ext
-	CPPFLAGS="${saved_cppflags}"
-    fi
-
-
+AST_C_DEFINE_CHECK(DAHDI, DAHDI_CODE, dahdi/user.h)
 DAHDI23_DIR="${DAHDI_DIR}"
-
-    if test "x${PBX_DAHDI23}" != "x1"; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DAHDI_CONFIG_NTTE in dahdi/user.h" >&5
-$as_echo_n "checking for DAHDI_CONFIG_NTTE in dahdi/user.h... " >&6; }
-	saved_cppflags="${CPPFLAGS}"
-	if test "x${DAHDI23_DIR}" != "x"; then
-	    DAHDI23_INCLUDE="-I${DAHDI23_DIR}/include"
-	fi
-	CPPFLAGS="${CPPFLAGS} ${DAHDI23_INCLUDE}"
-
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
- #include <dahdi/user.h>
-int
-main ()
-{
-#if defined(DAHDI_CONFIG_NTTE)
-				int foo = 0;
-			        #else
-			        int foo = bar;
-			        #endif
-				0
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-		PBX_DAHDI23=1
-
-$as_echo "#define HAVE_DAHDI23 1" >>confdefs.h
-
-
-$as_echo "#define HAVE_DAHDI23_VERSION /**/" >>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_ext
-	CPPFLAGS="${saved_cppflags}"
-    fi
-
-
-
-if test "x${PBX_NEWT}" != "x1" -a "${USE_NEWT}" != "no"; then
-   pbxlibdir=""
-   # if --with-NEWT=DIR has been specified, use it.
-   if test "x${NEWT_DIR}" != "x"; then
-      if test -d ${NEWT_DIR}/lib; then
-      	 pbxlibdir="-L${NEWT_DIR}/lib"
-      else
-      	 pbxlibdir="-L${NEWT_DIR}"
-      fi
-   fi
-   pbxfuncname="newtBell"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_NEWT_FOUND=yes
-   else
-      as_ac_Lib=`$as_echo "ac_cv_lib_newt_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lnewt" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lnewt... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnewt ${pbxlibdir}  $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
-extern "C"
-#endif
-char ${pbxfuncname} ();
-int
-main ()
-{
-return ${pbxfuncname} ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
-else
-  eval "$as_ac_Lib=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-eval ac_res=\$$as_ac_Lib
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
-  AST_NEWT_FOUND=yes
-else
-  AST_NEWT_FOUND=no
-fi
-
-   fi
-
-   # now check for the header.
-   if test "${AST_NEWT_FOUND}" = "yes"; then
-      NEWT_LIB="${pbxlibdir} -lnewt "
-      # if --with-NEWT=DIR has been specified, use it.
-      if test "x${NEWT_DIR}" != "x"; then
-	 NEWT_INCLUDE="-I${NEWT_DIR}/include"
-      fi
-      NEWT_INCLUDE="${NEWT_INCLUDE} "
-      if test "xnewt.h" = "x" ; then	# no header, assume found
-         NEWT_HEADER_FOUND="1"
-      else				# check for the header
-         saved_cppflags="${CPPFLAGS}"
-         CPPFLAGS="${CPPFLAGS} ${NEWT_INCLUDE} "
-	 ac_fn_c_check_header_mongrel "$LINENO" "newt.h" "ac_cv_header_newt_h" "$ac_includes_default"
-if test "x$ac_cv_header_newt_h" = xyes; then :
-  NEWT_HEADER_FOUND=1
-else
-  NEWT_HEADER_FOUND=0
-fi
-
-
-         CPPFLAGS="${saved_cppflags}"
-      fi
-      if test "x${NEWT_HEADER_FOUND}" = "x0" ; then
-         NEWT_LIB=""
-         NEWT_INCLUDE=""
-      else
-         if test "x${pbxfuncname}" = "x" ; then		# only checking headers -> no library
-	    NEWT_LIB=""
-	 fi
-         PBX_NEWT=1
-         # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_NEWT 1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_NEWT_VERSION /**/
-_ACEOF
-
-      fi
-   fi
-fi
-
-
-if test "x${PBX_USB}" != "x1" -a "${USE_USB}" != "no"; then
-   pbxlibdir=""
-   # if --with-USB=DIR has been specified, use it.
-   if test "x${USB_DIR}" != "x"; then
-      if test -d ${USB_DIR}/lib; then
-      	 pbxlibdir="-L${USB_DIR}/lib"
-      else
-      	 pbxlibdir="-L${USB_DIR}"
-      fi
-   fi
-   pbxfuncname="usb_init"
-   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
-      AST_USB_FOUND=yes
-   else
-      as_ac_Lib=`$as_echo "ac_cv_lib_usb_${pbxfuncname}" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lusb" >&5
-$as_echo_n "checking for ${pbxfuncname} in -lusb... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lusb ${pbxlibdir}  $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
-extern "C"
-#endif
-char ${pbxfuncname} ();
-int
-main ()
-{
-return ${pbxfuncname} ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Lib=yes"
-else
-  eval "$as_ac_Lib=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-eval ac_res=\$$as_ac_Lib
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
-  AST_USB_FOUND=yes
-else
-  AST_USB_FOUND=no
-fi
-
-   fi
-
-   # now check for the header.
-   if test "${AST_USB_FOUND}" = "yes"; then
-      USB_LIB="${pbxlibdir} -lusb "
-      # if --with-USB=DIR has been specified, use it.
-      if test "x${USB_DIR}" != "x"; then
-	 USB_INCLUDE="-I${USB_DIR}/include"
-      fi
-      USB_INCLUDE="${USB_INCLUDE} "
-      if test "xusb.h" = "x" ; then	# no header, assume found
-         USB_HEADER_FOUND="1"
-      else				# check for the header
-         saved_cppflags="${CPPFLAGS}"
-         CPPFLAGS="${CPPFLAGS} ${USB_INCLUDE} "
-	 ac_fn_c_check_header_mongrel "$LINENO" "usb.h" "ac_cv_header_usb_h" "$ac_includes_default"
-if test "x$ac_cv_header_usb_h" = xyes; then :
-  USB_HEADER_FOUND=1
-else
-  USB_HEADER_FOUND=0
-fi
-
-
-         CPPFLAGS="${saved_cppflags}"
-      fi
-      if test "x${USB_HEADER_FOUND}" = "x0" ; then
-         USB_LIB=""
-         USB_INCLUDE=""
-      else
-         if test "x${pbxfuncname}" = "x" ; then		# only checking headers -> no library
-	    USB_LIB=""
-	 fi
-         PBX_USB=1
-         # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_USB 1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_USB_VERSION /**/
-_ACEOF
-
-      fi
-   fi
-fi
-
+AST_C_DEFINE_CHECK(DAHDI23, DAHDI_CONFIG_NTTE, dahdi/user.h)
+AST_EXT_LIB_CHECK(NEWT, newt, newtBell, newt.h)
+AST_EXT_LIB_CHECK(USB, usb, usb_init, usb.h)
 
 for ac_func in semtimedop
 do :
@@ -5693,7 +5259,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by dahdi $as_me 2.8.0, which was
+This file was extended by dahdi $as_me 2.10.0.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -5755,7 +5321,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-dahdi config.status 2.8.0
+dahdi config.status 2.10.0.1
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 


More information about the asterisk-dev mailing list