Lines 1-6
Link Here
|
|
|
1 |
builtin(include,gtk.m4) |
2 |
|
3 |
|
1 |
# Process this file with autoconf to produce a configure script. |
4 |
# Process this file with autoconf to produce a configure script. |
2 |
AC_INIT(gdk/gdktypes.h) |
5 |
AC_INIT(gdk/gdktypes.h) |
3 |
|
|
|
4 |
# In the following, there are a the following variants |
6 |
# In the following, there are a the following variants |
5 |
# of GLib cflags and libs variables |
7 |
# of GLib cflags and libs variables |
6 |
# |
8 |
# |
Lines 12-23
Link Here
|
12 |
# glib_thread_cflags: cflags to store in gtk-config for gtk-config gthread |
14 |
# glib_thread_cflags: cflags to store in gtk-config for gtk-config gthread |
13 |
# glib_thread_libs: libs to store in gtk-config for gtk-config gthread |
15 |
# glib_thread_libs: libs to store in gtk-config for gtk-config gthread |
14 |
|
16 |
|
|
|
17 |
AC_CANONICAL_TARGET |
15 |
# Save this value here, since automake will set cflags later |
18 |
# Save this value here, since automake will set cflags later |
16 |
cflags_set=${CFLAGS+set} |
19 |
cflags_set=${CFLAGS+set} |
17 |
|
20 |
|
18 |
dnl we need to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they |
21 |
GTK_AC_DIVERT_BEFORE_HELP([ |
19 |
dnl are available for $ac_help expansion (don't we all *love* autoconf?) |
|
|
20 |
AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl |
21 |
# |
22 |
# |
22 |
# Making releases: |
23 |
# Making releases: |
23 |
# GTK_MICRO_VERSION += 1; |
24 |
# GTK_MICRO_VERSION += 1; |
Lines 32-40
Link Here
|
32 |
GTK_MICRO_VERSION=10 |
33 |
GTK_MICRO_VERSION=10 |
33 |
GTK_INTERFACE_AGE=1 |
34 |
GTK_INTERFACE_AGE=1 |
34 |
GTK_BINARY_AGE=10 |
35 |
GTK_BINARY_AGE=10 |
35 |
GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION |
36 |
GTK_VERSION="$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION" |
36 |
dnl |
37 |
]) |
37 |
AC_DIVERT_POP()dnl |
|
|
38 |
|
38 |
|
39 |
AC_SUBST(GTK_MAJOR_VERSION) |
39 |
AC_SUBST(GTK_MAJOR_VERSION) |
40 |
AC_SUBST(GTK_MINOR_VERSION) |
40 |
AC_SUBST(GTK_MINOR_VERSION) |
Lines 44-52
Link Here
|
44 |
AC_SUBST(GTK_VERSION) |
44 |
AC_SUBST(GTK_VERSION) |
45 |
|
45 |
|
46 |
# libtool versioning |
46 |
# libtool versioning |
47 |
LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION |
47 |
LT_RELEASE="$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION" |
48 |
LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE` |
48 |
LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE` |
49 |
LT_REVISION=$GTK_INTERFACE_AGE |
49 |
LT_REVISION="$GTK_INTERFACE_AGE" |
50 |
LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE` |
50 |
LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE` |
51 |
AC_SUBST(LT_RELEASE) |
51 |
AC_SUBST(LT_RELEASE) |
52 |
AC_SUBST(LT_CURRENT) |
52 |
AC_SUBST(LT_CURRENT) |
Lines 54-64
Link Here
|
54 |
AC_SUBST(LT_AGE) |
54 |
AC_SUBST(LT_AGE) |
55 |
|
55 |
|
56 |
# For automake. |
56 |
# For automake. |
57 |
VERSION=$GTK_VERSION |
57 |
VERSION="$GTK_VERSION" |
58 |
PACKAGE=gtk+ |
58 |
PACKAGE="gtk+" |
59 |
|
|
|
60 |
# Save this value here, since automake will set cflags later |
61 |
cflags_set=${CFLAGS+set} |
62 |
|
59 |
|
63 |
dnl Initialize automake stuff |
60 |
dnl Initialize automake stuff |
64 |
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define) |
61 |
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define) |
Lines 67-108
Link Here
|
67 |
AM_CONFIG_HEADER(config.h) |
64 |
AM_CONFIG_HEADER(config.h) |
68 |
|
65 |
|
69 |
dnl Initialize libtool |
66 |
dnl Initialize libtool |
70 |
AM_PROG_LIBTOOL |
67 |
AC_PROG_LIBTOOL |
71 |
|
68 |
|
72 |
dnl Initialize maintainer mode |
69 |
dnl Initialize maintainer mode |
73 |
AM_MAINTAINER_MODE |
70 |
AM_MAINTAINER_MODE |
74 |
|
71 |
|
75 |
AC_CANONICAL_HOST |
|
|
76 |
|
77 |
dnl figure debugging default, prior to $ac_help setup |
72 |
dnl figure debugging default, prior to $ac_help setup |
78 |
dnl |
73 |
|
79 |
AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl |
74 |
GTK_AC_DIVERT_BEFORE_HELP([ |
80 |
if test `expr $GTK_MINOR_VERSION \% 2` = 1 ; then |
75 |
if test `expr $GTK_MINOR_VERSION \% 2` = 1 ; then |
81 |
debug_default=yes |
76 |
debug_default="yes" |
82 |
else |
77 |
else |
83 |
debug_default=minimum |
78 |
debug_default="minimum" |
84 |
fi |
79 |
fi |
85 |
AC_DIVERT_POP()dnl |
80 |
]) |
86 |
|
|
|
87 |
dnl declare --enable-* args and collect ac_help strings |
81 |
dnl declare --enable-* args and collect ac_help strings |
88 |
AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default) |
82 |
AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],, |
|
|
83 |
[enable_debug="$debug_default"]) |
89 |
AC_ARG_ENABLE(shm, [ --enable-shm support shared memory if available [default=yes]], |
84 |
AC_ARG_ENABLE(shm, [ --enable-shm support shared memory if available [default=yes]], |
90 |
echo $enable_shm, enable_shm="yes") |
85 |
[echo "$enable_shm"],[enable_shm="yes"]) |
91 |
AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]], |
86 |
AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]],,[enable_ansi="no"]) |
92 |
, enable_ansi=no) |
|
|
93 |
AC_ARG_WITH(glib, [ --with-glib=DIR Use uninstalled copy of glib]) |
87 |
AC_ARG_WITH(glib, [ --with-glib=DIR Use uninstalled copy of glib]) |
94 |
AC_ARG_ENABLE(xim, [ --enable-xim support XIM [default=yes]], |
88 |
AC_ARG_ENABLE(xim, [ --enable-xim support XIM [default=yes]],,[enable_xim="yes"]) |
95 |
, enable_xim="yes") |
89 |
AC_ARG_ENABLE(xim_inst, [ --disable-xim-inst does not use xim instantiate callback],, |
96 |
AC_ARG_ENABLE(xim_inst, [ --disable-xim-inst does not use xim instantiate callback], |
90 |
[enable_xim_inst="maybe"]) |
97 |
, enable_xim_inst="maybe") |
91 |
AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],, |
98 |
AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes) |
92 |
[enable_rebuilds="yes"]) |
99 |
AC_ARG_WITH(locale, [ --with-locale=LOCALE locale name you want to use ]) |
93 |
AC_ARG_WITH(locale, [ --with-locale=LOCALE locale name you want to use ]) |
100 |
|
|
|
101 |
AC_ARG_WITH(xinput, [ --with-xinput=[no/gxi/xfree] support XInput ]) |
94 |
AC_ARG_WITH(xinput, [ --with-xinput=[no/gxi/xfree] support XInput ]) |
102 |
AC_ARG_WITH(native_locale, [ --with-native-locale=[yes/no] Use native locale support [default=no]],,with_native_locale=no) |
95 |
AC_ARG_WITH(native_locale, [ --with-native-locale=[yes/no] Use native locale support [default=no]],, |
|
|
96 |
[with_native_locale="no"]) |
97 |
|
103 |
|
98 |
|
104 |
if test "x$enable_debug" = "xyes"; then |
99 |
if test "x$enable_debug" = "xyes"; then |
105 |
test "$cflags_set" = set || CFLAGS="$CFLAGS -g" |
100 |
test "$cflags_set" = "set" || CFLAGS="$CFLAGS -g" |
106 |
GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG" |
101 |
GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG" |
107 |
else |
102 |
else |
108 |
if test "x$enable_debug" = "xno"; then |
103 |
if test "x$enable_debug" = "xno"; then |
Lines 113-128
Link Here
|
113 |
fi |
108 |
fi |
114 |
|
109 |
|
115 |
AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}") |
110 |
AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}") |
116 |
|
|
|
117 |
# Build time sanity check... |
111 |
# Build time sanity check... |
118 |
AM_SANITY_CHECK |
112 |
AM_SANITY_CHECK |
119 |
|
113 |
|
120 |
# Checks for programs. |
114 |
# Checks for programs. |
121 |
AC_PROG_CC |
115 |
AC_PROG_CC |
122 |
AC_ISC_POSIX |
116 |
AC_ISC_POSIX |
123 |
AM_PROG_CC_STDC |
117 |
AC_PROG_CC_STDC |
124 |
AC_PROG_INSTALL |
118 |
AC_PROG_INSTALL |
125 |
AC_PROG_MAKE_SET |
|
|
126 |
|
119 |
|
127 |
changequote(,)dnl |
120 |
changequote(,)dnl |
128 |
if test "x$GCC" = "xyes"; then |
121 |
if test "x$GCC" = "xyes"; then |
Lines 144-150
Link Here
|
144 |
fi |
137 |
fi |
145 |
fi |
138 |
fi |
146 |
changequote([,])dnl |
139 |
changequote([,])dnl |
147 |
|
|
|
148 |
# Honor aclocal flags |
140 |
# Honor aclocal flags |
149 |
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" |
141 |
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" |
150 |
|
142 |
|
Lines 158-165
Link Here
|
158 |
AC_CHECK_PROG(INDENT, indent, indent) |
150 |
AC_CHECK_PROG(INDENT, indent, indent) |
159 |
|
151 |
|
160 |
REBUILD=\# |
152 |
REBUILD=\# |
161 |
if test "x$enable_rebuilds" = "xyes" && \ |
153 |
if test "x$enable_rebuilds" = "xyes" && test -n "$PERL" && \ |
162 |
test -n "$PERL" && \ |
|
|
163 |
$PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \ |
154 |
$PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \ |
164 |
test -n "$AWK" ; then |
155 |
test -n "$AWK" ; then |
165 |
REBUILD= |
156 |
REBUILD= |
Lines 194-248
Link Here
|
194 |
|
185 |
|
195 |
dnl Check for nl_langinfo and CODESET |
186 |
dnl Check for nl_langinfo and CODESET |
196 |
AC_MSG_CHECKING([for nl_langinfo (CODESET)]) |
187 |
AC_MSG_CHECKING([for nl_langinfo (CODESET)]) |
197 |
AC_TRY_COMPILE([#include <langinfo.h>], |
188 |
AC_TRY_COMPILE([#include <langinfo.h> |
|
|
189 |
], |
198 |
[char *codeset = nl_langinfo (CODESET);], |
190 |
[char *codeset = nl_langinfo (CODESET);], |
199 |
AC_DEFINE(HAVE_CODESET,1,[Have nl_langinfo (CODESET)]) |
191 |
AC_DEFINE(HAVE_CODESET,1,[Have nl_langinfo (CODESET)]) |
200 |
have_codeset=yes, |
192 |
have_codeset="yes", |
201 |
have_codeset=no) |
193 |
have_codeset="no" |
|
|
194 |
) |
202 |
AC_MSG_RESULT($have_codeset) |
195 |
AC_MSG_RESULT($have_codeset) |
203 |
|
196 |
|
204 |
dnl The DU4 header files don't provide library prototypes unless |
197 |
dnl The DU4 header files don't provide library prototypes unless |
205 |
dnl -std1 is given to the native cc. |
198 |
dnl -std1 is given to the native cc. |
206 |
AC_MSG_CHECKING([for extra flags to get ANSI library prototypes]) |
199 |
AC_MSG_CHECKING([for extra flags to get ANSI library prototypes]) |
207 |
|
200 |
|
208 |
gtk_save_LIBS=$LIBS |
201 |
gtk_save_LIBS="$LIBS" |
209 |
LIBS="$LIBS -lm" |
202 |
LIBS="$LIBS -lm" |
210 |
AC_TRY_RUN([#include <math.h> |
203 |
AC_TRY_RUN([#include <math.h> |
211 |
int main (void) { return (log(1) != log(1.)); }], |
204 |
int main (void) { return (log(1) != log(1.)); }], |
212 |
AC_MSG_RESULT(none needed), |
205 |
AC_MSG_RESULT(none needed), |
213 |
gtk_save_CFLAGS=$CFLAGS |
206 |
[gtk_save_CFLAGS="$CFLAGS" |
214 |
CFLAGS="$CFLAGS -std1" |
207 |
CFLAGS="$CFLAGS -std1" |
215 |
AC_TRY_RUN([#include <math.h> |
208 |
AC_TRY_RUN([#include <math.h> |
216 |
int main (void) { return (log(1) != log(1.)); }], |
209 |
int main (void) { return (log(1) != log(1.)); }], |
217 |
AC_MSG_RESULT(-std1), |
210 |
AC_MSG_RESULT(-std1), |
218 |
AC_MSG_RESULT() |
211 |
AC_MSG_RESULT() |
219 |
CFLAGS=$gtk_save_CFLAGS |
212 |
CFLAGS="$gtk_save_CFLAGS" |
220 |
AC_MSG_WARN( |
213 |
AC_MSG_WARN([No ANSI prototypes found in library. (-std1 didn't work.)]), |
221 |
[No ANSI prototypes found in library. (-std1 didn't work.)]), |
214 |
true)], |
222 |
true |
|
|
223 |
), |
224 |
AC_MSG_RESULT(none needed) |
215 |
AC_MSG_RESULT(none needed) |
225 |
) |
216 |
) |
226 |
LIBS=$gtk_save_LIBS |
217 |
LIBS="$gtk_save_LIBS" |
227 |
|
218 |
|
228 |
dnl NeXTStep cc seems to need this |
219 |
dnl NeXTStep cc seems to need this |
229 |
AC_MSG_CHECKING([for extra flags for POSIX compliance]) |
220 |
AC_MSG_CHECKING([for extra flags for POSIX compliance]) |
230 |
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;], |
221 |
AC_TRY_COMPILE([#include <dirent.h> |
|
|
222 |
],[DIR *dir;], |
231 |
AC_MSG_RESULT(none needed), |
223 |
AC_MSG_RESULT(none needed), |
232 |
gtk_save_CFLAGS=$CFLAGS |
224 |
[gtk_save_CFLAGS="$CFLAGS" |
233 |
CFLAGS="$CFLAGS -posix" |
225 |
CFLAGS="$CFLAGS -posix" |
234 |
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;], |
226 |
AC_TRY_COMPILE([#include <dirent.h> |
|
|
227 |
],[DIR *dir;], |
235 |
AC_MSG_RESULT(-posix), |
228 |
AC_MSG_RESULT(-posix), |
236 |
AC_MSG_RESULT() |
229 |
AC_MSG_RESULT() |
237 |
CFLAGS=$gtk_save_CFLAGS |
230 |
CFLAGS="$gtk_save_CFLAGS" |
238 |
AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)]))) |
231 |
AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])])) |
239 |
|
232 |
|
240 |
if test x$with_glib = xyes ; then |
233 |
|
241 |
AC_MSG_ERROR([ |
234 |
|
242 |
*** Directory must be specified for --with-glib]) |
235 |
if test "x$with_glib" = "xyes" ; then |
|
|
236 |
AC_MSG_ERROR([*** Directory must be specified for --with-glib]) |
243 |
fi |
237 |
fi |
244 |
|
238 |
|
245 |
if test x$with_glib = x ; then |
239 |
if test "x$with_glib" = "x" ; then |
246 |
# Look for separately installed glib |
240 |
# Look for separately installed glib |
247 |
|
241 |
|
248 |
AM_PATH_GLIB(1.2.8,, |
242 |
AM_PATH_GLIB(1.2.8,, |
Lines 261-267
Link Here
|
261 |
else |
255 |
else |
262 |
# Use uninstalled glib (assume they got the version right) |
256 |
# Use uninstalled glib (assume they got the version right) |
263 |
|
257 |
|
264 |
GLIB_CONFIG=$with_glib/glib-config |
258 |
GLIB_CONFIG="$with_glib/glib-config" |
265 |
if test -x $GLIB_CONFIG ; then |
259 |
if test -x $GLIB_CONFIG ; then |
266 |
: |
260 |
: |
267 |
else |
261 |
else |
Lines 277-285
Link Here
|
277 |
glib_release=`$GLIB_CONFIG --version | sed 's%\\.[[0-9]]*$%%'` |
271 |
glib_release=`$GLIB_CONFIG --version | sed 's%\\.[[0-9]]*$%%'` |
278 |
|
272 |
|
279 |
# canonicalize relative paths |
273 |
# canonicalize relative paths |
280 |
case $with_glib in |
274 |
case "$with_glib" in |
281 |
/*) |
275 |
/*) |
282 |
glib_dir=$with_glib |
276 |
glib_dir="$with_glib" |
283 |
;; |
277 |
;; |
284 |
*) |
278 |
*) |
285 |
glib_dir="\$(top_builddir)/$with_glib" |
279 |
glib_dir="\$(top_builddir)/$with_glib" |
Lines 312-372
Link Here
|
312 |
saved_ldflags="$LDFLAGS" |
306 |
saved_ldflags="$LDFLAGS" |
313 |
|
307 |
|
314 |
CFLAGS="$CFLAGS $X_CFLAGS" |
308 |
CFLAGS="$CFLAGS $X_CFLAGS" |
315 |
LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS" |
309 |
LDFLAGS="$LDFLAGS $X_LDFLAGS" |
316 |
|
310 |
|
317 |
if test "x$no_x" = "xyes"; then |
311 |
if test "x$no_x" = "xyes"; then |
318 |
AC_MSG_ERROR([ |
312 |
AC_MSG_ERROR([ |
319 |
*** X libraries or include files not found. Check 'config.log' for |
313 |
*** X libraries or include files not found. Check 'config.log' for |
320 |
*** more details.]) |
314 |
*** more details.]) |
321 |
fi |
315 |
fi |
322 |
|
|
|
323 |
# Checks for libraries. |
316 |
# Checks for libraries. |
324 |
# Check for the X11 library |
317 |
# Check for the X11 library |
325 |
AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", |
318 |
AC_CHECK_LIB(X11,XOpenDisplay, |
|
|
319 |
x_libs="-lX11 $X_EXTRA_LIBS", |
326 |
AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]), |
320 |
AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]), |
327 |
$X_EXTRA_LIBS) |
321 |
$X_EXTRA_LIBS |
328 |
|
322 |
) |
329 |
if test "x$enable_shm" = "xyes"; then |
323 |
if test "x$enable_shm" = "xyes"; then |
330 |
# Check for the Xext library (needed for XShm extention) |
324 |
# Check for the Xext library (needed for XShm extention) |
331 |
AC_CHECK_LIB(Xext, XShmAttach, |
325 |
AC_CHECK_LIB(Xext, XShmAttach, |
332 |
x_libs="-lXext $x_libs", |
326 |
x_libs="-lXext $x_libs", |
333 |
# On AIX, it is in XextSam instead, but we still need -lXext |
327 |
# On AIX, it is in XextSam instead, but we still need -lXext |
334 |
AC_CHECK_LIB(XextSam, XShmAttach, |
328 |
[AC_CHECK_LIB(XextSam, XShmAttach, |
335 |
x_libs="-lXextSam -lXext $x_libs", |
329 |
x_libs="-lXextSam -lXext $x_libs", |
336 |
no_xext_lib=yes, $x_libs), |
330 |
no_xext_lib="yes", |
337 |
$x_libs) |
331 |
$x_libs |
|
|
332 |
)], |
333 |
$x_libs |
334 |
) |
338 |
fi |
335 |
fi |
339 |
|
|
|
340 |
# Check for shaped window extension |
336 |
# Check for shaped window extension |
341 |
|
|
|
342 |
AC_CHECK_LIB(Xext, XShapeCombineMask, |
337 |
AC_CHECK_LIB(Xext, XShapeCombineMask, |
343 |
if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then |
338 |
if test -z "`echo $x_libs | grep \-lXext 2> /dev/null`"; then |
344 |
x_libs="-lXext $x_libs" |
339 |
x_libs="-lXext $x_libs" |
345 |
fi |
340 |
fi |
346 |
AC_DEFINE(HAVE_SHAPE_EXT), |
341 |
AC_DEFINE(HAVE_SHAPE_EXT),, |
347 |
, |
342 |
$x_libs |
348 |
$x_libs) |
343 |
) |
349 |
|
|
|
350 |
# Check for XConvertCase (X11R6 specific) |
344 |
# Check for XConvertCase (X11R6 specific) |
351 |
|
|
|
352 |
AC_CHECK_LIB(X11, XConvertCase, |
345 |
AC_CHECK_LIB(X11, XConvertCase, |
353 |
AC_DEFINE(HAVE_XCONVERTCASE), |
346 |
AC_DEFINE(HAVE_XCONVERTCASE),, |
354 |
, |
347 |
$x_libs |
355 |
$x_libs) |
348 |
) |
356 |
|
|
|
357 |
# Check for XIM support. |
349 |
# Check for XIM support. |
358 |
|
350 |
AC_CHECK_LIB(X11, XUnregisterIMInstantiateCallback,, |
359 |
AC_CHECK_LIB(X11, XUnregisterIMInstantiateCallback, |
|
|
360 |
: , |
361 |
enable_xim_inst="no", |
351 |
enable_xim_inst="no", |
362 |
$x_libs) |
352 |
$x_libs |
363 |
|
353 |
) |
364 |
# On Solaris, calling XRegisterIMInstantiateCallback seems to |
354 |
# On Solaris, calling XRegisterIMInstantiateCallback seems to |
365 |
# cause an immediate segfault, so we disable it, unless |
355 |
# cause an immediate segfault, so we disable it, unless |
366 |
# the user specifically forces it to be on. |
356 |
# the user specifically forces it to be on. |
367 |
|
357 |
if test "x$enable_xim_inst" = "xmaybe" ; then |
368 |
if test x$enable_xim_inst = xmaybe ; then |
358 |
case "$host" in |
369 |
case host in |
|
|
370 |
*-*-solaris*) |
359 |
*-*-solaris*) |
371 |
enable_xim_inst="no" |
360 |
enable_xim_inst="no" |
372 |
;; |
361 |
;; |
Lines 384-399
Link Here
|
384 |
fi |
373 |
fi |
385 |
|
374 |
|
386 |
x_cflags="$X_CFLAGS" |
375 |
x_cflags="$X_CFLAGS" |
387 |
x_ldflags="$X_LDFLAGS $X_LIBS" |
376 |
x_ldflags="$X_LDFLAGS" |
388 |
|
377 |
|
389 |
# set up things for XInput |
378 |
# set up things for XInput |
390 |
|
|
|
391 |
if test "x$with_xinput" = "xgxi"; then |
379 |
if test "x$with_xinput" = "xgxi"; then |
392 |
AC_MSG_WARN([ |
380 |
AC_MSG_WARN([ |
393 |
*** The generic XInput support has not been tested for several years |
381 |
*** The generic XInput support has not been tested for several years |
394 |
*** and is not known to work with any currently available X servers]) |
382 |
*** and is not known to work with any currently available X servers]) |
395 |
AC_DEFINE(XINPUT_GXI) |
383 |
AC_DEFINE(XINPUT_GXI) |
396 |
xinput_progs=gxid |
384 |
xinput_progs="gxid" |
397 |
x_libs="-lXi $x_libs" |
385 |
x_libs="-lXi $x_libs" |
398 |
elif test "x$with_xinput" = "xxfree" || test "x$with_xinput" = "xyes"; then |
386 |
elif test "x$with_xinput" = "xxfree" || test "x$with_xinput" = "xyes"; then |
399 |
AC_DEFINE(XINPUT_XFREE) |
387 |
AC_DEFINE(XINPUT_XFREE) |
Lines 413-489
Link Here
|
413 |
|
401 |
|
414 |
if test "x$enable_shm" = "xyes"; then |
402 |
if test "x$enable_shm" = "xyes"; then |
415 |
# Check for shared memory |
403 |
# Check for shared memory |
416 |
AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc=yes) |
404 |
AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc="yes") |
417 |
AC_CHECK_HEADER(sys/shm.h, AC_DEFINE(HAVE_SHM_H), no_sys_shm=yes) |
405 |
AC_CHECK_HEADER(sys/shm.h, AC_DEFINE(HAVE_SHM_H), no_sys_shm="yes") |
418 |
|
406 |
|
419 |
# Check for the X shared memory extension header file |
407 |
# Check for the X shared memory extension header file |
420 |
AC_MSG_CHECKING(X11/extensions/XShm.h) |
408 |
AC_MSG_CHECKING(X11/extensions/XShm.h) |
421 |
if test "x$no_xext_lib" = "xyes"; then |
409 |
if test "x$no_xext_lib" = "xyes"; then |
422 |
AC_MSG_RESULT(no) |
410 |
AC_MSG_RESULT(no) |
423 |
no_xshm=yes |
411 |
no_xshm="yes" |
424 |
else |
412 |
else |
425 |
if test -f "$x_includes/X11/extensions/XShm.h"; then |
413 |
if test -f "$x_includes/X11/extensions/XShm.h"; then |
426 |
AC_MSG_RESULT(yes) |
414 |
AC_MSG_RESULT(yes) |
427 |
AC_DEFINE(HAVE_XSHM_H) |
415 |
AC_DEFINE(HAVE_XSHM_H) |
428 |
else |
416 |
else |
429 |
AC_MSG_RESULT(no) |
417 |
AC_MSG_RESULT(no) |
430 |
no_xshm=yes |
418 |
no_xshm="yes" |
431 |
fi |
419 |
fi |
432 |
fi |
420 |
fi |
433 |
fi |
421 |
fi |
434 |
|
|
|
435 |
# Check if X_LOCALE definition is necessary |
422 |
# Check if X_LOCALE definition is necessary |
436 |
|
|
|
437 |
AC_MSG_CHECKING(need -DX_LOCALE) |
423 |
AC_MSG_CHECKING(need -DX_LOCALE) |
438 |
|
424 |
|
439 |
AC_TRY_RUN([ |
425 |
AC_TRY_RUN([ |
440 |
#include <stdio.h> |
426 |
#include <stdio.h> |
441 |
#include <locale.h> |
427 |
#include <locale.h> |
442 |
|
428 |
int main () |
443 |
int |
|
|
444 |
main () |
445 |
{ |
429 |
{ |
446 |
return setlocale (LC_ALL, "${with_locale}") == NULL; |
430 |
return setlocale (LC_ALL, "${with_locale}") == NULL; |
447 |
}], |
431 |
}], |
448 |
need_x_locale=no, |
432 |
need_x_locale="no", |
449 |
need_x_locale=yes, |
433 |
need_x_locale="yes", |
450 |
need_x_locale=no) |
434 |
need_x_locale="no" |
|
|
435 |
) |
451 |
AC_MSG_RESULT($need_x_locale) |
436 |
AC_MSG_RESULT($need_x_locale) |
452 |
|
437 |
|
453 |
use_native_locale=no |
438 |
use_native_locale="no" |
454 |
if test $need_x_locale = yes; then |
439 |
if test "$need_x_locale" = "yes"; then |
455 |
GTK_LOCALE_FLAGS="-DX_LOCALE" |
440 |
GTK_LOCALE_FLAGS="-DX_LOCALE" |
456 |
else |
441 |
else |
457 |
if test x$with_native_locale = xyes ; then |
442 |
if test "x$with_native_locale" = "xyes" ; then |
458 |
AC_MSG_CHECKING(functioning locale support) |
443 |
AC_MSG_CHECKING(functioning locale support) |
459 |
|
444 |
|
460 |
AC_TRY_COMPILE([#include <stdlib.h>],[ |
445 |
AC_TRY_COMPILE([#include <stdlib.h>], |
461 |
char c; |
446 |
[char c; |
462 |
if (MB_CUR_MAX == 1) { |
447 |
if (MB_CUR_MAX == 1) { |
463 |
wctomb(&c, 42); |
448 |
wctomb(&c, 42); |
464 |
} |
449 |
}], |
465 |
],use_native_locale=yes,) |
450 |
use_native_locale="yes" |
466 |
|
451 |
) |
467 |
AC_MSG_RESULT($use_native_locale) |
452 |
AC_MSG_RESULT($use_native_locale) |
468 |
fi |
453 |
fi |
469 |
fi |
454 |
fi |
470 |
|
455 |
|
471 |
if test x$use_native_locale = xyes ; then |
456 |
if test "x$use_native_locale" = "xyes" ; then |
472 |
AC_MSG_CHECKING(if sizeof(wchar_t) == 4) |
457 |
AC_MSG_CHECKING(if sizeof(wchar_t) == 4) |
473 |
|
458 |
|
474 |
AC_TRY_RUN([ |
459 |
AC_TRY_RUN([#include <stdlib.h> |
475 |
#include <stdlib.h> |
460 |
int main () |
476 |
|
|
|
477 |
int |
478 |
main () |
479 |
{ |
461 |
{ |
480 |
return (sizeof(wchar_t) == 4) ? 0 : 1; |
462 |
return (sizeof(wchar_t) == 4) ? 0 : 1; |
481 |
}], |
463 |
}],, |
482 |
,use_native_locale=no,:) |
464 |
use_native_locale="no" |
|
|
465 |
) |
483 |
AC_MSG_RESULT($use_native_locale) |
466 |
AC_MSG_RESULT($use_native_locale) |
484 |
fi |
467 |
fi |
485 |
|
468 |
|
486 |
if test $use_native_locale = yes ; then |
469 |
if test "$use_native_locale" = "yes" ; then |
487 |
AC_DEFINE(USE_NATIVE_LOCALE) |
470 |
AC_DEFINE(USE_NATIVE_LOCALE) |
488 |
fi |
471 |
fi |
489 |
|
472 |
|
Lines 502-514
Link Here
|
502 |
|
485 |
|
503 |
# Check if <sys/select.h> needs to be included for fd_set |
486 |
# Check if <sys/select.h> needs to be included for fd_set |
504 |
AC_MSG_CHECKING([for fd_set]) |
487 |
AC_MSG_CHECKING([for fd_set]) |
505 |
AC_TRY_COMPILE([#include <sys/types.h>], |
488 |
AC_TRY_COMPILE([#include <sys/types.h> |
506 |
[fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no) |
489 |
], |
507 |
if test $gtk_ok = yes; then |
490 |
[fd_set readMask, writeMask;], |
|
|
491 |
gtk_ok="yes", |
492 |
gtk_ok="no" |
493 |
) |
494 |
if test "$gtk_ok" = "yes"; then |
508 |
AC_MSG_RESULT([yes, found in sys/types.h]) |
495 |
AC_MSG_RESULT([yes, found in sys/types.h]) |
509 |
else |
496 |
else |
510 |
AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes) |
497 |
AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok="yes") |
511 |
if test $gtk_ok = yes; then |
498 |
if test "$gtk_ok" = "yes"; then |
512 |
AC_DEFINE(HAVE_SYS_SELECT_H) |
499 |
AC_DEFINE(HAVE_SYS_SELECT_H) |
513 |
AC_MSG_RESULT([yes, found in sys/select.h]) |
500 |
AC_MSG_RESULT([yes, found in sys/select.h]) |
514 |
else |
501 |
else |
Lines 520-549
Link Here
|
520 |
# Duplicate `widechar' tests from `glib'. |
507 |
# Duplicate `widechar' tests from `glib'. |
521 |
# Check for wchar.h |
508 |
# Check for wchar.h |
522 |
AC_MSG_CHECKING(for wchar.h) |
509 |
AC_MSG_CHECKING(for wchar.h) |
523 |
AC_TRY_CPP([#include <wchar.h>], gtk_ok=yes, gtk_ok=no) |
510 |
AC_TRY_CPP([#include <wchar.h> |
524 |
if test $gtk_ok = yes; then |
511 |
], |
|
|
512 |
gtk_ok="yes", |
513 |
gtk_ok="no" |
514 |
) |
515 |
if test "$gtk_ok" = "yes"; then |
525 |
AC_DEFINE(HAVE_WCHAR_H,1,[Define if wchar.h exists]) |
516 |
AC_DEFINE(HAVE_WCHAR_H,1,[Define if wchar.h exists]) |
526 |
fi |
517 |
fi |
527 |
AC_MSG_RESULT($gtk_ok) |
518 |
AC_MSG_RESULT($gtk_ok) |
528 |
|
519 |
|
529 |
# Check for wctype.h (for iswalnum) |
520 |
# Check for wctype.h (for iswalnum) |
530 |
AC_MSG_CHECKING(for wctype.h) |
521 |
AC_MSG_CHECKING(for wctype.h) |
531 |
AC_TRY_CPP([#include <wctype.h>], gtk_ok=yes, gtk_ok=no) |
522 |
AC_TRY_CPP([#include <wctype.h>], gtk_ok="yes", gtk_ok="no") |
532 |
if test $gtk_ok = yes; then |
523 |
if test "$gtk_ok" = "yes"; then |
533 |
AC_DEFINE(HAVE_WCTYPE_H,1,[Define if wctype.h exists]) |
524 |
AC_DEFINE(HAVE_WCTYPE_H,1,[Define if wctype.h exists]) |
534 |
fi |
525 |
fi |
535 |
AC_MSG_RESULT($gtk_ok) |
526 |
AC_MSG_RESULT($gtk_ok) |
536 |
|
527 |
|
537 |
# in Solaris 2.5, `iswalnum' is in -lw |
528 |
# in Solaris 2.5, `iswalnum' is in -lw |
538 |
GDK_WLIBS= |
529 |
GDK_WLIBS= |
539 |
AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)]) |
530 |
AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS="-lw")]) |
540 |
|
531 |
|
541 |
# The following is necessary for Linux libc-5.4.38 |
532 |
# The following is necessary for Linux libc-5.4.38 |
542 |
oLIBS="$LIBS" |
533 |
oLIBS="$LIBS" |
543 |
LIBS="$LIBS $GDK_WLIBS" |
534 |
LIBS="$LIBS $GDK_WLIBS" |
544 |
AC_MSG_CHECKING(if iswalnum() and friends are properly defined) |
535 |
AC_MSG_CHECKING(if iswalnum() and friends are properly defined) |
545 |
AC_TRY_LINK([#include <stdlib.h>],[ |
536 |
AC_TRY_LINK([#include <stdlib.h> |
546 |
#if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H)) |
537 |
], |
|
|
538 |
[#if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H)) |
547 |
# ifdef HAVE_WCTYPE_H |
539 |
# ifdef HAVE_WCTYPE_H |
548 |
# include <wctype.h> |
540 |
# include <wctype.h> |
549 |
# else |
541 |
# else |
Lines 554-564
Link Here
|
554 |
#else |
546 |
#else |
555 |
# define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c)) |
547 |
# define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c)) |
556 |
#endif |
548 |
#endif |
557 |
iswalnum((wchar_t) 0); |
549 |
iswalnum((wchar_t) 0);], |
558 |
], gtk_ok=yes, gtk_ok=no) |
550 |
gtk_ok="yes", |
|
|
551 |
gtk_ok="no" |
552 |
) |
559 |
LIBS="$oLIBS" |
553 |
LIBS="$oLIBS" |
560 |
|
554 |
|
561 |
if test $gtk_ok = no; then |
555 |
if test "$gtk_ok" = "no"; then |
562 |
AC_DEFINE(HAVE_BROKEN_WCTYPE,1,[Define if the wctype function is broken]) |
556 |
AC_DEFINE(HAVE_BROKEN_WCTYPE,1,[Define if the wctype function is broken]) |
563 |
GDK_WLIBS= |
557 |
GDK_WLIBS= |
564 |
fi |
558 |
fi |
Lines 580-584
Link Here
|
580 |
gtk/Makefile |
574 |
gtk/Makefile |
581 |
gtk/gtkfeatures.h |
575 |
gtk/gtkfeatures.h |
582 |
gdk.pc |
576 |
gdk.pc |
583 |
gtk+.pc |
577 |
gtk+.pc], |
584 |
], [chmod +x gtk-config]) |
578 |
[chmod +x gtk-config]) |