If we don't have any of the pcap_datalink_XXX_to_YYY routines,
[obnox/wireshark/wip.git] / acinclude.m4
index 9647b6a75114ffffeac1addcd4b88bc063b7cf99..528936c49813132a627dc83181f5962d231829fd 100644 (file)
@@ -78,7 +78,7 @@ dnl "acspecific.m4" in GNU Autoconf 2.12, and turned into
 dnl AC_WIRESHARK_STRUCT_SA_LEN, which checks if "struct sockaddr"
 dnl has the 4.4BSD "sa_len" member, and defines HAVE_SA_LEN; that's
 dnl what's in this file.
-dnl Done by Guy Harris <guy@alum.mit.edu> on 1998-11-14. 
+dnl Done by Guy Harris <guy@alum.mit.edu> on 1998-11-14.
 
 dnl ### Checks for structure members
 
@@ -93,49 +93,6 @@ fi
 ])
 
 
-dnl
-dnl Check whether a given format can be used to print 64-bit integers
-dnl
-AC_DEFUN([AC_WIRESHARK_CHECK_64BIT_FORMAT],
-[
-  AC_MSG_CHECKING([whether %$1x can be used to format 64-bit integers])
-  AC_RUN_IFELSE(
-    [
-      AC_LANG_SOURCE(
-       [[
-#        ifdef HAVE_INTTYPES_H
-         #include <inttypes.h>
-#        endif
-         #include <glibconfig.h>
-         #include <stdio.h>
-         #include <sys/types.h>
-
-         main()
-         {
-           guint64 t = 1;
-           char strbuf[16+1];
-           sprintf(strbuf, "%016$1x", t << 32);
-           if (strcmp(strbuf, "0000000100000000") == 0)
-             exit(0);
-           else
-             exit(1);
-         }
-       ]])
-    ],
-    [
-      AC_DEFINE(PRId64, "$1d", [Format for printing 64-bit signed decimal numbers])
-      AC_DEFINE(PRIo64, "$1o", [Format for printing 64-bit unsigned octal numbers])
-      AC_DEFINE(PRIx64, "$1x", [Format for printing 64-bit unsigned hexadecimal numbers (lower-case)])
-      AC_DEFINE(PRIX64, "$1X", [Format for printing 64-bit unsigned hexadecimal numbers (upper-case)])
-      AC_DEFINE(PRIu64, "$1u", [Format for printing 64-bit unsigned decimal numbers])
-      AC_MSG_RESULT(yes)
-    ],
-    [
-      AC_MSG_RESULT(no)
-      $2
-    ])
-])
-
 #
 # AC_WIRESHARK_IPV6_STACK
 #
@@ -221,7 +178,7 @@ yes
                                v6lib=inet6
                                [CFLAGS="-DINET6 -DSOLARIS8_INET6 $CFLAGS"]
                        fi
-                       ;; 
+                       ;;
                esac
                if test "$v6type" != "unknown"; then
                        break
@@ -250,7 +207,7 @@ yes
 #
 # Adapted from stuff in the AC_PATH_XTRA macro in "acspecific.m4" in
 # GNU Autoconf 2.13; the comment came from there.
