#
GTK_MAJOR_VERSION=1
GTK_MINOR_VERSION=1
-GTK_MICRO_VERSION=0
+GTK_MICRO_VERSION=2
GTK_INTERFACE_AGE=0
GTK_BINARY_AGE=0
GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
AC_SUBST(GTK_MAJOR_VERSION)
AC_SUBST(GTK_MINOR_VERSION)
AC_SUBST(GTK_MICRO_VERSION)
+AC_SUBST(GTK_INTERFACE_AGE)
+AC_SUBST(GTK_BINARY_AGE)
AC_SUBST(GTK_VERSION)
# libtool versioning
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
-
# For automake.
VERSION=$GTK_VERSION
PACKAGE=gtk+
-# Configure glib
-AC_CONFIG_SUBDIRS(glib)
-
# Save this value here, since automake will set cflags later
cflags_set=${CFLAGS+set}
AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=minimum]],,enable_debug=minimum)
AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]],
, enable_ansi=no)
+AC_ARG_WITH(glib, [ --with-glib=DIR Use uninstalled copy of glib])
AC_ARG_ENABLE(xim, [ --enable-xim support XIM [default=yes]],
echo $enable_xim, enable_xim="yes")
AC_ARG_WITH(locale, [ --with-locale=LOCALE locale name you want to use ])
fi
fi
+AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}")
+
# Build time sanity check...
AM_SANITY_CHECK
fi
fi
-AC_MSG_CHECKING([For extra flags to get ANSI library prototypes])
-gtk_save_LDFLAGS=$LDFLAGS
+dnl DU4 native cc currently needs -std1 for ANSI mode (instead of K&R)
+AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
+gtk_save_LIBS=$LIBS
LIBS="$LIBS -lm"
AC_TRY_RUN([#include <math.h>
int main (void) { return (log(1) != log(1.)); }],
)
LIBS=$gtk_save_LIBS
+dnl NeXTStep cc seems to need this
+AC_MSG_CHECKING([for extra flags for POSIX compliance])
+AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
+ AC_MSG_RESULT(none needed),
+ gtk_save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -posix"
+ AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
+ AC_MSG_RESULT(-posix),
+ AC_MSG_RESULT()
+ CFLAGS=$gtk_save_CFLAGS
+ AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
+
if test "x$enable_xim" = "xyes"; then
CFLAGS="$CFLAGS -DUSE_XIM"
fi
+if test x$with_glib = xyes ; then
+ AC_MSG_ERROR([
+*** Directory must be specified for --with-glib])
+fi
+
+if test x$with_glib = x ; then
+ # Look for separately installed glib
+
+ AM_PATH_GLIB(1.1.3,,
+ AC_MSG_ERROR([
+*** GLIB 1.1.3 or better is required. The latest version of GLIB
+*** is always available from ftp://ftp.gtk.org.]),
+ gmodule)
+
+ glib_cflags=$GLIB_CFLAGS
+ glib_libs=$GLIB_LIBS
+else
+ # Use uninstalled glib (assume they got the version right)
+
+ if test -x $with_glib/glib-config ; then
+ :
+ else
+ AC_MSG_ERROR([GLIB directory ($with_glib) not present or not configured])
+ fi
+
+ # For use in gtk-config
+ glib_cflags=`$with_glib/glib-config --cflags`
+ glib_libs=`$with_glib/glib-config --libs`
+
+ glib_release=`$with_glib/glib-config --version | sed 's%\\.[[0-9]]*$%%'`
+
+ # canonicalize relative paths
+ case $with_glib in
+ /*)
+ glib_dir=$with_glib
+ ;;
+ *)
+ glib_dir="\$(top_builddir)/$with_glib"
+ ;;
+ esac
+
+ GLIB_CFLAGS="-I$glib_dir"
+ GLIB_LIBS=$glib_dir/libglib-$glib_release.la
+
+ AC_SUBST(GLIB_CFLAGS)
+ AC_SUBST(GLIB_LIBS)
+fi
+
+AC_SUBST(glib_cflags)
+AC_SUBST(glib_libs)
+
# Find the X11 include and library directories
AC_PATH_X
AC_PATH_XTRA
,
$x_libs)
+# Check for XConvertCase (X11R6 specific)
+
+AC_CHECK_LIB(X11, XConvertCase,
+ AC_DEFINE(HAVE_XCONVERTCASE),
+ ,
+ $x_libs)
+
x_cflags="$X_CFLAGS"
x_ldflags="$X_LDFLAGS $X_LIBS"
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
+# Checks for endianness (needed by GdkRgb).
+AC_C_BIGENDIAN
+
# Checks for library functions.
AC_TYPE_SIGNAL
AC_FUNC_MMAP
-# Check for sys/select.h
-
-AC_MSG_CHECKING([fd_set and sys/select])
+# Check if <sys/select.h> needs to be included for fd_set
+AC_MSG_CHECKING([for fd_set])
AC_TRY_COMPILE([#include <sys/types.h>],
[fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no)
-if test $gtk_ok = no; then
+if test $gtk_ok = yes; then
+ AC_MSG_RESULT([yes, found in sys/types.h])
+else
AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
if test $gtk_ok = yes; then
AC_DEFINE(HAVE_SYS_SELECT_H)
+ AC_MSG_RESULT([yes, found in sys/select.h])
+ else
+ AC_DEFINE(NO_FD_SET)
+ AC_MSG_RESULT(no)
fi
fi
-AC_MSG_RESULT($gtk_ok)
-if test $gtk_ok = no; then
- AC_DEFINE(NO_FD_SET)
-fi
AC_OUTPUT([
Makefile