Add configure script check for JACK.
authorRussell Bryant <russell@russellbryant.com>
Sun, 13 Jan 2008 18:08:50 +0000 (18:08 +0000)
committerRussell Bryant <russell@russellbryant.com>
Sun, 13 Jan 2008 18:08:50 +0000 (18:08 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98605 65c4cc65-6c06-0410-ace0-fbb531ad65f3

build_tools/menuselect-deps.in
configure
configure.ac
include/asterisk/autoconfig.h.in
makeopts.in

index dd3588d..65d7f72 100644 (file)
@@ -1,45 +1,46 @@
 ASOUND=@PBX_ALSA@
+CRYPTO=@PBX_CRYPTO@
 CURL=@PBX_CURL@
 FREETDS=@PBX_FREETDS@
+GNU_LD=@GNU_LD@
 GSM=@PBX_GSM@
-GTK=@PBX_GTK@
 GTK2=@PBX_GTK2@
+GTK=@PBX_GTK@
 H323=@PBX_H323@
-OPENH323=@PBX_OPENH323@
 ICONV=@PBX_ICONV@
 IKSEMEL=@PBX_IKSEMEL@
 IMAP_TK=@PBX_IMAP_TK@
+ISDNNET=@PBX_ISDNNET@
 IXJUSER=@PBX_IXJUSER@
+JACK=@PBX_JACK@
 LTDL=@PBX_LTDL@
 LUA=@PBX_LUA@
+MISDN=@PBX_MISDN@
 NBS=@PBX_NBS@
 NETSNMP=@PBX_NETSNMP@
 NEWT=@PBX_NEWT@
 OGG=@PBX_OGG@
+OPENH323=@PBX_OPENH323@
 OSPTK=@PBX_OSPTK@
 OSSAUDIO=@PBX_OSS@
 PGSQL=@PBX_PGSQL@
 POPT=@PBX_POPT@
 PORTAUDIO=@PBX_PORTAUDIO@
 PRI=@PBX_PRI@
-SS7=@PBX_SS7@
 RADIUS=@PBX_RADIUS@
 SPEEX=@PBX_SPEEX@
-SQLITE=@PBX_SQLITE@
 SQLITE3=@PBX_SQLITE3@
+SQLITE=@PBX_SQLITE@
+SS7=@PBX_SS7@
 SSL=@PBX_OPENSSL@
-CRYPTO=@PBX_CRYPTO@
+SUPPSERV=@PBX_SUPPSERV@
 TONEZONE=@PBX_TONEZONE@
-USB=@PBX_USB@
 UNIXODBC=@PBX_UNIXODBC@
+USB=@PBX_USB@
 VORBIS=@PBX_VORBIS@
 VPBAPI=@PBX_VPB@
+WINARCH=@WINARCH@
 ZAPTEL=@PBX_ZAPTEL@
-ZAPTEL_VLDTMF=@PBX_ZAPTEL_VLDTMF@
 ZAPTEL_TRANSCODE=@PBX_ZAPTEL_TRANSCODE@
+ZAPTEL_VLDTMF=@PBX_ZAPTEL_VLDTMF@
 ZLIB=@PBX_ZLIB@
-ISDNNET=@PBX_ISDNNET@
-MISDN=@PBX_MISDN@
-SUPPSERV=@PBX_SUPPSERV@
-GNU_LD=@GNU_LD@
-WINARCH=@WINARCH@
index 89669ee..a7855ff 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 98454 .
+# From configure.ac Revision: 98604 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for asterisk 1.4.
 #
@@ -773,6 +773,10 @@ ISDNNET_LIB
 ISDNNET_INCLUDE
 ISDNNET_DIR
 PBX_ISDNNET
+JACK_LIB
+JACK_INCLUDE
+JACK_DIR
+PBX_JACK
 LTDL_LIB
 LTDL_INCLUDE
 LTDL_DIR
@@ -1578,6 +1582,7 @@ Optional Packages:
   --with-iksemel=PATH     use Iksemel Jabber Library files in PATH
   --with-imap=PATH        use UW IMAP Toolkit files in PATH
   --with-isdnnet=PATH     use ISDN4Linux Library files in PATH
+  --with-jack=PATH        use Jack Audio Connection Kit files in PATH
   --with-ltdl=PATH        use libtool files in PATH
   --with-lua=PATH         use Lua files in PATH
   --with-misdn=PATH       use mISDN User Library files in PATH
@@ -8291,6 +8296,34 @@ fi
 
 
 
+    JACK_DESCRIP="Jack Audio Connection Kit"
+    JACK_OPTION="jack"
+
+# Check whether --with-jack was given.
+if test "${with_jack+set}" = set; then
+  withval=$with_jack;
+       case ${withval} in
+       n|no)
+       USE_JACK=no
+       ;;
+       y|ye|yes)
+       ac_mandatory_list="${ac_mandatory_list} JACK"
+       ;;
+       *)
+       JACK_DIR="${withval}"
+       ac_mandatory_list="${ac_mandatory_list} JACK"
+       ;;
+       esac
+
+fi
+
+    PBX_JACK=0
+
+
+
+
+
+
     LTDL_DESCRIP="libtool"
     LTDL_OPTION="ltdl"
 
