+AC_SUBST(REBUILD)
+
+# i18n stuff
+ALL_LINGUAS="de pt"
+AM_GNU_GETTEXT_GTK
+AC_CHECK_FUNC(gettext,
+ ,
+ AC_CHECK_LIB(intl, gettext)
+)
+
+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.)])
+ )
+)
+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$with_glib = xyes ; then
+ AC_MSG_ERROR([
+*** Directory must be specified for --with-glib])
+fi