2001-11-08 Tor Lillqvist <tml@iki.fi> * README.win32: Add headers. Add section about ActiveIMM. * configure.in: Add --with-ie55 flag to specify the location of the "IE55 libs and headers" package downloadable from Microsoft, which contains, among other things, the Active IMM header dimm.h and UUID library uuid.lib. Use test -f instead of AC_CHECK_FILE. Require GLib 1.3.10. * acconfig.h: Add HAVE_DIMM_H. * config.h.win32: Add comment regarding dimm.h. * gdk/Makefile.am * gdk/win32/Makefile.am: Handle the uuid library from the IE55 lib. * gdk/win32/gdkevents-win32.c: Conditionalize ActiveIMM stuff. * gdk/win32/surrogate-dimm.h: Remove, use real dimm.h instead (if available). * gdk/win32/libie55uuid.la: New file, handwritten libtool wrapper for uuid.lib. (Does it really have to be this hard to use an existing library with libtool? Probably I am missing something.)
697 lines
17 KiB
Plaintext
697 lines
17 KiB
Plaintext
# Process this file with autoconf to produce a configure script.
|
|
AC_INIT(gdk/gdktypes.h)
|
|
|
|
# Save this value here, since automake will set cflags later
|
|
cflags_set=${CFLAGS+set}
|
|
|
|
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?)
|
|
GLIB_AC_DIVERT_BEFORE_HELP([
|
|
#
|
|
# 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.
|
|
#
|
|
GTK_MAJOR_VERSION=1
|
|
GTK_MINOR_VERSION=3
|
|
GTK_MICRO_VERSION=0
|
|
GTK_INTERFACE_AGE=0
|
|
GTK_BINARY_AGE=0
|
|
GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
|
|
dnl
|
|
])dnl
|
|
|
|
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
|
|
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`
|
|
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
|
|
AC_SUBST(LT_RELEASE)
|
|
AC_SUBST(LT_CURRENT)
|
|
AC_SUBST(LT_REVISION)
|
|
AC_SUBST(LT_AGE)
|
|
AC_SUBST(LT_CURRENT_MINUS_AGE)
|
|
|
|
# For automake.
|
|
VERSION=$GTK_VERSION
|
|
PACKAGE=gtk+
|
|
|
|
# Save this value here, since automake will set cflags later
|
|
cflags_set=${CFLAGS+set}
|
|
|
|
dnl Initialize automake stuff
|
|
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
|
|
|
|
# Specify a configuration file
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
dnl Initialize libtool
|
|
AC_LIBTOOL_WIN32_DLL
|
|
AM_PROG_LIBTOOL
|
|
|
|
dnl Initialize maintainer mode
|
|
AM_MAINTAINER_MODE
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
AC_MSG_CHECKING([for some Win32 platform])
|
|
case "$host" in
|
|
*-*-mingw*|*-*-cygwin*)
|
|
platform_win32=yes
|
|
;;
|
|
*)
|
|
platform_win32=no
|
|
;;
|
|
esac
|
|
AC_MSG_RESULT([$platform_win32])
|
|
AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
|
|
|
|
AC_MSG_CHECKING([for native Win32])
|
|
case "$host" in
|
|
*-*-mingw*)
|
|
os_win32=yes
|
|
;;
|
|
*)
|
|
os_win32=no
|
|
;;
|
|
esac
|
|
AC_MSG_RESULT([$os_win32])
|
|
AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
|
|
|
|
if test "$os_win32" = "yes"; then
|
|
AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
|
|
fi
|
|
AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
|
|
|
|
dnl figure debugging default, prior to $ac_help setup
|
|
dnl
|
|
GLIB_AC_DIVERT_BEFORE_HELP([
|
|
if test `expr $GTK_MINOR_VERSION \% 2` = 1 ; then
|
|
debug_default=yes
|
|
else
|
|
debug_default=minimum
|
|
fi
|
|
])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)
|
|
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)
|
|
AC_ARG_ENABLE(xim, [ --enable-xim support XIM [default=yes]],
|
|
, enable_xim="yes")
|
|
AC_ARG_ENABLE(xim_inst, [ --disable-xim-inst does not use xim instantiate callback],
|
|
, enable_xim_inst="maybe")
|
|
AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes)
|
|
AC_ARG_WITH(locale, [ --with-locale=LOCALE locale name you want to use ])
|
|
|
|
AC_ARG_WITH(xinput, [ --with-xinput=[no/gxi/xfree] support XInput ])
|
|
|
|
AC_ARG_WITH(wintab, [ --with-wintab=DIRECTORY use Wintab API])
|
|
AC_ARG_WITH(ie55, [ --with-ie55=DIRECTORY IE5.5 libs and headers (for Active IMM)])
|
|
|
|
if test "x$enable_debug" = "xyes"; then
|
|
test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
|
|
GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
|
|
else
|
|
if test "x$enable_debug" = "xno"; then
|
|
GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DGTK_NO_CHECK_CASTS"
|
|
else
|
|
GTK_DEBUG_FLAGS="-DGTK_NO_CHECK_CASTS"
|
|
fi
|
|
fi
|
|
|
|
AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}")
|
|
|
|
# Build time sanity check...
|
|
AM_SANITY_CHECK
|
|
|
|
# Checks for programs.
|
|
AC_PROG_CC
|
|
AC_ISC_POSIX
|
|
AM_PROG_CC_STDC
|
|
AC_PROG_INSTALL
|
|
AC_PROG_MAKE_SET
|
|
|
|
changequote(,)dnl
|
|
if test "x$GCC" = "xyes"; then
|
|
case " $CFLAGS " in
|
|
*[\ \ ]-Wall[\ \ ]*) ;;
|
|
*) CFLAGS="$CFLAGS -Wall" ;;
|
|
esac
|
|
|
|
if test "x$enable_ansi" = "xyes"; then
|
|
case " $CFLAGS " in
|
|
*[\ \ ]-ansi[\ \ ]*) ;;
|
|
*) CFLAGS="$CFLAGS -ansi" ;;
|
|
esac
|
|
|
|
case " $CFLAGS " in
|
|
*[\ \ ]-pedantic[\ \ ]*) ;;
|
|
*) CFLAGS="$CFLAGS -pedantic" ;;
|
|
esac
|
|
fi
|
|
|
|
if test "$os_win32" = "yes"; then
|
|
case "$CC $CFLAGS " in
|
|
*[[\ \ ]]-fnative-struct[[\ \ ]]*) ;;
|
|
*) CFLAGS="$CFLAGS -fnative-struct" ;;
|
|
esac
|
|
fi
|
|
fi
|
|
changequote([,])dnl
|
|
|
|
# Honor aclocal flags
|
|
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
|
|
|
|
# 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)
|
|
|
|
# We would like indent, but don't require it.
|
|
AC_CHECK_PROG(INDENT, indent, indent)
|
|
|
|
REBUILD=\#
|
|
if test "x$enable_rebuilds" = "xyes" && \
|
|
test -n "$PERL" && \
|
|
$PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
|
|
test -n "$AWK" ; then
|
|
REBUILD=
|
|
fi
|
|
AC_SUBST(REBUILD)
|
|
|
|
AC_CHECK_FUNCS(lstat)
|
|
|
|
AC_MSG_CHECKING(whether make is GNU Make)
|
|
STRIP_BEGIN=
|
|
STRIP_END=
|
|
if $ac_make --version 2>/dev/null | grep '^GNU Make ' >/dev/null ; then
|
|
STRIP_BEGIN='$(strip'
|
|
STRIP_END=')'
|
|
AC_MSG_RESULT(yes)
|
|
else
|
|
AC_MSG_RESULT(no)
|
|
fi
|
|
AC_SUBST(STRIP_BEGIN)
|
|
AC_SUBST(STRIP_END)
|
|
|
|
# i18n stuff
|
|
ALL_LINGUAS="ca cs da de el es et eu fi fr ga gl hr hu it ja ko lt nl no pl pt pt_BR ru sk sl sv tr uk wa zh_TW.Big5 zh_CN.GB2312"
|
|
AM_GLIB_GNU_GETTEXT
|
|
LIBS="$LIBS $INTLLIBS"
|
|
|
|
# AM_GLIB_GNU_GETTEXT above substs $DATADIRNAME
|
|
# this is the directory where the *.{mo,gmo} files are installed
|
|
gtklocaledir='${prefix}/${DATADIRNAME}/locale'
|
|
AC_SUBST(gtklocaledir)
|
|
|
|
dnl The DU4 header files don't provide library prototypes unless
|
|
dnl -std1 is given to the native cc.
|
|
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.)); }],
|
|
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.)]),
|
|
true
|
|
),
|
|
AC_MSG_RESULT(none needed)
|
|
)
|
|
LIBS=$gtk_save_LIBS
|
|
|
|
MATH_LIB=-lm
|
|
GTK_LIBS_EXTRA=
|
|
AC_MSG_CHECKING(for the BeOS)
|
|
case $host in
|
|
*-*-beos*)
|
|
AC_MSG_RESULT(yes)
|
|
GTK_LIBS_EXTRA="-L\$(top_builddir_full)/gdk/.libs -lgdk"
|
|
MATH_LIB=
|
|
;;
|
|
*)
|
|
AC_MSG_RESULT(no)
|
|
;;
|
|
esac
|
|
AC_SUBST(MATH_LIB)
|
|
AC_SUBST(GTK_LIBS_EXTRA)
|
|
|
|
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.)])))
|
|
|
|
AM_PATH_GLIB_2_0(1.3.10,,
|
|
AC_MSG_ERROR([
|
|
*** GLIB 1.3.10 or better is required. The latest version of GLIB
|
|
*** is always available from ftp://ftp.gtk.org/.]),
|
|
gmodule gthread)
|
|
|
|
AC_CHECK_HEADERS(dirent.h, AC_DEFINE(HAVE_DIRENT_H))
|
|
AC_CHECK_HEADERS(pwd.h, AC_DEFINE(HAVE_PWD_H))
|
|
AC_CHECK_HEADERS(sys/time.h, AC_DEFINE(HAVE_SYS_TIME_H))
|
|
|
|
if test "${with_ie55+set}" = set && test $with_ie55 != no; then
|
|
AC_MSG_CHECKING([for dimm.h])
|
|
saved_CFLAGS="$CFLAGS"
|
|
CFLAGS="$CFLAGS -idirafter $with_ie55/Include"
|
|
AC_TRY_COMPILE([#include <windows.h>
|
|
#include <objbase.h>
|
|
#ifdef __GNUC__
|
|
/* The w32api imm.h clashes a bit with the IE5.5 dimm.h */
|
|
#define IMEMENUITEMINFOA hidden_IMEMENUITEMINFOA
|
|
#define IMEMENUITEMINFOW hidden_IMEMENUITEMINFOW
|
|
#include <imm.h>
|
|
#undef IMEMENUITEMINFOA
|
|
#undef IMEMENUITEMINFOW
|
|
#endif
|
|
#include <dimm.h>
|
|
],
|
|
[],
|
|
[AC_MSG_RESULT(yes)
|
|
AC_MSG_CHECKING([for IE55 uuid.lib])
|
|
if test -f $with_ie55/Lib/uuid.lib ; then
|
|
AC_MSG_RESULT(yes)
|
|
have_ie55=yes
|
|
AC_DEFINE(HAVE_DIMM_H)
|
|
IE55_UUID_LIB="$with_ie55/Lib/uuid.lib"
|
|
AC_SUBST(IE55_UUID_LIB)
|
|
else
|
|
AC_MSG_RESULT(no)
|
|
CFLAGS="$saved_CFLAGS"
|
|
have_ie55=no
|
|
fi
|
|
],
|
|
[AC_MSG_RESULT(no)
|
|
CFLAGS="$saved_CFLAGS"
|
|
have_ie55=no])
|
|
fi
|
|
AM_CONDITIONAL(HAVE_IE55, test x$have_ie55 = xyes)
|
|
|
|
if test "${with_wintab+set}" = set && test $with_wintab != no; then
|
|
AC_MSG_CHECKING([for wintab.h])
|
|
saved_CFLAGS="$CFLAGS"
|
|
CFLAGS="$CFLAGS -I$with_wintab/include"
|
|
AC_TRY_COMPILE([#include <windows.h>
|
|
#include <wintab.h>],
|
|
[],
|
|
[AC_MSG_RESULT(yes)
|
|
AC_MSG_CHECKING([for wntab32x.lib])
|
|
if test -f $with_wintab/lib/i386/wntab32x.lib ; then
|
|
AC_MSG_RESULT(yes)
|
|
have_wintab=yes
|
|
AC_DEFINE(HAVE_WINTAB_H)
|
|
WINTAB_LIB="$with_wintab/lib/i386/wntab32x.lib"
|
|
AC_SUBST(WINTAB_LIB)
|
|
else
|
|
AC_MSG_RESULT(no)
|
|
CFLAGS="$saved_cflags"
|
|
have_wintab=no
|
|
fi
|
|
],
|
|
[AC_MSG_RESULT(no)
|
|
CFLAGS="$saved_cflags"
|
|
have_wintab=no])
|
|
fi
|
|
AM_CONDITIONAL(HAVE_WINTAB, test x$have_wintab = xyes)
|
|
|
|
# Assume on Win32 we use Win32 backend, otherwise X11.
|
|
# But note that this is the gtk-1-3-win32-production branch
|
|
# anyway, so the X11 stuff is mostly just left here to make diffs smaller
|
|
# in case somebody wants to compare
|
|
|
|
if test "$platform_win32" = "yes"; then
|
|
gdktarget=win32
|
|
x_libs="-lgdi32 -luser32 -limm32 -lshell32 -lole32 -luuid"
|
|
if test x$have_wintab = xyes; then
|
|
x_includes="-I $with_wintab/include"
|
|
fi
|
|
AC_SUBST(x_includes)
|
|
AC_SUBST(x_libs)
|
|
else
|
|
gdktarget=x11
|
|
# 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"
|
|
|
|
CFLAGS="$CFLAGS $X_CFLAGS"
|
|
LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
|
|
|
|
if test "x$no_x" = "xyes"; then
|
|
AC_MSG_ERROR([
|
|
*** X libraries or include files not found. Check 'config.log' for
|
|
*** more details.])
|
|
fi
|
|
|
|
# Checks for libraries.
|
|
# Check for the X11 library
|
|
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)
|
|
|
|
if test "x$enable_shm" = "xyes"; then
|
|
# Check for the Xext library (needed for XShm extention)
|
|
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)
|
|
fi
|
|
|
|
# Check for shaped window extension
|
|
|
|
AC_CHECK_LIB(Xext, XShapeCombineMask,
|
|
if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then
|
|
x_libs="-lXext $x_libs"
|
|
fi
|
|
AC_DEFINE(HAVE_SHAPE_EXT),
|
|
,
|
|
$x_libs)
|
|
|
|
# Check for XConvertCase (X11R6 specific)
|
|
|
|
AC_CHECK_LIB(X11, XConvertCase,
|
|
AC_DEFINE(HAVE_XCONVERTCASE),
|
|
,
|
|
$x_libs)
|
|
|
|
# Check for XIM support.
|
|
|
|
AC_CHECK_LIB(X11, XUnregisterIMInstantiateCallback,
|
|
: ,
|
|
enable_xim_inst="no",
|
|
$x_libs)
|
|
|
|
# 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
|
|
|
|
if test "x$enable_xim" = "xyes"; then
|
|
GTK_XIM_FLAGS="-DUSE_XIM"
|
|
if test "x$enable_xim_inst" = "xyes"; then
|
|
AC_DEFINE(USE_X11R6_XIM)
|
|
fi
|
|
fi
|
|
|
|
x_cflags="$X_CFLAGS"
|
|
x_ldflags="$X_LDFLAGS $X_LIBS"
|
|
|
|
# set up things for XInput
|
|
|
|
if test "x$with_xinput" = "xgxi" || test "x$with_xinput" = "xyes"; then
|
|
AC_DEFINE(XINPUT_GXI)
|
|
xinput_progs=gxid
|
|
x_libs="-lXi $x_libs"
|
|
elif test "x$with_xinput" = "xxfree"; then
|
|
AC_DEFINE(XINPUT_XFREE)
|
|
x_libs="-lXi $x_libs"
|
|
else
|
|
AC_DEFINE(XINPUT_NONE)
|
|
fi
|
|
|
|
AM_CONDITIONAL(XINPUT_GXI, test x$with_xinput = xgxi)
|
|
AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree)
|
|
|
|
CFLAGS="$saved_cflags"
|
|
LDFLAGS="$saved_ldflags"
|
|
|
|
AC_SUBST(x_cflags)
|
|
AC_SUBST(x_includes)
|
|
AC_SUBST(x_ldflags)
|
|
AC_SUBST(x_libs)
|
|
AC_SUBST(xinput_progs)
|
|
|
|
if test "x$enable_shm" = "xyes"; then
|
|
# 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)
|
|
if test "x$no_xext_lib" = "xyes"; then
|
|
AC_MSG_RESULT(no)
|
|
no_xshm=yes
|
|
else
|
|
if test -f "$x_includes/X11/extensions/XShm.h"; then
|
|
AC_MSG_RESULT(yes)
|
|
AC_DEFINE(HAVE_XSHM_H)
|
|
else
|
|
AC_MSG_RESULT(no)
|
|
no_xshm=yes
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
# Check if X_LOCALE definition is necessary
|
|
|
|
AC_MSG_CHECKING(need -DX_LOCALE)
|
|
|
|
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,
|
|
need_x_locale=no)
|
|
AC_MSG_RESULT($need_x_locale)
|
|
|
|
if test $need_x_locale = yes; then
|
|
GTK_LOCALE_FLAGS="-DX_LOCALE"
|
|
fi
|
|
|
|
fi # !platform_win32
|
|
AC_SUBST(gdktarget)
|
|
|
|
# Checks for header files.
|
|
AC_HEADER_STDC
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
AC_C_CONST
|
|
|
|
# Checks for library functions.
|
|
AC_TYPE_SIGNAL
|
|
AC_FUNC_MMAP
|
|
|
|
# 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 = 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
|
|
|
|
# `widechar' tests for gdki18n.h
|
|
AC_MSG_CHECKING(for wchar.h)
|
|
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])
|
|
fi
|
|
AC_MSG_RESULT($gdk_wchar_h)
|
|
|
|
# Check for wctype.h (for iswalnum)
|
|
AC_MSG_CHECKING(for wctype.h)
|
|
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])
|
|
fi
|
|
AC_MSG_RESULT($gdk_wctype_h)
|
|
|
|
# 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"
|
|
# The following is necessary for Linux libc-5.4.38
|
|
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);
|
|
], gdk_working_wctype=yes, gdk_working_wctype=no)
|
|
LIBS="$oLIBS"
|
|
|
|
if test $gdk_working_wctype = no; then
|
|
AC_DEFINE(HAVE_BROKEN_WCTYPE,1,[Is the wctype implementation broken])
|
|
GDK_WLIBS=
|
|
fi
|
|
AC_MSG_RESULT($gdk_working_wctype)
|
|
AC_SUBST(GDK_WLIBS)
|
|
|
|
AC_SUBST(GTK_DEBUG_FLAGS)
|
|
AC_SUBST(GTK_XIM_FLAGS)
|
|
AC_SUBST(GTK_LOCALE_FLAGS)
|
|
|
|
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
|
|
$gdk_wc
|
|
_______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
|
|
],[
|
|
if test "$os_win32" = "yes"; then
|
|
gdk_windowing='
|
|
#define GDK_WINDOWING_WIN32
|
|
#define GDK_USE_UTF8_MBS'
|
|
else
|
|
gdk_windowing='
|
|
#define GDK_WINDOWING_X11'
|
|
fi
|
|
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
|
|
|
|
|
|
])
|
|
|
|
AC_OUTPUT([
|
|
Makefile
|
|
gtk+-1.3-win32-production.pc
|
|
gdk-1.3-win32-production.pc
|
|
po/Makefile.in
|
|
docs/Makefile
|
|
gdk/Makefile
|
|
gdk/makefile.mingw
|
|
gdk/makefile.msc
|
|
gdk/x11/Makefile
|
|
gdk/win32/Makefile
|
|
gdk/win32/rc/Makefile
|
|
gtk/Makefile
|
|
gtk/gtkfeatures.h
|
|
gtk/gtkcompat.h
|
|
])
|