@@ -32601,6 +32634,268 @@ echo "${ECHO_T}no" >&6; }
    fi
 fi
 
+
+if test "x${PBX_JACK}" != "x1" -a "${USE_JACK}" != "no"; then
+   pbxlibdir=""
+   # if --with-JACK=DIR has been specified, use it.
+   if test "x${JACK_DIR}" != "x"; then
+      if test -d ${JACK_DIR}/lib; then
+        pbxlibdir="-L${JACK_DIR}/lib"
+      else
+        pbxlibdir="-L${JACK_DIR}"
+      fi
+   fi
+   pbxfuncname="jack_activate"
+   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
+      AST_JACK_FOUND=yes
+   else
+      as_ac_Lib=`echo "ac_cv_lib_jack_${pbxfuncname}" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -ljack" >&5
+echo $ECHO_N "checking for ${pbxfuncname} in -ljack... $ECHO_C" >&6; }
+if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ljack ${pbxlibdir}  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+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_link") 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_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_Lib=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "$as_ac_Lib=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+ac_res=`eval echo '${'$as_ac_Lib'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+  AST_JACK_FOUND=yes
+else
+  AST_JACK_FOUND=no
+fi
+
+   fi
+
+   # now check for the header.
+   if test "${AST_JACK_FOUND}" = "yes"; then
+      JACK_LIB="${pbxlibdir} -ljack "
+      # if --with-JACK=DIR has been specified, use it.
+      if test "x${JACK_DIR}" != "x"; then
+        JACK_INCLUDE="-I${JACK_DIR}/include"
+      fi
+      JACK_INCLUDE="${JACK_INCLUDE} "
+      if test "xjack/jack.h" = "x" ; then      # no header, assume found
+         JACK_HEADER_FOUND="1"
+      else                             # check for the header
+         saved_cppflags="${CPPFLAGS}"
+         CPPFLAGS="${CPPFLAGS} ${JACK_INCLUDE} "
+        if test "${ac_cv_header_jack_jack_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for jack/jack.h" >&5
+echo $ECHO_N "checking for jack/jack.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_jack_jack_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_jack_jack_h" >&5
+echo "${ECHO_T}$ac_cv_header_jack_jack_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking jack/jack.h usability" >&5
+echo $ECHO_N "checking jack/jack.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 <jack/jack.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 jack/jack.h presence" >&5
+echo $ECHO_N "checking jack/jack.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 <jack/jack.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: jack/jack.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: jack/jack.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: jack/jack.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: jack/jack.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: jack/jack.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: jack/jack.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: jack/jack.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: jack/jack.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: jack/jack.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: jack/jack.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: jack/jack.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: jack/jack.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: jack/jack.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: jack/jack.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: jack/jack.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: jack/jack.h: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to www.asterisk.org ##
+## ------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for jack/jack.h" >&5
+echo $ECHO_N "checking for jack/jack.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_jack_jack_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_jack_jack_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_jack_jack_h" >&5
+echo "${ECHO_T}$ac_cv_header_jack_jack_h" >&6; }
+
+fi
+if test $ac_cv_header_jack_jack_h = yes; then
+  JACK_HEADER_FOUND=1
+else
+  JACK_HEADER_FOUND=0
+fi
+
+
+         CPPFLAGS="${saved_cppflags}"
+      fi
+      if test "x${JACK_HEADER_FOUND}" = "x0" ; then
+         JACK_LIB=""
+         JACK_INCLUDE=""
+      else
+         if test "x${pbxfuncname}" = "x" ; then                # only checking headers -> no library
+           JACK_LIB=""
+        fi
+         PBX_JACK=1
+         # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_JACK 1
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_JACK_VERSION
+_ACEOF
+
+      fi
+   fi
+fi
+
+
 # Needed by unixodbc
 
 if test "x${PBX_LTDL}" != "x1" -a "${USE_LTDL}" != "no"; then
@@ -48641,6 +48936,10 @@ ISDNNET_LIB!$ISDNNET_LIB$ac_delim
 ISDNNET_INCLUDE!$ISDNNET_INCLUDE$ac_delim
 ISDNNET_DIR!$ISDNNET_DIR$ac_delim
 PBX_ISDNNET!$PBX_ISDNNET$ac_delim
+JACK_LIB!$JACK_LIB$ac_delim
+JACK_INCLUDE!$JACK_INCLUDE$ac_delim
+JACK_DIR!$JACK_DIR$ac_delim
+PBX_JACK!$PBX_JACK$ac_delim
 LTDL_LIB!$LTDL_LIB$ac_delim
 LTDL_INCLUDE!$LTDL_INCLUDE$ac_delim
 LTDL_DIR!$LTDL_DIR$ac_delim
@@ -48678,10 +48977,6 @@ OGG_INCLUDE!$OGG_INCLUDE$ac_delim
 OGG_DIR!$OGG_DIR$ac_delim
 PBX_OGG!$PBX_OGG$ac_delim
 OSPTK_LIB!$OSPTK_LIB$ac_delim
