]> Pileus Git - ~andy/gtk/blobdiff - configure.in
Adapt cast macros to standard.
[~andy/gtk] / configure.in
index 191ffabf2959c016c247cc130e9c640d8cf2dc50..980b5cbe932cb6fc792bdee2e66c00271ac66d89 100644 (file)
@@ -95,6 +95,7 @@ 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 ])
@@ -143,6 +144,9 @@ if test "x$GCC" = "xyes"; then
 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
 
@@ -153,22 +157,34 @@ AC_CHECK_PROGS(PERL, perl5 perl)
 AC_CHECK_PROG(INDENT, indent, indent)
 
 REBUILD=\#
-if test -n "$PERL" && perl -v | grep 'version 5.' > /dev/null ; then
-  if test -n "$AWK" ; then 
-    REBUILD=
-  fi
+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 de el es eu fr ga hr hu it ja ko nl no pl pt ru sk sl sv wa zh_TW.Big5"
+ALL_LINGUAS="ca cs da de el es et eu fi fr ga gl hr hu it ja ko nl no pl pt pt_BR ru sk sl sv uk wa zh_TW.Big5"
 AM_GTK_GNU_GETTEXT
-AC_CHECK_FUNC(gettext,
-       ,
-       AC_CHECK_LIB(intl, gettext)
-)
+LIBS="$LIBS $INTLLIBS"
+
 # AM_GTK_GNU_GETTEXT above substs $DATADIRNAME
 # this is the directory where the *.{mo,gmo} files are installed
 gtklocaledir='${prefix}/${DATADIRNAME}/locale'
@@ -191,8 +207,10 @@ AC_TRY_RUN([#include <math.h>
          AC_MSG_RESULT()
          CFLAGS=$gtk_save_CFLAGS
          AC_MSG_WARN(
-                [No ANSI prototypes found in library. (-std1 didn't work.)])
-     )
+                [No ANSI prototypes found in library. (-std1 didn't work.)]),
+        true
+     ),
+     AC_MSG_RESULT(none needed)
 )
 LIBS=$gtk_save_LIBS
 
@@ -201,10 +219,12 @@ 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=
   ;;
-  default)
+  *)
+    AC_MSG_RESULT(no)
   ;;
 esac
 AC_SUBST(MATH_LIB)
@@ -388,6 +408,9 @@ 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"
 
@@ -432,11 +455,12 @@ main ()
   return setlocale (LC_ALL, "${with_locale}") == NULL;
 }],
 need_x_locale=no,
-need_x_locale=yes)
+need_x_locale=yes,
+need_x_locale=no)
 AC_MSG_RESULT($need_x_locale)
 
 if test $need_x_locale = yes; then
-  GTK_LOCALE_CFLAGS="-DX_LOCALE"
+  GTK_LOCALE_FLAGS="-DX_LOCALE"
 fi
 
 # Checks for header files.
@@ -577,7 +601,7 @@ esac
 ],[
 # Currently we always use X11 on those systems where we run configure...
 gdk_windowing='
-#define GDK_WINDOWING GDK_WINDOWING_X11'
+#define GDK_WINDOWING_X11'
 if test x$gdk_wchar_h = xyes; then
   gdk_wc='
 #define GDK_HAVE_WCHAR_H 1'
@@ -596,11 +620,14 @@ fi
 
 AC_OUTPUT([
 gtk+.spec
+docs/gtk-config.1
 Makefile
 gtk-config
 po/Makefile.in
 docs/Makefile
 gdk/Makefile
+gdk/x11/Makefile
 gtk/Makefile
+gtk/gtkfeatures.h
 gtk/gtkcompat.h
 ], [chmod +x gtk-config])