Use portaudio if it's there. Check that we have the right version.
authorjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 4 Sep 2006 13:34:48 +0000 (13:34 +0000)
committerjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 4 Sep 2006 13:34:48 +0000 (13:34 +0000)
Note: This check is currently carried out by checking that the include
defines PortAudioStream. If you know of any better check, please let
me know.

acinclude.m4:
Replace sequences of 8 spaces by tab

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19131 f5534014-38df-0310-8fa8-9805f1628bb7

acinclude.m4
configure.in

index 829857cf79ffacfdb743e3146198ce280a2c4c52..3f6bbd7465a6898a785d2e27a6f1b0c405564289 100644 (file)
@@ -605,7 +605,7 @@ AC_DEFUN([AC_WIRESHARK_ZLIB_CHECK],
                                # zlib there, or didn't find a zlib that
                                # contains gzgets there.
                                #
-                               CFLAGS="$wireshark_save_CFLAGS"
+                               CFLAGS="$wireshark_save_CFLAGS"
                                CPPFLAGS="$wireshark_save_CPPFLAGS"
                                LIBS="$wireshark_save_LIBS"
                        fi
@@ -636,7 +636,7 @@ AC_DEFUN([AC_WIRESHARK_ZLIB_CHECK],
                CFLAGS="$CFLAGS $GTK_CFLAGS"
                LIBS="$GTK_LIBS -lz $LIBS"
                AC_MSG_CHECKING([for gzgets missing when linking with X11])
-               AC_TRY_LINK_FUNC(gzgets, AC_MSG_RESULT(no),
+               AC_TRY_LINK_FUNC(gzgets, AC_MSG_RESULT(no),
                  [
                    AC_MSG_RESULT(yes)
                    AC_MSG_ERROR(old zlib found when linking with X11 - get rid of old zlib.)
@@ -895,22 +895,22 @@ AC_DEFUN([AC_WIRESHARK_LIBLUA_CHECK],[
                                    #
                                    if test "x$lua_dir" != "x"
                                    then
-                                       #
-                                       # Restore the versions of CFLAGS, CPPFLAGS,
-                                       # LDFLAGS, and LIBS before we added the
-                                       # "--with-lua=" directory, as we didn't
-                                       # actually find lua there.
-                                       #
-                                       CFLAGS="$wireshark_save_CFLAGS"
-                                       CPPFLAGS="$wireshark_save_CPPFLAGS"
-                                       LDFLAGS="$wireshark_save_LDFLAGS"
-                                       LIBS="$wireshark_save_LIBS"
-                                       LUA_LIBS=""
+                                       #
+                                       # Restore the versions of CFLAGS, CPPFLAGS,
+                                       # LDFLAGS, and LIBS before we added the
+                                       # "--with-lua=" directory, as we didn't
+                                       # actually find lua there.
+                                       #
+                                       CFLAGS="$wireshark_save_CFLAGS"
+                                       CPPFLAGS="$wireshark_save_CPPFLAGS"
+                                       LDFLAGS="$wireshark_save_LDFLAGS"
+                                       LIBS="$wireshark_save_LIBS"
+                                       LUA_LIBS=""
                                    fi
                                    # User requested --with-lua but it isn't available
                                    if test "x$want_lua" = "xyes"
                                    then
-                                       AC_MSG_ERROR(Linking with liblualib failed.)
+                                       AC_MSG_ERROR(Linking with liblualib failed.)
                                    fi
                                    want_lua=no
                                ])
@@ -1016,6 +1016,11 @@ AC_DEFUN([AC_WIRESHARK_LIBPORTAUDIO_CHECK],[
                        #
                        AC_MSG_ERROR([libportaudio header not found in directory specified in --with-portaudio])
                else
+                       CFLAGS="$wireshark_save_CFLAGS"
+                       CPPFLAGS="$wireshark_save_CPPFLAGS"
+                       LDFLAGS="$wireshark_save_LDFLAGS"
+                       LIBS="$wireshark_save_LIBS"
+                       PORTAUDIO_LIBS=""
                        if test "x$want_portaudio" = "xyes"
                        then
                                #
@@ -1033,6 +1038,29 @@ AC_DEFUN([AC_WIRESHARK_LIBPORTAUDIO_CHECK],[
                fi
        ])
 
+       #
+       # Check whether we have the right version of portaudio
+       #
+       if test "x$want_portaudio" != "xno"
+       then
+               AC_MSG_CHECKING(whether PortAudioStream is defined in portaudio.h)
+               AC_CHECK_TYPE(PortAudioStream,,
+               [
+                       CFLAGS="$wireshark_save_CFLAGS"
+                       CPPFLAGS="$wireshark_save_CPPFLAGS"
+                       LDFLAGS="$wireshark_save_LDFLAGS"
+                       LIBS="$wireshark_save_LIBS"
+                       PORTAUDIO_LIBS=""
+                       if test x$want_portaudio = xyes;
+                       then
+                               AC_MSG_ERROR(Wrong version of portaudio includes)
+                       else
+                               want_portaudio=no       
+                       fi
+               ],
+               [INCLUDES=portaudio.h])
+       fi
+
        if test "x$want_portaudio" != "xno"
        then
                #
@@ -1100,9 +1128,9 @@ AC_DEFUN([AC_WIRESHARK_NETSNMP_CHECK],
                #
                AC_PATH_PROG(NETSNMPCONFIG, net-snmp-config)
        else
-               NETSNMPCONFIG=$netsnmpconfig
+               NETSNMPCNFIG=$netsnmpconfig
                if test ! -x $NETSNMPCONFIG -o ! -f $NETSNMPCONFIG ; then
-                       NETSNMPCONFIG=$netsnmpconfig/bin/net-snmp-config
+                       ETSNMPCONFIG=$netsnmpconfig/bin/net-snmp-config
                        if test ! -x $NETSNMPCONFIG -o ! -f $NETSNMPCONFIG ; then
                                AC_MSG_ERROR(Invalid net-snmp-config: $netsnmpconfig)
                        fi
index 05ab75bd325a24c709b3d6834c82251791af4eb1..293f2b3bcd7266f4004f9a3c419d5c0198424309 100644 (file)
@@ -825,7 +825,7 @@ dnl portaudio check
 AC_MSG_CHECKING(whether to use libportaudio for the rtp_player)
 
 AC_ARG_WITH(portaudio,
-[  --with-portaudio[[=DIR]]  use libportaudio (located in directory DIR, if supplied) for the rtp_player.  [[default=no]]],
+[  --with-portaudio[[=DIR]]  use libportaudio (located in directory DIR, if supplied) for the rtp_player.  [[default=yes, if available]]],
 [
        if test $withval = no
        then
@@ -839,9 +839,9 @@ AC_ARG_WITH(portaudio,
        fi
 ],[
        #
-       # Don't use libportaudio by default
+       # Use libportaudio by default
        #
-       want_portaudio=no
+       want_portaudio=ifavailable
        portaudio_dir=
 ])
 if test "x$want_portaudio" = "xno" ; then