diff options
-rw-r--r-- | configure.in | 30 | ||||
-rw-r--r-- | epan/configure.in | 12 | ||||
-rw-r--r-- | wiretap/configure.in | 12 |
3 files changed, 42 insertions, 12 deletions
diff --git a/configure.in b/configure.in index e4daa6e5ea..8a11548fac 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.173 2002/08/17 17:53:19 gerald Exp $ +# $Id: configure.in,v 1.174 2002/08/28 00:37:17 jmayer Exp $ dnl dnl Process this file with autoconf 2.13 or later to produce a dnl configure script; 2.12 doesn't generate a "configure" script that @@ -214,17 +214,24 @@ fi # Enable/disable tethereal -GTK_OK=yes - AC_ARG_ENABLE(ethereal, [ --enable-ethereal build GTK+-based ethereal. [default=yes]],,enable_ethereal=yes) +AC_ARG_ENABLE(gtk2, +[ --enable-gtk2 build Glib2/Gtk2+-based (t)ethereal. [default=no]],enable_gtk2=yes,enable_gtk2=no) + # GTK checks # We don't add $GLIB_LIBS to LIBS, because we don't want to force all # programs to be built with GTK+. # -if test "x$enable_ethereal" = "xyes" ; then +if test "x$enable_gtk2" = "xyes" -a "x$enable_ethereal" = "xyes" ; then + GTK_OK=two + AM_PATH_GTK_2_0(2.0.0, CFLAGS="$CFLAGS $GTK_CFLAGS", GTK_OK=no ) +elif test "x$enable_gtk2" = "xno" -a "x$enable_ethereal" = "xyes" ; then + GTK_OK=one AM_PATH_GTK(1.2.0, CFLAGS="$CFLAGS $GTK_CFLAGS", GTK_OK=no ) +else + GTK_OK=no fi # GLib checks @@ -237,7 +244,14 @@ fi # We don't add $GLIB_LIBS to LIBS, because we don't want to force all # programs to be built with GLib. # -if test "$GTK_OK" = "yes" -a "x$enable_ethereal" = "xyes" ; then +if test "$GTK_OK" = "two" ; then + ethereal_bin="ethereal" + ethereal_man="ethereal.1" + ethereal_SUBDIRS="gtk" # <--- change to gtk2, if we can't use the same directory + + # Ignore GLIB_CFLAGS + AM_PATH_GLIB_2_0(2.0.0, , AC_MSG_ERROR(GLib distribution not found.), gmodule) +elif test "$GTK_OK" = "one" ; then ethereal_bin="ethereal" ethereal_man="ethereal.1" ethereal_SUBDIRS="gtk" @@ -249,7 +263,11 @@ else ethereal_bin="" ethereal_man="" # Honor GLIB_CFLAGS - AM_PATH_GLIB(1.2.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib distribution not found.), gmodule) + if test "x$enable_gtk2" = "xyes" ; then + AM_PATH_GLIB_2_0(2.0.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib distribution not found.), gmodule) + else + AM_PATH_GLIB(1.2.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib distribution not found.), gmodule) + fi fi # diff --git a/epan/configure.in b/epan/configure.in index c3545069ca..6bc245604c 100644 --- a/epan/configure.in +++ b/epan/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.27 2002/08/17 17:53:33 gerald Exp $ +# $Id: configure.in,v 1.28 2002/08/28 00:37:29 jmayer Exp $ dnl dnl Process this file with autoconf 2.13 or later to produce a dnl configure script; 2.12 doesn't generate a "configure" script that @@ -105,8 +105,14 @@ DATAFILE_DIR=`( AC_DEFINE_UNQUOTED(DATAFILE_DIR,"$DATAFILE_DIR") AC_SUBST(DATAFILE_DIR) -# Checks for glib first, or gtk+ if not present -AM_PATH_GLIB(1.1.0, CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS", , gmodule) +AC_ARG_ENABLE(gtk2, +[ --enable-gtk2 build Glib2/Gtk2+-based (t)ethereal. [default=no]],enable_gtk2=yes,enable_gtk2=no) + +if test "x$enable_gtk2" = "xyes" ; then + AM_PATH_GLIB_2_0(2.0.0, CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS", , gmodule) +else + AM_PATH_GLIB(1.2.0, CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS", , gmodule) +fi dnl Checks for header files AC_HEADER_STDC diff --git a/wiretap/configure.in b/wiretap/configure.in index c72b9250bc..34469bb001 100644 --- a/wiretap/configure.in +++ b/wiretap/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.39 2002/08/14 14:42:42 jmayer Exp $ +# $Id: configure.in,v 1.40 2002/08/28 00:37:31 jmayer Exp $ dnl dnl Process this file with autoconf 2.13 or later to produce a dnl configure script; 2.12 doesn't generate a "configure" script that @@ -94,8 +94,14 @@ else esac fi -# Check for glib. -AM_PATH_GLIB(1.1.0, CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS") +AC_ARG_ENABLE(gtk2, +[ --enable-gtk2 build Glib2/Gtk2+-based (t)ethereal. [default=no]],enable_gtk2=yes,enable_gtk2=no) + +if test "x$enable_gtk2" = "xyes" ; then + AM_PATH_GLIB_2_0(2.0.0, CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS", , gmodule) +else + AM_PATH_GLIB(1.2.0, CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS", , gmodule) +fi dnl Look in /usr/local for header files and libraries ? AC_ARG_ENABLE(usr-local, |