1997-11-24 22:37:52 +00:00
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
AC_INIT(gdk/gdktypes.h)
|
|
|
|
|
1999-02-01 23:17:39 +00:00
|
|
|
# In the following, there are a the following variants
|
|
|
|
# of GLib cflags and libs variables
|
|
|
|
#
|
|
|
|
# GLIB_CFLAGS: cflags for compiling libraries and example progs
|
|
|
|
# GLIB_LIBS: libraries for linking example programs
|
|
|
|
# GLIB_DEPLIBS: libraries for linking libraries against
|
|
|
|
# glib_cflags: cflags to store in gtk-config
|
|
|
|
# glib_libs: libs to store in gtk-config
|
|
|
|
# glib_thread_cflags: cflags to store in gtk-config for gtk-config gthread
|
|
|
|
# glib_thread_libs: libs to store in gtk-config for gtk-config gthread
|
|
|
|
|
1997-12-18 02:17:14 +00:00
|
|
|
# Save this value here, since automake will set cflags later
|
|
|
|
cflags_set=${CFLAGS+set}
|
|
|
|
|
1999-02-15 06:51:28 +00:00
|
|
|
dnl we to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
|
|
|
|
dnl are available for $ac_help expansion (don't we all *love* autoconf?)
|
|
|
|
AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
|
|
|
|
#
|
1998-05-07 04:04:15 +00:00
|
|
|
# Making releases:
|
|
|
|
# GTK_MICRO_VERSION += 1;
|
|
|
|
# GTK_INTERFACE_AGE += 1;
|
|
|
|
# GTK_BINARY_AGE += 1;
|
|
|
|
# if any functions have been added, set GTK_INTERFACE_AGE to 0.
|
|
|
|
# if backwards compatibility has been broken,
|
|
|
|
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
|
|
|
|
#
|
1998-04-10 02:33:54 +00:00
|
|
|
GTK_MAJOR_VERSION=1
|
1999-02-27 00:26:30 +00:00
|
|
|
GTK_MINOR_VERSION=3
|
1999-02-25 21:39:14 +00:00
|
|
|
GTK_MICRO_VERSION=0
|
1999-02-16 21:25:25 +00:00
|
|
|
GTK_INTERFACE_AGE=0
|
|
|
|
GTK_BINARY_AGE=0
|
1997-12-14 08:49:30 +00:00
|
|
|
GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
|
1999-02-15 06:51:28 +00:00
|
|
|
dnl
|
|
|
|
AC_DIVERT_POP()dnl
|
|
|
|
|
1998-05-09 01:17:03 +00:00
|
|
|
AC_SUBST(GTK_MAJOR_VERSION)
|
|
|
|
AC_SUBST(GTK_MINOR_VERSION)
|
|
|
|
AC_SUBST(GTK_MICRO_VERSION)
|
1998-07-19 19:09:27 +00:00
|
|
|
AC_SUBST(GTK_INTERFACE_AGE)
|
|
|
|
AC_SUBST(GTK_BINARY_AGE)
|
1998-05-07 04:04:15 +00:00
|
|
|
AC_SUBST(GTK_VERSION)
|
|
|
|
|
|
|
|
# libtool versioning
|
|
|
|
LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
|
|
|
|
LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
|
|
|
|
LT_REVISION=$GTK_INTERFACE_AGE
|
|
|
|
LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
|
|
|
|
AC_SUBST(LT_RELEASE)
|
|
|
|
AC_SUBST(LT_CURRENT)
|
|
|
|
AC_SUBST(LT_REVISION)
|
|
|
|
AC_SUBST(LT_AGE)
|
|
|
|
|
1997-12-14 08:49:30 +00:00
|
|
|
# For automake.
|
|
|
|
VERSION=$GTK_VERSION
|
|
|
|
PACKAGE=gtk+
|
|
|
|
|
1997-12-18 02:17:14 +00:00
|
|
|
# Save this value here, since automake will set cflags later
|
|
|
|
cflags_set=${CFLAGS+set}
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
dnl Initialize automake stuff
|
1997-12-14 08:49:30 +00:00
|
|
|
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
|
1997-11-24 22:37:52 +00:00
|
|
|
|
|
|
|
# Specify a configuration file
|
|
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
|
|
|
|
dnl Initialize libtool
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
|
|
|
|
dnl Initialize maintainer mode
|
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
1999-02-15 06:51:28 +00:00
|
|
|
dnl figure debugging default, prior to $ac_help setup
|
|
|
|
dnl
|
|
|
|
AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
|
|
|
|
if test `expr $GTK_MINOR_VERSION \% 2` = 1 ; then
|
|
|
|
debug_default=yes
|
|
|
|
else
|
|
|
|
debug_default=minimum
|
|
|
|
fi
|
|
|
|
AC_DIVERT_POP()dnl
|
|
|
|
|
|
|
|
dnl declare --enable-* args and collect ac_help strings
|
|
|
|
AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
|
1997-11-24 22:37:52 +00:00
|
|
|
AC_ARG_ENABLE(shm, [ --enable-shm support shared memory if available [default=yes]],
|
|
|
|
echo $enable_shm, enable_shm="yes")
|
|
|
|
AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]],
|
|
|
|
, enable_ansi=no)
|
1998-06-10 23:44:55 +00:00
|
|
|
AC_ARG_WITH(glib, [ --with-glib=DIR Use uninstalled copy of glib])
|
1997-11-27 04:16:39 +00:00
|
|
|
AC_ARG_ENABLE(xim, [ --enable-xim support XIM [default=yes]],
|
1998-12-09 18:13:52 +00:00
|
|
|
, enable_xim="yes")
|
1999-01-28 03:38:58 +00:00
|
|
|
AC_ARG_ENABLE(xim_inst, [ --disable-xim-inst does not use xim instantiate callback],
|
|
|
|
, enable_xim_inst="maybe")
|
1997-11-27 04:16:39 +00:00
|
|
|
AC_ARG_WITH(locale, [ --with-locale=LOCALE locale name you want to use ])
|
1997-11-24 22:37:52 +00:00
|
|
|
|
1998-02-19 06:21:27 +00:00
|
|
|
AC_ARG_WITH(xinput, [ --with-xinput=[no/gxi/xfree] support XInput ])
|
1997-11-24 22:37:52 +00:00
|
|
|
|
1998-02-19 06:21:27 +00:00
|
|
|
if test "x$enable_debug" = "xyes"; then
|
1998-05-11 08:31:16 +00:00
|
|
|
test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
|
1998-12-01 10:42:01 +00:00
|
|
|
GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
|
1997-11-24 22:37:52 +00:00
|
|
|
else
|
1998-02-19 06:21:27 +00:00
|
|
|
if test "x$enable_debug" = "xno"; then
|
1998-12-01 10:42:01 +00:00
|
|
|
GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DGTK_NO_CHECK_CASTS"
|
1998-02-19 06:21:27 +00:00
|
|
|
else
|
1998-12-01 10:42:01 +00:00
|
|
|
GTK_DEBUG_FLAGS="-DGTK_NO_CHECK_CASTS"
|
1998-02-19 06:21:27 +00:00
|
|
|
fi
|
1997-11-24 22:37:52 +00:00
|
|
|
fi
|
|
|
|
|
1998-06-10 23:44:55 +00:00
|
|
|
AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}")
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
# Build time sanity check...
|
|
|
|
AM_SANITY_CHECK
|
|
|
|
|
|
|
|
# Checks for programs.
|
|
|
|
AC_PROG_CC
|
1998-12-15 05:27:17 +00:00
|
|
|
AC_ISC_POSIX
|
1997-11-24 22:37:52 +00:00
|
|
|
AM_PROG_CC_STDC
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
|
1998-11-01 01:44:05 +00:00
|
|
|
changequote(,)dnl
|
1997-12-11 17:06:25 +00:00
|
|
|
if test "x$GCC" = "xyes"; then
|
1998-11-01 01:44:05 +00:00
|
|
|
case " $CFLAGS " in
|
|
|
|
*[\ \ ]-Wall[\ \ ]*) ;;
|
|
|
|
*) CFLAGS="$CFLAGS -Wall" ;;
|
|
|
|
esac
|
1997-11-24 22:37:52 +00:00
|
|
|
|
1997-12-11 17:06:25 +00:00
|
|
|
if test "x$enable_ansi" = "xyes"; then
|
1998-11-01 01:44:05 +00:00
|
|
|
case " $CFLAGS " in
|
|
|
|
*[\ \ ]-ansi[\ \ ]*) ;;
|
|
|
|
*) CFLAGS="$CFLAGS -ansi" ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case " $CFLAGS " in
|
|
|
|
*[\ \ ]-pedantic[\ \ ]*) ;;
|
|
|
|
*) CFLAGS="$CFLAGS -pedantic" ;;
|
|
|
|
esac
|
1997-11-24 22:37:52 +00:00
|
|
|
fi
|
|
|
|
fi
|
1998-11-01 01:44:05 +00:00
|
|
|
changequote([,])dnl
|
1997-11-24 22:37:52 +00:00
|
|
|
|
1998-09-17 15:40:22 +00:00
|
|
|
# define a MAINT-like variable REBUILD which is set if Perl
|
|
|
|
# and awk are found, so autogenerated sources can be rebuilt
|
|
|
|
|
|
|
|
AC_PROG_AWK
|
|
|
|
AC_CHECK_PROGS(PERL, perl5 perl)
|
|
|
|
|
1998-09-20 14:58:08 +00:00
|
|
|
# We would like indent, but don't require it.
|
|
|
|
AC_CHECK_PROG(INDENT, indent, indent)
|
|
|
|
|
1998-09-17 15:40:22 +00:00
|
|
|
REBUILD=\#
|
|
|
|
if test -n "$PERL" && perl -v | grep 'version 5.' > /dev/null ; then
|
|
|
|
if test -n "$AWK" ; then
|
|
|
|
REBUILD=
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_SUBST(REBUILD)
|
1998-09-20 14:58:08 +00:00
|
|
|
|
1999-03-16 20:03:50 +00:00
|
|
|
AC_CHECK_FUNCS(lstat)
|
|
|
|
|
1998-12-14 17:39:58 +00:00
|
|
|
# i18n stuff
|
1999-02-16 22:25:54 +00:00
|
|
|
ALL_LINGUAS="cs de es fr hu it ja ko nl no pl pt ru sv"
|
1998-12-15 22:03:53 +00:00
|
|
|
AM_GTK_GNU_GETTEXT
|
1998-12-15 03:37:32 +00:00
|
|
|
AC_CHECK_FUNC(gettext,
|
|
|
|
,
|
|
|
|
AC_CHECK_LIB(intl, gettext)
|
|
|
|
)
|
1999-01-20 23:43:08 +00:00
|
|
|
# AM_GTK_GNU_GETTEXT above substs $DATADIRNAME
|
|
|
|
# this is the directory where the *.{mo,gmo} files are installed
|
|
|
|
gtklocaledir='${prefix}/${DATADIRNAME}/locale'
|
|
|
|
AC_SUBST(gtklocaledir)
|
1998-12-14 17:39:58 +00:00
|
|
|
|
1998-09-17 15:40:22 +00:00
|
|
|
dnl The DU4 header files don't provide library prototypes unless
|
|
|
|
dnl -std1 is given to the native cc.
|
1998-09-07 02:16:41 +00:00
|
|
|
AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
|
1998-09-17 15:40:22 +00:00
|
|
|
|
1998-09-08 03:09:54 +00:00
|
|
|
gtk_save_LIBS=$LIBS
|
1998-05-10 02:46:20 +00:00
|
|
|
LIBS="$LIBS -lm"
|
|
|
|
AC_TRY_RUN([#include <math.h>
|
|
|
|
int main (void) { return (log(1) != log(1.)); }],
|
|
|
|
AC_MSG_RESULT(none needed),
|
|
|
|
gtk_save_CFLAGS=$CFLAGS
|
|
|
|
CFLAGS="$CFLAGS -std1"
|
|
|
|
AC_TRY_RUN([#include <math.h>
|
|
|
|
int main (void) { return (log(1) != log(1.)); }],
|
|
|
|
AC_MSG_RESULT(-std1),
|
|
|
|
AC_MSG_RESULT()
|
|
|
|
CFLAGS=$gtk_save_CFLAGS
|
|
|
|
AC_MSG_WARN(
|
|
|
|
[No ANSI prototypes found in library. (-std1 didn't work.)])
|
|
|
|
)
|
|
|
|
)
|
|
|
|
LIBS=$gtk_save_LIBS
|
|
|
|
|
1998-09-09 09:51:44 +00:00
|
|
|
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.)])))
|
|
|
|
|
1998-06-10 23:44:55 +00:00
|
|
|
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
|
|
|
|
|
1999-03-17 02:43:20 +00:00
|
|
|
AM_PATH_GLIB(1.3.0,,
|
1998-06-10 23:44:55 +00:00
|
|
|
AC_MSG_ERROR([
|
1999-03-17 02:43:20 +00:00
|
|
|
*** GLIB 1.3.0 or better is required. The latest version of GLIB
|
1999-02-25 21:39:14 +00:00
|
|
|
*** is always available from ftp://ftp.gtk.org/.]),
|
1998-12-15 07:32:11 +00:00
|
|
|
gmodule gthread)
|
1998-06-10 23:44:55 +00:00
|
|
|
|
1998-12-18 10:01:21 +00:00
|
|
|
# we do not want to make all gtk progs to link to thread libraries.
|
|
|
|
glib_cflags=`$GLIB_CONFIG glib gmodule --cflags`
|
1999-02-01 23:17:39 +00:00
|
|
|
glib_thread_cflags="$GLIB_CFLAGS"
|
1998-12-18 10:01:21 +00:00
|
|
|
glib_libs=`$GLIB_CONFIG glib gmodule --libs`
|
1999-02-01 23:17:39 +00:00
|
|
|
glib_thread_libs="$GLIB_LIBS"
|
1998-12-19 22:27:03 +00:00
|
|
|
GLIB_LIBS="$glib_libs"
|
1999-01-27 22:08:46 +00:00
|
|
|
GLIB_DEPLIBS="$glib_libs"
|
1998-06-10 23:44:55 +00:00
|
|
|
else
|
|
|
|
# Use uninstalled glib (assume they got the version right)
|
|
|
|
|
1998-11-01 01:44:05 +00:00
|
|
|
GLIB_CONFIG=$with_glib/glib-config
|
|
|
|
if test -x $GLIB_CONFIG ; then
|
1998-06-10 23:44:55 +00:00
|
|
|
:
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR([GLIB directory ($with_glib) not present or not configured])
|
|
|
|
fi
|
|
|
|
|
|
|
|
# For use in gtk-config
|
1998-12-19 22:27:03 +00:00
|
|
|
glib_cflags=`$GLIB_CONFIG --cflags gmodule`
|
1999-02-01 23:17:39 +00:00
|
|
|
glib_thread_cflags=`$GLIB_CONFIG --cflags gmodule gthread`
|
1998-12-19 22:27:03 +00:00
|
|
|
glib_libs=`$GLIB_CONFIG --libs gmodule`
|
1999-02-01 23:17:39 +00:00
|
|
|
glib_thread_libs=`$GLIB_CONFIG --libs gmodule gthread`
|
1998-06-10 23:44:55 +00:00
|
|
|
|
1998-11-01 01:44:05 +00:00
|
|
|
glib_release=`$GLIB_CONFIG --version | sed 's%\\.[[0-9]]*$%%'`
|
1998-06-10 23:44:55 +00:00
|
|
|
|
|
|
|
# canonicalize relative paths
|
|
|
|
case $with_glib in
|
|
|
|
/*)
|
|
|
|
glib_dir=$with_glib
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
glib_dir="\$(top_builddir)/$with_glib"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
1999-01-27 22:08:46 +00:00
|
|
|
GLIB_CFLAGS="-I$glib_dir -I$glib_dir/gmodule"
|
1999-03-15 03:26:12 +00:00
|
|
|
GLIB_LIBS="$glib_dir/libglib.la $glib_dir/gmodule/libgmodule.la"
|
1999-01-27 22:08:46 +00:00
|
|
|
GLIB_DEPLIBS=
|
1998-06-10 23:44:55 +00:00
|
|
|
|
|
|
|
AC_SUBST(GLIB_CFLAGS)
|
|
|
|
AC_SUBST(GLIB_LIBS)
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(glib_cflags)
|
|
|
|
AC_SUBST(glib_libs)
|
1999-02-01 23:17:39 +00:00
|
|
|
AC_SUBST(glib_thread_cflags)
|
|
|
|
AC_SUBST(glib_thread_libs)
|
1999-01-27 22:08:46 +00:00
|
|
|
AC_SUBST(GLIB_DEPLIBS)
|
1998-06-10 23:44:55 +00:00
|
|
|
|
1999-03-13 01:14:19 +00:00
|
|
|
AC_CHECK_HEADERS(dirent.h, AC_DEFINE(HAVE_DIRENT_H))
|
|
|
|
AC_CHECK_HEADERS(pwd.h, AC_DEFINE(HAVE_PWD_H))
|
This might seem like a large patch, but it isn't that bad, and nothing
should break on Unix/X11.
Win32 merge and general portability stuff:
* acconfig.h,configure.in: Check for <sys/time.h>.
* gdk/win32: New directory (actually, been there for a while).
* gtk/fnmatch.c: Include <glib.h> for G_DIR_SEPARATOR, WIN32 and
NATIVE_WIN32, and use these. Always case fold on Win32. No
backslashed escapes on native Win32.
* gtk/{gtk.def,makefile.msc}: New files.
* gtk/Makefile.am: Add above new files.
* gtk/{gtkaccelgroup,gtkbindings}.c: Include <string.h>
instead of <strings.h>.
* gtk/{gtkcalendar,gtkitemfactory,gtkpreview,gtkrc}.c: Include
config.h. Protect inclusion of <sys/param.h>, <sys/time.h>, and
<unistd.h> appropriately.
* gtk/gtkdnd.c: Merge in Win32 version (which doesn't do much).
Use ABS() (from <glib.h>) instead of abs().
* gtk/gtkfilesel.c: Moved Win32-specific includes after inclusion
of gtk (and thus glib) headers, so that WIN32 will be
defined. With MS C, include <direct.h> for mkdir prototype.
* gtk/gtkitemfactory.c (gtk_item_factory_callback_marshal): Add
some casts, needed by MS C.
* gtk/{gtklayout,gtkplug}.c: Merge in Win32 version (which isn't
implemented).
* gtk/gtkmain.c: Include gdk/gdkx.h for GDK_WINDOWING. Include
<X11/Xlocale.h> only on X11 platform, otherwise <locale.h>. Use
G_SEARCHPATH_SEPARATOR_S and g_module_build_path.
* gtk/gtkmain.h: Mark variables for export/import on Win32.
* gtk/gtkrange.c (gtk_range_motion_notify): Set mods also in case
the event is not a hint, or its window is not the slider. Needed
on Win32, at least.
* gtk/gtkrc.c: Include config.h and gdk/gdkx.h. Use <locale.h>
unless on X11. Skip \r chars, too. Use G_DIR_SEPARATOR and
G_SEARCHPATH_SEPARATOR(_S). Use g_path_is_absolute. On Win32, use
a subdirectory of the Windows directory as gtk system
configuration directory.
* gtk/gtkselection.c: No chunks on Win32.
* gtk/gtksocket.c: Not implemented on Win32.
* gtk/gtkthemes.c (gtk_theme_engine_get): Use g_module_build_path.
* gtk/makeenums.h: Include gdkprivate.h after gdk.h.
* gtk/testrgb.c: Use dynamically allocated buffer. Use GTimers.
1999-03-15 00:03:37 +00:00
|
|
|
AC_CHECK_HEADERS(sys/time.h, AC_DEFINE(HAVE_SYS_TIME_H))
|
1999-03-13 01:14:19 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
# Find the X11 include and library directories
|
|
|
|
AC_PATH_X
|
|
|
|
AC_PATH_XTRA
|
|
|
|
|
|
|
|
if test "x$x_includes" = "x"; then
|
|
|
|
x_includes="/usr/include"
|
|
|
|
fi
|
|
|
|
|
|
|
|
saved_cflags="$CFLAGS"
|
|
|
|
saved_ldflags="$LDFLAGS"
|
|
|
|
|
1998-06-09 23:18:11 +00:00
|
|
|
CFLAGS="$CFLAGS $X_CFLAGS"
|
|
|
|
LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
|
1997-11-24 22:37:52 +00:00
|
|
|
|
1998-05-24 02:48:09 +00:00
|
|
|
if test "x$no_x" = "xyes"; then
|
|
|
|
AC_MSG_ERROR([
|
|
|
|
*** X libraries or include files not found. Check 'config.log' for
|
|
|
|
*** more details.])
|
|
|
|
fi
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
# Checks for libraries.
|
|
|
|
# Check for the X11 library
|
1998-05-24 02:48:09 +00:00
|
|
|
AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS",
|
|
|
|
AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]),
|
|
|
|
$X_EXTRA_LIBS)
|
1997-11-24 22:37:52 +00:00
|
|
|
|
1997-12-11 17:06:25 +00:00
|
|
|
if test "x$enable_shm" = "xyes"; then
|
1997-11-24 22:37:52 +00:00
|
|
|
# Check for the Xext library (needed for XShm extention)
|
1998-03-30 23:04:51 +00:00
|
|
|
AC_CHECK_LIB(Xext, XShmAttach,
|
|
|
|
x_libs="-lXext $x_libs",
|
|
|
|
# On AIX, it is in XextSam instead, but we still need -lXext
|
|
|
|
AC_CHECK_LIB(XextSam, XShmAttach,
|
|
|
|
x_libs="-lXextSam -lXext $x_libs",
|
|
|
|
no_xext_lib=yes, $x_libs),
|
|
|
|
$x_libs)
|
1997-11-24 22:37:52 +00:00
|
|
|
fi
|
|
|
|
|
1998-05-03 22:41:32 +00:00
|
|
|
# Check for shaped window extension
|
|
|
|
|
|
|
|
AC_CHECK_LIB(Xext, XShapeCombineMask,
|
|
|
|
if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then
|
1998-06-09 23:18:11 +00:00
|
|
|
x_libs="-lXext $x_libs"
|
1998-05-03 22:41:32 +00:00
|
|
|
fi
|
1998-05-04 22:13:02 +00:00
|
|
|
AC_DEFINE(HAVE_SHAPE_EXT),
|
|
|
|
,
|
|
|
|
$x_libs)
|
1998-05-03 22:41:32 +00:00
|
|
|
|
1998-06-28 05:44:14 +00:00
|
|
|
# Check for XConvertCase (X11R6 specific)
|
|
|
|
|
|
|
|
AC_CHECK_LIB(X11, XConvertCase,
|
|
|
|
AC_DEFINE(HAVE_XCONVERTCASE),
|
|
|
|
,
|
|
|
|
$x_libs)
|
|
|
|
|
1998-12-09 18:13:52 +00:00
|
|
|
# Check for XIM support.
|
|
|
|
|
|
|
|
AC_CHECK_LIB(X11, XUnregisterIMInstantiateCallback,
|
1998-12-09 22:40:42 +00:00
|
|
|
: ,
|
1999-01-28 03:38:58 +00:00
|
|
|
enable_xim_inst="no",
|
1998-12-09 18:13:52 +00:00
|
|
|
$x_libs)
|
|
|
|
|
1999-01-28 03:38:58 +00:00
|
|
|
# On Solaris, calling XRegisterIMInstantiateCallback seems to
|
|
|
|
# cause an immediate segfault, so we disable it, unless
|
|
|
|
# the user specifically forces it to be on.
|
|
|
|
|
|
|
|
if test x$enable_xim_inst = xmaybe ; then
|
|
|
|
case host in
|
|
|
|
*-*-solaris*)
|
|
|
|
enable_xim_inst="no"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
enable_xim_inst="yes"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
1998-12-09 18:13:52 +00:00
|
|
|
if test "x$enable_xim" = "xyes"; then
|
|
|
|
GTK_XIM_FLAGS="-DUSE_XIM"
|
1999-02-10 00:21:09 +00:00
|
|
|
if test "x$enable_xim_inst" = "xyes"; then
|
|
|
|
AC_DEFINE(USE_X11R6_XIM)
|
1999-01-28 03:38:58 +00:00
|
|
|
fi
|
1998-12-09 18:13:52 +00:00
|
|
|
fi
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
x_cflags="$X_CFLAGS"
|
|
|
|
x_ldflags="$X_LDFLAGS $X_LIBS"
|
|
|
|
|
|
|
|
# set up things for XInput
|
|
|
|
|
1998-01-02 05:15:34 +00:00
|
|
|
if test "x$with_xinput" = "xgxi" || test "x$with_xinput" = "xyes"; then
|
1997-11-24 22:37:52 +00:00
|
|
|
AC_DEFINE(XINPUT_GXI)
|
|
|
|
xinput_progs=gxid
|
|
|
|
x_libs="-lXi $x_libs"
|
1997-12-11 17:06:25 +00:00
|
|
|
elif test "x$with_xinput" = "xxfree"; then
|
1997-11-24 22:37:52 +00:00
|
|
|
AC_DEFINE(XINPUT_XFREE)
|
|
|
|
x_libs="-lXi $x_libs"
|
|
|
|
else
|
|
|
|
AC_DEFINE(XINPUT_NONE)
|
|
|
|
fi
|
|
|
|
|
1998-12-01 10:42:01 +00:00
|
|
|
CFLAGS="$saved_cflags"
|
|
|
|
LDFLAGS="$saved_ldflags"
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
AC_SUBST(x_cflags)
|
|
|
|
AC_SUBST(x_includes)
|
|
|
|
AC_SUBST(x_ldflags)
|
|
|
|
AC_SUBST(x_libs)
|
|
|
|
AC_SUBST(xinput_progs)
|
|
|
|
|
1997-12-11 17:06:25 +00:00
|
|
|
if test "x$enable_shm" = "xyes"; then
|
1997-11-24 22:37:52 +00:00
|
|
|
# Check for shared memory
|
|
|
|
AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc=yes)
|
|
|
|
AC_CHECK_HEADER(sys/shm.h, AC_DEFINE(HAVE_SHM_H), no_sys_shm=yes)
|
|
|
|
|
|
|
|
# Check for the X shared memory extension header file
|
|
|
|
AC_MSG_CHECKING(X11/extensions/XShm.h)
|
1998-01-03 15:08:41 +00:00
|
|
|
if test "x$no_xext_lib" = "xyes"; then
|
1997-11-24 22:37:52 +00:00
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
no_xshm=yes
|
|
|
|
else
|
1997-12-11 17:06:25 +00:00
|
|
|
if test -f "$x_includes/X11/extensions/XShm.h"; then
|
1997-11-24 22:37:52 +00:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_XSHM_H)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
no_xshm=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
1997-11-27 04:16:39 +00:00
|
|
|
# Check if X_LOCALE definition is necessary
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(need -DX_LOCALE)
|
1997-12-18 02:17:14 +00:00
|
|
|
|
|
|
|
AC_TRY_RUN([
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <locale.h>
|
|
|
|
|
|
|
|
int
|
|
|
|
main ()
|
|
|
|
{
|
|
|
|
return setlocale (LC_ALL, "${with_locale}") == NULL;
|
|
|
|
}],
|
|
|
|
need_x_locale=no,
|
|
|
|
need_x_locale=yes)
|
|
|
|
AC_MSG_RESULT($need_x_locale)
|
|
|
|
|
1997-12-10 02:28:14 +00:00
|
|
|
if test $need_x_locale = yes; then
|
1998-12-01 10:42:01 +00:00
|
|
|
GTK_LOCALE_CFLAGS="-DX_LOCALE"
|
1997-11-27 04:16:39 +00:00
|
|
|
fi
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
# Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_C_CONST
|
|
|
|
|
|
|
|
# Checks for library functions.
|
|
|
|
AC_TYPE_SIGNAL
|
1998-01-08 20:25:33 +00:00
|
|
|
AC_FUNC_MMAP
|
1997-11-24 22:37:52 +00:00
|
|
|
|
1998-06-11 00:12:59 +00:00
|
|
|
# Check if <sys/select.h> needs to be included for fd_set
|
|
|
|
AC_MSG_CHECKING([for fd_set])
|
1997-11-24 22:37:52 +00:00
|
|
|
AC_TRY_COMPILE([#include <sys/types.h>],
|
|
|
|
[fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no)
|
1998-06-11 00:12:59 +00:00
|
|
|
if test $gtk_ok = yes; then
|
|
|
|
AC_MSG_RESULT([yes, found in sys/types.h])
|
|
|
|
else
|
1997-11-24 22:37:52 +00:00
|
|
|
AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
|
|
|
|
if test $gtk_ok = yes; then
|
|
|
|
AC_DEFINE(HAVE_SYS_SELECT_H)
|
1998-06-11 00:12:59 +00:00
|
|
|
AC_MSG_RESULT([yes, found in sys/select.h])
|
|
|
|
else
|
|
|
|
AC_DEFINE(NO_FD_SET)
|
|
|
|
AC_MSG_RESULT(no)
|
1997-11-24 22:37:52 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
1999-03-14 03:27:33 +00:00
|
|
|
# `widechar' tests for gdki18n.h
|
1998-11-01 01:44:05 +00:00
|
|
|
AC_MSG_CHECKING(for wchar.h)
|
1999-03-14 03:27:33 +00:00
|
|
|
AC_TRY_CPP([#include <wchar.h>], gdk_wchar_h=yes, gdk_wchar_h=no)
|
|
|
|
if test $gdk_wchar_h = yes; then
|
|
|
|
AC_DEFINE(HAVE_WCHAR_H,1,[Have wchar.h include file])
|
1998-11-01 01:44:05 +00:00
|
|
|
fi
|
1999-03-14 03:27:33 +00:00
|
|
|
AC_MSG_RESULT($gdk_wchar_h)
|
1998-11-01 01:44:05 +00:00
|
|
|
|
|
|
|
# Check for wctype.h (for iswalnum)
|
|
|
|
AC_MSG_CHECKING(for wctype.h)
|
1999-03-14 03:27:33 +00:00
|
|
|
AC_TRY_CPP([#include <wctype.h>], gdk_wctype_h=yes, gdk_wctype_h=no)
|
|
|
|
if test $gdk_wctype_h = yes; then
|
|
|
|
AC_DEFINE(HAVE_WCTYPE_H,1,[Have wctype.h include file])
|
1998-11-01 01:44:05 +00:00
|
|
|
fi
|
1999-03-14 03:27:33 +00:00
|
|
|
AC_MSG_RESULT($gdk_wctype_h)
|
1998-11-01 01:44:05 +00:00
|
|
|
|
|
|
|
# in Solaris 2.5, `iswalnum' is in -lw
|
|
|
|
GDK_WLIBS=
|
|
|
|
AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
|
|
|
|
|
|
|
|
oLIBS="$LIBS"
|
|
|
|
LIBS="$LIBS $GDK_WLIBS"
|
1999-03-14 03:27:33 +00:00
|
|
|
# The following is necessary for Linux libc-5.4.38
|
1998-11-01 01:44:05 +00:00
|
|
|
AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
|
|
|
|
AC_TRY_LINK([#include <stdlib.h>],[
|
|
|
|
#if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
|
|
|
|
# ifdef HAVE_WCTYPE_H
|
|
|
|
# include <wctype.h>
|
|
|
|
# else
|
|
|
|
# ifdef HAVE_WCHAR_H
|
|
|
|
# include <wchar.h>
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
#else
|
|
|
|
# define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
|
|
|
|
#endif
|
|
|
|
iswalnum((wchar_t) 0);
|
1999-03-14 03:27:33 +00:00
|
|
|
], gdk_working_wctype=yes, gdk_working_wctype=no)
|
1998-11-01 01:44:05 +00:00
|
|
|
LIBS="$oLIBS"
|
|
|
|
|
1999-03-14 03:27:33 +00:00
|
|
|
if test $gdk_working_wctype = no; then
|
|
|
|
AC_DEFINE(HAVE_BROKEN_WCTYPE,1,[Is the wctype implementation broken])
|
1998-11-01 01:44:05 +00:00
|
|
|
GDK_WLIBS=
|
|
|
|
fi
|
1999-03-14 03:27:33 +00:00
|
|
|
AC_MSG_RESULT($gdk_working_wctype)
|
1998-11-01 01:44:05 +00:00
|
|
|
AC_SUBST(GDK_WLIBS)
|
|
|
|
|
1998-12-01 10:42:01 +00:00
|
|
|
AC_SUBST(GTK_DEBUG_FLAGS)
|
|
|
|
AC_SUBST(GTK_XIM_FLAGS)
|
|
|
|
AC_SUBST(GTK_LOCALE_FLAGS)
|
|
|
|
|
1999-03-13 16:40:24 +00:00
|
|
|
AC_OUTPUT_COMMANDS([
|
|
|
|
|
|
|
|
## Generate `gdk/gdkconfig.h' in two cases
|
|
|
|
## 1. `config.status' is run either explicitly, or via configure.
|
|
|
|
## Esp. not when it is run in `Makefile' to generate makefiles and
|
|
|
|
## config.h
|
|
|
|
## 2. CONFIG_OTHER is set explicitly
|
|
|
|
##
|
|
|
|
## Case 1 is difficult. We know that `automake' sets one of
|
|
|
|
## CONFIG_FILES or CONFIG_HEADERS to empty. This heuristic works
|
|
|
|
## only when AM_CONFIG_HEADER is set, however.
|
|
|
|
|
|
|
|
if test -n "${CONFIG_FILES}" && test -n "${CONFIG_HEADERS}"; then
|
|
|
|
# Both CONFIG_FILES and CONFIG_HEADERS are non-empty ==> Case 1
|
|
|
|
CONFIG_OTHER=${CONFIG_OTHER:-gdk/gdkconfig.h}
|
|
|
|
fi
|
|
|
|
case "$CONFIG_OTHER" in
|
|
|
|
*gdk/gdkconfig.h*)
|
|
|
|
echo creating gdk/gdkconfig.h
|
|
|
|
outfile=gdkconfig.h-tmp
|
|
|
|
cat > $outfile <<\_______EOF
|
|
|
|
/* gdkconfig.h
|
|
|
|
*
|
|
|
|
* This is a generated file. Please modify `configure.in'
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GDKCONFIG_H
|
|
|
|
#define GDKCONFIG_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
_______EOF
|
|
|
|
|
|
|
|
cat >>$outfile <<_______EOF
|
|
|
|
$gdk_windowing
|
1999-03-14 03:27:33 +00:00
|
|
|
$gdk_wc
|
1999-03-13 16:40:24 +00:00
|
|
|
_______EOF
|
|
|
|
|
|
|
|
cat >>$outfile <<_______EOF
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
#endif /* GDKCONFIG_H */
|
|
|
|
_______EOF
|
|
|
|
|
|
|
|
|
|
|
|
if cmp -s $outfile gdk/gdkconfig.h; then
|
|
|
|
echo gdk/gdkconfig.h is unchanged
|
|
|
|
rm -f $outfile
|
|
|
|
else
|
|
|
|
mv $outfile gdk/gdkconfig.h
|
|
|
|
fi ;;
|
|
|
|
esac
|
|
|
|
],[
|
|
|
|
# Currently we always use X11 on those systems where we run configure...
|
|
|
|
gdk_windowing='
|
|
|
|
#define GDK_WINDOWING GDK_WINDOWING_X11'
|
1999-03-14 03:27:33 +00:00
|
|
|
if test x$gdk_wchar_h = xyes; then
|
|
|
|
gdk_wc='
|
|
|
|
#define GDK_HAVE_WCHAR_H 1'
|
|
|
|
fi
|
|
|
|
if test x$gdk_wctype_h = xyes; then
|
|
|
|
gdk_wc="\$gdk_wc
|
|
|
|
#define GDK_HAVE_WCTYPE_H 1"
|
|
|
|
fi
|
|
|
|
if test x$gdk_working_wctype = xno; then
|
|
|
|
gdk_wc="\$gdk_wc
|
|
|
|
#define GDK_HAVE_BROKEN_WCTYPE 1"
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
1999-03-13 16:40:24 +00:00
|
|
|
])
|
|
|
|
|
1998-05-09 01:17:03 +00:00
|
|
|
AC_OUTPUT([
|
1999-02-21 21:00:23 +00:00
|
|
|
gtk+.spec
|
1998-05-09 01:17:03 +00:00
|
|
|
Makefile
|
|
|
|
gtk-config
|
1998-12-14 17:39:58 +00:00
|
|
|
po/Makefile.in
|
1998-05-09 01:17:03 +00:00
|
|
|
docs/Makefile
|
|
|
|
gdk/Makefile
|
|
|
|
gtk/Makefile
|
1999-03-17 02:43:20 +00:00
|
|
|
gtk/gtkcompat.h
|
1998-05-09 01:17:03 +00:00
|
|
|
], [chmod +x gtk-config])
|