-# Done by Guy Harris <guy@alum.mit.edu> on 2000-01-14. 
+# Done by Guy Harris <guy@alum.mit.edu> on 2000-01-14.
 #
 AC_DEFUN([AC_WIRESHARK_GETHOSTBY_LIB_CHECK],
 [
@@ -275,7 +232,7 @@ AC_DEFUN([AC_WIRESHARK_GETHOSTBY_LIB_CHECK],
 #
 # Adapted from stuff in the AC_PATH_XTRA macro in "acspecific.m4" in
 # GNU Autoconf 2.13; the comment came from there.
-# Done by Guy Harris <guy@alum.mit.edu> on 2000-01-14. 
+# Done by Guy Harris <guy@alum.mit.edu> on 2000-01-14.
 #
 # We use "connect" because that's what AC_PATH_XTRA did.
 #
@@ -387,7 +344,7 @@ AC_DEFUN([AC_WIRESHARK_PCAP_CHECK],
        fi
 
        # Pcap header check
-       AC_CHECK_HEADER(pcap.h,, 
+       AC_CHECK_HEADER(pcap.h,,
            AC_MSG_ERROR([[Header file pcap.h not found; if you installed libpcap
 from source, did you also do \"make install-incl\", and if you installed a
 binary package of libpcap, is there also a developer's package of libpcap,
@@ -467,40 +424,53 @@ and did you also install that package?]]))
        fi
        AC_CHECK_FUNCS(pcap_open_dead pcap_freecode)
        #
-       # pcap_breakloop may be present in the library and not declared in the
-       # header file. We are therefore testing whether the function is present
-       # first and then if it is usable. It is usable if it compiles without
-       # an implicit warning. If it is not usable, we output a warning telling
-       # the user to update his pcap header.
-       # 
-       # Ceteris paribus, it should only happen with Mac OS X 10.3[.x] which
+       # pcap_breakloop may be present in the library but not declared
+       # in the pcap.h header file.  If it's not declared in the header
+       # file, attempts to use it will get warnings, and, if we're
+       # building with warnings treated as errors, that warning will
+       # cause compilation to fail.
+       #
+       # We are therefore first testing whether the function is present
+       # and then, if we're compiling with warnings as errors, testing
+       # whether it is usable.  It is usable if it compiles without
+       # a -Wimplicit warning (the "compile with warnings as errors"
+       # option requires GCC). If it is not usable, we fail and tell
+       # the user that the pcap.h header needs to be updated.
+       #
+       # Ceteris paribus, this should only happen with Mac OS X 10.3[.x] which
        # can have an up-to-date pcap library without the corresponding pcap
        # header.
        #
        # However, it might also happen on some others OSes with some erroneous
-       # system manipulations where multiple versions of libcap might co-exist 
+       # system manipulations where multiple versions of libcap might co-exist
        # e.g. hand made symbolic link from libpcap.so -> libpcap.so.0.8 but
        # having the pcap header version 0.7.
        #
-       AC_MSG_CHECKING([whether pcap_breakloop is present and usable])
+       AC_MSG_CHECKING([whether pcap_breakloop is present])
        ac_CFLAGS_saved="$CFLAGS"
        AC_WIRESHARK_PCAP_BREAKLOOP_TRY_LINK
        if test "x$ws_breakloop_compiled" = "xyes"; then
-         CFLAGS="$CFLAGS -Werror -Wimplicit"
-         AC_WIRESHARK_PCAP_BREAKLOOP_TRY_LINK
-         if test "x$ws_breakloop_compiled" = "xyes"; then
-           AC_MSG_RESULT(yes)
-           AC_DEFINE(HAVE_PCAP_BREAKLOOP, 1, [Define if pcap_breakloop is known])
-         else
-           AC_MSG_RESULT(broken)
-           AC_MSG_WARN([Your pcap library is more recent than your pcap header.])
-           AC_MSG_WARN([Wireshark won't be able to use functions not declared])
-           AC_MSG_WARN([in that header. You should install a newer version of])
-           AC_MSG_WARN([the header file.])
+         AC_MSG_RESULT(yes)
+         AC_DEFINE(HAVE_PCAP_BREAKLOOP, 1, [Define if pcap_breakloop is known])
+         if test "x$with_warnings_as_errors" = "xyes"; then
+           AC_MSG_CHECKING([whether pcap_breakloop is usable])
+           CFLAGS="$CFLAGS -Werror -Wimplicit"
+           AC_WIRESHARK_PCAP_BREAKLOOP_TRY_LINK
+           if test "x$ws_breakloop_compiled" = "xyes"; then
+             AC_MSG_RESULT(yes)
+           else
+             AC_MSG_RESULT(no)
+             AC_MSG_ERROR(
+[Your pcap library is more recent than your pcap header.
+As you are building with compiler warnings treated as errors, Wireshark
+won't be able to use functions not declared in that header.
+If you wish to build with compiler warnings treated as errors, You should
+install a newer version of the header file.])
+           fi
+           CFLAGS="$ac_CFLAGS_saved"
          fi
-         CFLAGS="$ac_CFLAGS_saved"
        else
-         AC_MSG_RESULT(function not present)
+         AC_MSG_RESULT(no)
        fi
 
        #
@@ -551,12 +521,30 @@ and did you also install that package?]]))
          AC_DEFINE(HAVE_PCAP_FINDALLDEVS, 1,
           [Define to 1 if you have the `pcap_findalldevs' function and a pcap.h that declares pcap_if_t.])
          AC_CHECK_FUNCS(pcap_datalink_val_to_name pcap_datalink_name_to_val)
+         AC_CHECK_FUNCS(pcap_datalink_val_to_description)
          AC_CHECK_FUNCS(pcap_list_datalinks pcap_set_datalink pcap_lib_version)
-         AC_CHECK_FUNCS(pcap_get_selectable_fd)
+         AC_CHECK_FUNCS(pcap_get_selectable_fd pcap_free_datalinks)
        fi
        LIBS="$ac_save_LIBS"
 ])
 
+AC_DEFUN([AC_WIRESHARK_PCAP_REMOTE_CHECK],
+[
+    ac_save_LIBS="$LIBS"
+    LIBS="$PCAP_LIBS $SOCKET_LIBS $NSL_LIBS $LIBS"
+    AC_DEFINE(HAVE_REMOTE, 1, [Define to 1 to enable remote
+              capturing feature in WinPcap library])
+    AC_CHECK_FUNCS(pcap_open pcap_findalldevs_ex pcap_createsrcstr)
+    if test $ac_cv_func_pcap_open = "yes" -a \
+            $ac_cv_func_pcap_findalldevs_ex = "yes" -a \
+            $ac_cv_func_pcap_createsrcstr = "yes" ; then
+        AC_DEFINE(HAVE_PCAP_REMOTE, 1,
+            [Define to 1 if you have WinPcap remote capturing support and prefer to use these new API features.])
+    fi
+    AC_CHECK_FUNCS(pcap_setsampling)
+    LIBS="$ac_save_LIBS"
+])
+
 #
 # AC_WIRESHARK_ZLIB_CHECK
 #
@@ -693,8 +681,8 @@ AC_DEFUN([AC_WIRESHARK_ZLIB_CHECK],
                # own zlib in the X11 library directory.
                #
                # The XFree86 zlib is an older version that lacks
-               # "gzgets()", and that's the zlib with which Ethereal
-               # gets linked, so the build of Ethereal fails.
+               # "gzgets()", and that's the zlib with which Wireshark
+               # gets linked, so the build of Wireshark fails.
                #
                ac_save_CFLAGS="$CFLAGS"
                ac_save_LIBS="$LIBS"
@@ -844,7 +832,7 @@ AC_DEFUN([AC_WIRESHARK_LIBLUA_CHECK],[
                LIBS="$LIBS -L$lua_dir/lib -llua -lm"
                wireshark_save_LDFLAGS="$LDFLAGS"
                LDFLAGS="$LDFLAGS -L$lua_dir/lib"
-       else 
+       else
                #
                # The user specified no directory in which liblua resides,
                # so just add "-llua -lliblua" to the used libs.
@@ -871,7 +859,7 @@ AC_DEFUN([AC_WIRESHARK_LIBLUA_CHECK],[
                                # we found lua5.1/lua.h, but we don't know which include dir contains it
                                AC_MSG_ERROR(Header file lua.h was found as lua5.1/lua.h but we can't use it. Please set the PATH for the --with-lua configure parameter. \n probably it is /usr.)
                        fi
-                       
+
                ],
                [
                        if test "x$lua_dir" != "x"
@@ -915,8 +903,11 @@ AC_DEFUN([AC_WIRESHARK_LIBLUA_CHECK],[
                # against libm.
                LIBS="$LIBS $LUA_LIBS -lm"
 
-               AC_CHECK_LIB(lua, lua_call,
+               AC_CHECK_LIB(lua, luaL_register,
                [
+                   #
+                   #  Lua 5.1 found
+                   #
                        if test "x$lua_dir" != "x"
                        then
                                #
@@ -930,57 +921,9 @@ AC_DEFUN([AC_WIRESHARK_LIBLUA_CHECK],[
                                LUA_LIBS="-llua -lm"
                                LUA_INCLUDES=""
                        fi
+                       AC_DEFINE(HAVE_LUA_5_1, 1, [Define to use Lua 5.1])
 
-                       #
-                       # we got lua, now look for lualib
-                       #
-                       AC_CHECK_LIB(lualib, luaL_openlib,
-                       [
-                               #
-                               # we have 5.0
-                               #
-                               LUA_LIBS="$LUA_LIBS -llualib"
-                       ],[
-                               #
-                               # no lualib, in 5.1 there's only liblua
-                               # do we have 5.1?
-                               #
-                               
-                               LIBS="$wireshark_save_LIBS $LUA_LIBS"
-
-                               AC_CHECK_LIB(lua, luaL_register,
-                               [
-                                   #
-                                   #  Lua 5.1 found
-                                   #
-                                   AC_DEFINE(HAVE_LUA_5_1, 1, [Define to use Lua 5.1])
-                               ],[
-                                   #
-                                   # No, it is not 5.1
-                                   #
-                                   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=""
-                                   fi
-                                   # User requested --with-lua but it isn't available
-                                   if test "x$want_lua" = "xyes"
-                                   then
-                                       AC_MSG_ERROR(Linking with liblualib failed.)
-                                   fi
-                                   want_lua=no
-                               ])
-                       ])
-               ],[  
+               ],[
                        #
                        # We could not find the libs, maybe we have version number in the lib name
                        #
@@ -1052,7 +995,7 @@ AC_DEFUN([AC_WIRESHARK_LIBPORTAUDIO_CHECK],[
                LIBS="$LIBS -L$portaudio_dir/lib -lportaudio"
                wireshark_save_LDFLAGS="$LDFLAGS"
                LDFLAGS="$LDFLAGS -L$portaudio_dir/lib"
-       else 
+       else
                #
                # The user specified no directory in which libportaudio resides,
                # so just add "-lportaudio" to the used libs.
@@ -1139,7 +1082,7 @@ AC_DEFUN([AC_WIRESHARK_LIBPORTAUDIO_CHECK],[
                        fi
                        AC_DEFINE(HAVE_LIBPORTAUDIO, 1, [Define to use libportaudio library])
                        want_portaudio=yes
-               ],[  
+               ],[
                        #
                        # Restore the versions of CFLAGS, CPPFLAGS,
                        # LDFLAGS, and LIBS before we added the
@@ -1169,82 +1112,6 @@ AC_DEFUN([AC_WIRESHARK_LIBPORTAUDIO_CHECK],[
        fi
 ])
 
-#
-# AC_WIRESHARK_NETSNMP_CHECK
-#
-AC_DEFUN([AC_WIRESHARK_NETSNMP_CHECK],
-[
-       dnl get the net-snmp-config binary
-       if test "x$netsnmpconfig" = "x" ; then
-               #
-               # The user didn't specify where net-snmp-config is
-               # located; search for it.
-               #
-               AC_PATH_PROG(NETSNMPCONFIG, net-snmp-config)
-       else
-               NETSNMPCONFIG=$netsnmpconfig
-               if test ! -x $NETSNMPCONFIG -o ! -f $NETSNMPCONFIG ; then
-                       NETSNMPCONFIG=$netsnmpconfig/bin/net-snmp-config
-                       if test ! -x $NETSNMPCONFIG -o ! -f $NETSNMPCONFIG ; then
-                               AC_MSG_ERROR(Invalid net-snmp-config: $netsnmpconfig)
-                       fi
-               fi
-       fi
-
-       #
-       # XXX - check whether $NETSNMPCONFIG is executable?
-       # if test "x$NETSNMPCONFIG" != "xno" -a "x$NETSNMPCONFIG" != "x" -a -x "$NETSNMPCONFIG" ; then
-       # We already did that if it was set; presumably AC_PATH_PROG
-       # will fail if it doesn't find an executable version.
-       #
-       if test "x$NETSNMPCONFIG" != "x" ; then
-               dnl other choices for flags to use here: could also use
-               dnl --prefix or --exec-prefix if you don't want the full list.
-
-               #
-               # Save the current settings of CFLAGS and CPPFLAGS, and add
-               # the output of "$NETSNMPCONFIG --cflags" to it, so that when
-               # searching for the Net-SNMP headers, we look in whatever
-               # directory that output specifies.
-               #
-               wireshark_save_CFLAGS="$CFLAGS"
-               wireshark_save_CPPFLAGS="$CPPFLAGS"
-               CFLAGS="$CFLAGS `$NETSNMPCONFIG --cflags`"
-               CPPFLAGS="$CPPFLAGS `$NETSNMPCONFIG --cflags`"
-
-               AC_CHECK_HEADERS(net-snmp/net-snmp-config.h net-snmp/library/default_store.h)
-               if test "x$ac_cv_header_net_snmp_net_snmp_config_h" = "xyes" -a "x$ac_cv_header_net_snmp_library_default_store_h" = "xyes" ; then
-                       SNMP_LIBS=`$NETSNMPCONFIG --libs`
-                       if echo "$SNMP_LIBS" | grep crypto >/dev/null  && test "x$SSL_LIBS" = "x"; then
-                               if test "x$want_netsnmp" = "xyes" ; then
-                                       AC_MSG_ERROR(Net-SNMP requires openssl but ssl not enabled)
-                               else
-                                       AC_MSG_RESULT(Net-SNMP requires openssl but ssl not enabled - disabling Net-SNMP)
-                               fi
-                               CFLAGS="$wireshark_save_CFLAGS"
-                               CPPFLAGS="$wireshark_save_CPPFLAGS"
-                               SNMP_LIBS=
-                       else
-                               AC_DEFINE(HAVE_NET_SNMP, 1, [Define to enable support for Net-SNMP])
-                               have_net_snmp="yes"
-                       fi
-               else
-                       if test "x$want_netsnmp" = "xyes" ; then
-                               AC_MSG_ERROR(Net-SNMP not found)
-                       else
-                               #
-                               # Restore the versions of CFLAGS and
-                               # CPPFLAGS before we added the output
-                               # of '$NETSNMPCONFIG --cflags", as we
-                               # didn't actually find Net-SNMP there.
-                               #
-                               CFLAGS="$wireshark_save_CFLAGS"
-                               CPPFLAGS="$wireshark_save_CPPFLAGS"
-                       fi
-               fi
-       fi      
-])
-
 #
 # AC_WIRESHARK_RPM_CHECK
 # Looks for the rpm program, and checks to see if we can redefine "_topdir".
@@ -1281,6 +1148,37 @@ AC_DEFUN([AC_WIRESHARK_GNU_SED_CHECK],
        fi
 ])
 
+#
+# AC_WIRESHARK_C_ARES_CHECK
+#
+AC_DEFUN([AC_WIRESHARK_C_ARES_CHECK],
+[
+       want_c_ares=defaultyes
+
+       if test "x$want_c_ares" = "xdefaultyes"; then
+               want_c_ares=yes
+               if test "x$ac_cv_enable_usr_local" = "xyes" ; then
+                       withval=/usr/local
+                       if test -d "$withval"; then
+                               AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
+                       fi
+               fi
+       fi
+
+       if test "x$want_c_ares" = "xyes"; then
+               AC_CHECK_LIB(cares, ares_init,
+                 [
+                   C_ARES_LIBS=-lcares
+               AC_DEFINE(HAVE_C_ARES, 1, [Define to use c-ares library])
+               have_good_c_ares=yes
+                 ],, $SOCKET_LIBS $NSL_LIBS
+               )
+       else
+               AC_MSG_RESULT(not required)
+       fi
+])
+
+
 #
 # AC_WIRESHARK_ADNS_CHECK
 #
@@ -1312,6 +1210,37 @@ AC_DEFUN([AC_WIRESHARK_ADNS_CHECK],
 ])
 
 
+#
+# AC_WIRESHARK_LIBCAP_CHECK
+#
+AC_DEFUN([AC_WIRESHARK_LIBCAP_CHECK],
+[
+       want_libcap=defaultyes
+
+       if test "x$want_libcap" = "xdefaultyes"; then
+               want_libcap=yes
+               if test "x$ac_cv_enable_usr_local" = "xyes" ; then
+                       withval=/usr/local
+                       if test -d "$withval"; then
+                               AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
+                       fi
+               fi
+       fi
+
+       if test "x$want_libcap" = "xyes"; then
+               AC_CHECK_LIB(cap, cap_set_flag,
+                 [
+                   LIBCAP_LIBS=-lcap
+               AC_DEFINE(HAVE_LIBCAP, 1, [Define to use the libcap library])
+               have_good_libcap=yes
+                 ],,
+               )
+       else
+               AC_MSG_RESULT(not required)
+       fi
+])
+
+
 #
 # AC_WIRESHARK_KRB5_CHECK
 #
@@ -1348,7 +1277,7 @@ AC_DEFUN([AC_WIRESHARK_KRB5_CHECK],
            AC_DEFINE(HAVE_MIT_KERBEROS, 1, [Define to use MIT kerberos])
          fi
        else
-         AC_PATH_PROG(KRB5_CONFIG, krb5-config) 
+         AC_PATH_PROG(KRB5_CONFIG, krb5-config)
          if test -x "$KRB5_CONFIG"
          then
            KRB5_FLAGS=`"$KRB5_CONFIG" --cflags`
@@ -1568,42 +1497,34 @@ AC_DEFUN([AC_WIRESHARK_KRB5_CHECK],
        AC_SUBST(KRB5_LIBS)
 ])
 
-dnl
-dnl Check whether a given format can be used to print 64-bit integers
-dnl
-AC_DEFUN([AC_WIRESHARK_CHECK_64BIT_FORMAT],
+#
+# AC_WIRESHARK_GEOIP_CHECK
+#
+AC_DEFUN([AC_WIRESHARK_GEOIP_CHECK],
 [
-  AC_MSG_CHECKING([whether %$1x can be used to format 64-bit integers])
-  AC_RUN_IFELSE(
-    [
-      AC_LANG_SOURCE(
-       [[
-         #include <glib.h>
-         #if GTK_MAJOR_VERSION >= 2
-         #include <glib/gprintf.h>
-         #endif
-         #include <stdio.h>
-
-         main()
-         {
-           guint64 t = 1;
-           char strbuf[16+1];
-           g_snprintf(strbuf, sizeof strbuf, "%016$1x", t << 32);
-           if (strcmp(strbuf, "0000000100000000") == 0)
-             exit(0);
-           else
-             exit(1);
-         }
-       ]])
-    ],
-    [
-      AC_DEFINE(G_GINT64_MODIFIER, "$1", [Format modifier for printing 64-bit numbers])
-      AC_MSG_RESULT(yes)
-    ],
-    [
-      AC_MSG_RESULT(no)
-      $2
-    ])
+       want_geoip=defaultyes
+
+       if test "x$want_geoip" = "xdefaultyes"; then
+               want_geoip=yes
+               if test "x$ac_cv_enable_usr_local" = "xyes" ; then
+                       withval=/usr/local
+                       if test -d "$withval"; then
+                               AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
+                       fi
+               fi
+       fi
+
+       if test "x$want_geoip" = "xyes"; then
+               AC_CHECK_LIB(GeoIP, GeoIP_new,
+                 [
+                   GEOIP_LIBS=-lGeoIP
+               AC_DEFINE(HAVE_GEOIP, 1, [Define to use GeoIP library])
+               have_good_geoip=yes
+                 ],,
+               )
+       else
+               AC_MSG_RESULT(not required)
+       fi
 ])
 
 #
@@ -1636,3 +1557,28 @@ else
   AC_MSG_RESULT(no)
 fi
 ])
+
+#
+# AC_WIRESHARK_IGE_MAC_INTEGRATION_CHECK
+#
+# Checks for the presence of OS X integration functions in the GTK+ framework
+# or as a separate library.
+#
+# http://developer.imendio.com/projects/gtk-macosx/integration
+#
+AC_DEFUN([AC_WIRESHARK_IGE_MAC_INTEGRATION_CHECK],
+[
+       ac_save_CFLAGS="$CFLAGS"
+       ac_save_LIBS="$LIBS"
+       CFLAGS="$CFLAGS $GTK_CFLAGS"
+       LIBS="$GTK_LIBS $LIBS"
+       AC_SEARCH_LIBS(ige_mac_menu_set_menu_bar, Gtk igemacintegration,
+       [
+               AC_DEFINE(HAVE_IGE_MAC_INTEGRATION, 1,
+                       [Define to 1 if the the Gtk+ framework or a separate library inclues the Imendio IGE Mac OS X Integration functions.])
+       ])
+       CFLAGS="$ac_save_CFLAGS"
+       LIBS="$ac_save_LIBS"
+])
+
+