-OSPTK_INCLUDE!$OSPTK_INCLUDE$ac_delim
-OSPTK_DIR!$OSPTK_DIR$ac_delim
-PBX_OSPTK!$PBX_OSPTK$ac_delim
-OSS_LIB!$OSS_LIB$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -48723,6 +49018,10 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+OSPTK_INCLUDE!$OSPTK_INCLUDE$ac_delim
+OSPTK_DIR!$OSPTK_DIR$ac_delim
+PBX_OSPTK!$PBX_OSPTK$ac_delim
+OSS_LIB!$OSS_LIB$ac_delim
 OSS_INCLUDE!$OSS_INCLUDE$ac_delim
 OSS_DIR!$OSS_DIR$ac_delim
 PBX_OSS!$PBX_OSS$ac_delim
@@ -48816,10 +49115,6 @@ ZLIB_DIR!$ZLIB_DIR$ac_delim
 PBX_ZLIB!$PBX_ZLIB$ac_delim
 ZAPTEL_LIB!$ZAPTEL_LIB$ac_delim
 ZAPTEL_INCLUDE!$ZAPTEL_INCLUDE$ac_delim
-ZAPTEL_DIR!$ZAPTEL_DIR$ac_delim
-PBX_ZAPTEL!$PBX_ZAPTEL$ac_delim
-ZAPTEL_TRANSCODE_LIB!$ZAPTEL_TRANSCODE_LIB$ac_delim
-ZAPTEL_TRANSCODE_INCLUDE!$ZAPTEL_TRANSCODE_INCLUDE$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -48861,6 +49156,10 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+ZAPTEL_DIR!$ZAPTEL_DIR$ac_delim
+PBX_ZAPTEL!$PBX_ZAPTEL$ac_delim
+ZAPTEL_TRANSCODE_LIB!$ZAPTEL_TRANSCODE_LIB$ac_delim
+ZAPTEL_TRANSCODE_INCLUDE!$ZAPTEL_TRANSCODE_INCLUDE$ac_delim
 ZAPTEL_TRANSCODE_DIR!$ZAPTEL_TRANSCODE_DIR$ac_delim
 PBX_ZAPTEL_TRANSCODE!$PBX_ZAPTEL_TRANSCODE$ac_delim
 ZAPTEL_VLDTMF_LIB!$ZAPTEL_VLDTMF_LIB$ac_delim
@@ -48921,7 +49220,7 @@ CURL_CONFIG!$CURL_CONFIG$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 58; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 62; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
index c7b37dc..299fcd6 100644 (file)
@@ -215,6 +215,7 @@ AST_EXT_LIB_SETUP([ICONV], [Iconv Library], [iconv])
 AST_EXT_LIB_SETUP([IKSEMEL], [Iksemel Jabber Library], [iksemel])
 AST_EXT_LIB_SETUP([IMAP_TK], [UW IMAP Toolkit], [imap])
 AST_EXT_LIB_SETUP([ISDNNET], [ISDN4Linux Library], [isdnnet])
+AST_EXT_LIB_SETUP([JACK], [Jack Audio Connection Kit], [jack])
 AST_EXT_LIB_SETUP([LTDL], [libtool], [ltdl])
 AST_EXT_LIB_SETUP([LUA], [Lua], [lua])
 AST_EXT_LIB_SETUP([MISDN], [mISDN User Library], [misdn])
@@ -807,6 +808,8 @@ if test "${USE_IMAP_TK}" != "no"; then
    fi
 fi
 
+AST_EXT_LIB_CHECK([JACK], [jack], [jack_activate], [jack/jack.h])
+
 # Needed by unixodbc
 AST_EXT_LIB_CHECK([LTDL], [ltdl], [lt_dlinit], [ltdl.h], [])
 
index 4cdae1f..5202be1 100644 (file)
 /* Define to indicate the ${ISDNNET_DESCRIP} library version */
 #undef HAVE_ISDNNET_VERSION
 
+/* Define this to indicate the ${JACK_DESCRIP} library */
+#undef HAVE_JACK
+
+/* Define to indicate the ${JACK_DESCRIP} library version */
+#undef HAVE_JACK_VERSION
+
 /* Define to 1 if you have the <libintl.h> header file. */
 #undef HAVE_LIBINTL_H
 
index 5dc3b3c..10dced8 100644 (file)
@@ -90,7 +90,6 @@ GTK_LIB=@GTK_LIB@
 GTK2_INCLUDE=@GTK2_INCLUDE@
 GTK2_LIB=@GTK2_LIB@
 
-
 ICONV_INCLUDE=@ICONV_INCLUDE@
 ICONV_LIB=@ICONV_LIB@
 
@@ -100,6 +99,9 @@ IKSEMEL_LIB=@IKSEMEL_LIB@
 IMAP_TK_INCLUDE=@IMAP_TK_INCLUDE@
 IMAP_TK_LIB=@IMAP_TK_LIB@
 
+JACK_INCLUDE=@JACK_INCLUDE@
+JACK_LIB=@JACK_LIB@
+
 LUA_INCLUDE=@LUA_INCLUDE@
 LUA_LIB=@LUA_LIB@