cus-start.el fix for bug#8192.
[bpt/emacs.git] / configure.in
index dbced95..69d1a1e 100644 (file)
@@ -4,9 +4,7 @@ dnl     autoconf
 dnl in the directory containing this script.
 dnl If you changed any AC_DEFINES, also run autoheader.
 dnl
-dnl  Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2003, 2004,
-dnl    2005, 2006, 2007, 2008, 2009, 2010
-dnl    Free Software Foundation, Inc.
+dnl Copyright (C) 1994-1996, 1999-2011  Free Software Foundation, Inc.
 dnl
 dnl  This file is part of GNU Emacs.
 dnl
@@ -27,6 +25,7 @@ AC_PREREQ(2.65)
 AC_INIT(emacs, 24.0.50)
 AC_CONFIG_HEADER(src/config.h:src/config.in)
 AC_CONFIG_SRCDIR(src/lisp.h)
+AM_INIT_AUTOMAKE
 
 dnl Support for --program-prefix, --program-suffix and
 dnl --program-transform-name options
@@ -45,8 +44,6 @@ archlibdir='${libexecdir}/emacs/${version}/${configuration}'
 docdir='${datadir}/emacs/${version}/etc'
 gamedir='${localstatedir}/games/emacs'
 
-gameuser=games
-
 dnl OPTION_DEFAULT_OFF(NAME, HELP-STRING)
 dnl Create a new --with option that defaults to being disabled.
 dnl NAME is the base name of the option.  The shell variable with_NAME
@@ -165,7 +162,7 @@ OPTION_DEFAULT_ON([m17n-flt],[don't use m17n-flt for text shaping])
 OPTION_DEFAULT_ON([toolkit-scroll-bars],[don't use Motif or Xaw3d scroll bars])
 OPTION_DEFAULT_ON([xaw3d],[don't use Xaw3d])
 OPTION_DEFAULT_ON([xim],[don't use X11 XIM])
-OPTION_DEFAULT_OFF([ns],[use nextstep (Cocoa or GNUstep) windowing system])
+OPTION_DEFAULT_OFF([ns],[use NeXTstep (Cocoa or GNUstep) windowing system])
 
 OPTION_DEFAULT_ON([gpm],[don't use -lgpm for mouse support on a GNU/Linux console])
 OPTION_DEFAULT_ON([dbus],[don't compile with D-Bus support])
@@ -203,6 +200,12 @@ AC_ARG_WITH([crt-dir],dnl
 The default is /usr/lib, or /usr/lib64 on some platforms.])])
 CRT_DIR="${with_crt_dir}"
 
+AC_ARG_WITH(gameuser,dnl
+[AS_HELP_STRING([--with-gameuser=USER],[user for shared game score files])])
+test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
+  && gameuser="${with_gameuser}"
+test "X$gameuser" = X && gameuser=games
+
 AC_ARG_WITH([gnustep-conf],dnl
 [AS_HELP_STRING([--with-gnustep-conf=PATH],[path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, or /etc/GNUstep/GNUstep.conf])])
 test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
@@ -510,6 +513,17 @@ case "${canonical}" in
     CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
   ;;
 
+  ia64*-hp-hpux1[1-9]* )
+    machine=hp800 opsys=hpux11
+    ## FIXME.  Peter O'Gorman reports that dumping using unexelf.o doesn't
+    ## work either: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6811
+    CANNOT_DUMP=yes
+  ;;
+
+  hppa*-*-linux-gnu* )
+    machine=hp800 opsys=gnu-linux
+  ;;
+
   ## IBM machines
   rs6000-ibm-aix4.[23]* )
     machine=ibmrs6000 opsys=aix4-2
@@ -634,6 +648,10 @@ SPECIFIED_CFLAGS="$CFLAGS"
 
 dnl Sets GCC=yes if using gcc.
 AC_PROG_CC
+AM_PROG_CC_C_O
+
+# Initialize gnulib right after verifying that the C compiler works.
+gl_EARLY
 
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
@@ -681,22 +699,6 @@ else
   test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
 fi
 
-dnl checks for Unix variants
-AC_USE_SYSTEM_EXTENSIONS
-
-### Use -Wno-pointer-sign if the compiler supports it
-AC_MSG_CHECKING([whether gcc understands -Wno-pointer-sign])
-SAVE_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -Wno-pointer-sign"
-AC_TRY_COMPILE([], [], has_option=yes, has_option=no,)
-if test $has_option = yes; then
-   C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
-fi
-AC_MSG_RESULT($has_option)
-CFLAGS="$SAVE_CFLAGS"
-unset has_option
-unset SAVE_CFLAGS
-
 ### Use -Wdeclaration-after-statement if the compiler supports it
 AC_MSG_CHECKING([whether gcc understands -Wdeclaration-after-statement])
 SAVE_CFLAGS="$CFLAGS"
@@ -787,9 +789,12 @@ fi
 ## should test for it as it does for any other build requirement.
 ## We use the presence of $srcdir/info/emacs to distinguish a release,
 ## with pre-built manuals, from a Bazaar checkout.
+HAVE_MAKEINFO=yes
+
 if test "$MAKEINFO" = "no"; then
+  MAKEINFO=makeinfo
   if test "x${with_makeinfo}" = "xno"; then
-    MAKEINFO=off
+    HAVE_MAKEINFO=no
   elif test ! -e $srcdir/info/emacs; then
     AC_MSG_ERROR( [You do not seem to have makeinfo >= 4.6, and your
 source tree does not seem to have pre-built manuals in the `info' directory.
@@ -797,6 +802,7 @@ Either install a suitable version of makeinfo, or re-run configure
 with the `--without-makeinfo' option to build without the manuals.] )
   fi
 fi
+AC_SUBST(HAVE_MAKEINFO)
 
 dnl Add our options to ac_link now, after it is set up.
 
@@ -833,16 +839,16 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
 CPP=`eval "echo $CPP"`
 
 
-dnl Not used by any currently supported platform.
 dnl The function dump-emacs will not be defined and temacs will do
 dnl (load "loadup") automatically unless told otherwise.
-CANNOT_DUMP=no
+test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
 case "$opsys" in
-  your-opsys-here)
-   CANNOT_DUMP=yes
-   AC_DEFINE(CANNOT_DUMP, 1, [Define if Emacs cannot be dumped on your system.])
-  ;;
+  your-opsys-here) CANNOT_DUMP=yes ;;
 esac
+
+test "$CANNOT_DUMP" = "yes" && \
+  AC_DEFINE(CANNOT_DUMP, 1, [Define if Emacs cannot be dumped on your system.])
+
 AC_SUBST(CANNOT_DUMP)
 
 
@@ -867,11 +873,11 @@ case "$opsys" in
    # emacs, instead of the generic ELF dump code found in unexelf.c.
    # The resulting binary has a complete symbol table, and is better
    # for debugging and other observability tools (debuggers, pstack, etc).
-   # 
+   #
    # If you encounter a problem using dldump(), please consider sending
    # a message to the OpenSolaris tools-linking mailing list:
    #      http://mail.opensolaris.org/mailman/listinfo/tools-linking
-   # 
+   #
    # It is likely that dldump() works with older Solaris too, but this has
    # not been tested, so for now this change is for Solaris 10 or newer.
    UNEXEC_OBJ=unexsol.o
@@ -938,7 +944,7 @@ if test "$machine" = "alpha"; then
       AC_MSG_ERROR([What gives?  Fix me if DEC Unix supports ELF now.])
     fi
   else
-    UNEXEC_OBJ=unexalpha.o 
+    UNEXEC_OBJ=unexalpha.o
   fi
 fi
 AC_SUBST(C_SWITCH_MACHINE)
@@ -965,7 +971,7 @@ case "$opsys" in
 
   hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
 
-  sol2*) LIBS_SYSTEM="-lsocket -lnsl -lkstat" ;;
+  sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
 
   ## Motif needs -lgen.
   unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
@@ -981,9 +987,6 @@ else
   CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
 fi
 
-dnl For AC_FUNC_GETLOADAVG, at least:
-AC_CONFIG_LIBOBJ_DIR(src)
-
 dnl Do this early because it can frob feature test macros for Unix-98 &c.
 AC_SYS_LARGEFILE
 
@@ -1120,7 +1123,7 @@ AC_DEFUN([PKG_CHECK_MODULES], [
 
 if test "${with_sound}" != "no"; then
   # Sound support for GNU/Linux and the free BSDs.
-  AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h soundcard.h, 
+  AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h soundcard.h,
     have_sound_header=yes)
   # Emulation library used on NetBSD.
   AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBSOUND=-lossaudio, LIBSOUND=)
@@ -1313,6 +1316,19 @@ AH_TEMPLATE(POINTER_TYPE,
 dnl Check for endianess
 AC_C_BIGENDIAN
 
+AC_CACHE_CHECK([for  __attribute__ ((__aligned__ (expr)))],
+  [emacs_cv_attribute_aligned],
+  [AC_COMPILE_IFELSE(
+     [AC_LANG_PROGRAM(
+       [[char __attribute__ ((__aligned__ (1 << 3))) c;]],
+       [[]])],
+     [emacs_cv_attribute_aligned=yes],
+     [emacs_cv_attribute_aligned=no])])
+if test $emacs_cv_attribute_aligned = yes; then
+  AC_DEFINE([HAVE_ATTRIBUTE_ALIGNED], 1,
+    [Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works.])
+fi
+
 dnl check for Make feature
 AC_PROG_MAKE_SET
 
@@ -1487,6 +1503,7 @@ AC_SUBST(TEMACS_LDFLAGS2)
 
 ns_frag=/dev/null
 NS_OBJ=
+NS_OBJC_OBJ=
 NS_SUPPORT=
 if test "${HAVE_NS}" = yes; then
   window_system=nextstep
@@ -1498,12 +1515,14 @@ if test "${HAVE_NS}" = yes; then
      prefix=${ns_appresdir}
   fi
   ns_frag=$srcdir/src/ns.mk
-  NS_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o fontset.o fringe.o image.o"
+  NS_OBJ="fontset.o fringe.o image.o"
+  NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
   NS_SUPPORT="\${lispsource}/emacs-lisp/easymenu.elc \${lispsource}/term/ns-win.elc"
 fi
 CFLAGS="$tmp_CFLAGS"
 CPPFLAGS="$tmp_CPPFLAGS"
 AC_SUBST(NS_OBJ)
+AC_SUBST(NS_OBJC_OBJ)
 AC_SUBST(NS_SUPPORT)
 AC_SUBST(LIB_STANDARD)
 AC_SUBST_FILE(ns_frag)
@@ -1794,7 +1813,7 @@ if test "${HAVE_X11}" = "yes"; then
     PKG_CHECK_MODULES(IMAGEMAGICK, $IMAGEMAGICK_MODULE, HAVE_IMAGEMAGICK=yes, :)
     AC_SUBST(IMAGEMAGICK_CFLAGS)
     AC_SUBST(IMAGEMAGICK_LIBS)
-  
+
     if test $HAVE_IMAGEMAGICK = yes; then
       AC_DEFINE(HAVE_IMAGEMAGICK, 1, [Define to 1 if using imagemagick.])
       CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
@@ -1974,7 +1993,8 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
 #include <X11/Intrinsic.h>
 #include <X11/Xaw3d/Simple.h>],
       [],
-      emacs_cv_xaw3d=yes,
+      [AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb,
+                    emacs_cv_xaw3d=yes, emacs_cv_xaw3d=no)],
       emacs_cv_xaw3d=no)])
   else
     emacs_cv_xaw3d=no
@@ -2224,21 +2244,21 @@ if test "${HAVE_X11}" = "yes"; then
       fi                          # "$HAVE_XFT" != no
     fi                            # "x${with_xft}" != "xno"
 
-    dnl For the "Does Emacs use" message at the end.
-    if test "$HAVE_XFT" != "yes"; then
-       HAVE_XFT=no
-    fi
-
-
-    HAVE_FREETYPE=no
     ## We used to allow building with FreeType and without Xft.
     ## However, the ftx font backend driver is not in good shape.
-    if test "${HAVE_XFT}" = "yes"; then
-      dnl As we use Xft, we anyway use freetype.
-      dnl There's no need for additional CFLAGS and LIBS.
-      HAVE_FREETYPE=yes
-      FONTCONFIG_CFLAGS=
-      FONTCONFIG_LIBS=
+    if test "$HAVE_XFT" != "yes"; then
+       dnl For the "Does Emacs use" message at the end.
+       HAVE_XFT=no
+       HAVE_FREETYPE=no
+    else
+       dnl Strict linkers fail with
+       dnl ftfont.o: undefined reference to symbol 'FT_New_Face'
+       dnl if -lfreetype is not specified.
+       dnl The following is needed to set FREETYPE_LIBS.
+       PKG_CHECK_MODULES(FREETYPE, freetype2, HAVE_FREETYPE=yes,
+                        HAVE_FREETYPE=no) 
+
+       test "$HAVE_FREETYPE" = "no" && AC_MSG_ERROR(libxft requires libfreetype)
     fi
 
     HAVE_LIBOTF=no
@@ -2502,7 +2522,7 @@ AC_SUBST(LIBXSM)
 ### Use libxml (-lxml2) if available
 if test "${with_xml2}" != "no"; then
   ### I'm not sure what the version number should be, so I just guessed.
-  PKG_CHECK_MODULES(LIBXML2, libxml-2.0 > 2.2.0, HAVE_LIBXML2=yes, HAVE_LIBXML2=no)
+  PKG_CHECK_MODULES(LIBXML2, libxml-2.0 > 2.6.17, HAVE_LIBXML2=yes, HAVE_LIBXML2=no)
   if test "${HAVE_LIBXML2}" = "yes"; then
     LIBS="$LIBXML2_LIBS $LIBS"
     AC_CHECK_LIB(xml2, htmlReadMemory, HAVE_LIBXML2=yes, HAVE_LIBXML2=no)
@@ -2619,7 +2639,7 @@ AC_SUBST(BLESSMAIL_TARGET)
 AC_CHECK_FUNCS(gethostname getdomainname dup2 \
 rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
 random lrand48 logb frexp fmod rint cbrt ftime setsid \
-strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
+strerror fpathconf select euidaccess getpagesize tzset setlocale \
 utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
 __fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \
 sendto recvfrom getsockopt setsockopt getsockname getpeername \
@@ -2627,29 +2647,27 @@ gai_strerror mkstemp getline getdelim mremap memmove fsync sync \
 memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
 cfmakeraw cfsetspeed isnan copysign __executable_start)
 
-AC_CHECK_HEADERS(sys/un.h)
-
-AC_FUNC_MKTIME
-if test "$ac_cv_func_working_mktime" = no; then
-  AC_DEFINE(BROKEN_MKTIME, 1, [Define to 1 if the mktime function is broken.])
+dnl Cannot use AC_CHECK_FUNCS
+AC_CACHE_CHECK([for __builtin_unwind_init],
+              emacs_cv_func___builtin_unwind_init,
+[AC_LINK_IFELSE([AC_LANG_PROGRAM([], [__builtin_unwind_init ();])],
+               emacs_cv_func___builtin_unwind_init=yes,
+               emacs_cv_func___builtin_unwind_init=no)])
+if test $emacs_cv_func___builtin_unwind_init = yes; then
+  AC_DEFINE(HAVE___BUILTIN_UNWIND_INIT, 1,
+           [Define to 1 if you have the `__builtin_unwind_init' function.])
 fi
 
-AC_FUNC_GETLOADAVG
+AC_CHECK_HEADERS(sys/un.h)
 
 AC_FUNC_FSEEKO
 
-# Configure getopt.
-m4_include([m4/getopt.m4])
-gl_GETOPT_IFELSE([
-  gl_GETOPT_SUBSTITUTE_HEADER
-  gl_PREREQ_GETOPT
-  GETOPTOBJS='getopt.o getopt1.o'
-])
-AC_SUBST(GETOPTOBJS)
-
 AC_FUNC_GETPGRP
 
-AC_FUNC_STRFTIME
+# Configure gnulib.
+gl_ASSERT_NO_GNULIB_POSIXCHECK
+gl_ASSERT_NO_GNULIB_TESTS
+gl_INIT
 
 # UNIX98 PTYs.
 AC_CHECK_FUNCS(grantpt)
@@ -3012,24 +3030,6 @@ AC_CHECK_TYPES(size_t)
 
 AC_TYPE_MBSTATE_T
 
-dnl Restrict could probably be used effectively other than in regex.c.
-AC_CACHE_CHECK([for C restrict keyword], emacs_cv_c_restrict,
-  [AC_TRY_COMPILE([void fred (int *restrict x);], [],
-                  emacs_cv_c_restrict=yes,
-                  [AC_TRY_COMPILE([void fred (int *__restrict x);], [],
-                                  emacs_cv_c_restrict=__restrict,
-                                 emacs_cv_c_restrict=no)])])
-case "$emacs_cv_c_restrict" in
-  yes) emacs_restrict=restrict;;
-  no) emacs_restrict="";;
-  *) emacs_restrict="$emacs_cv_c_restrict";;
-esac
-if test "$emacs_restrict" != __restrict; then
-  AC_DEFINE_UNQUOTED(__restrict, $emacs_restrict,
-    [Define to compiler's equivalent of C99 restrict keyword.
-     Don't define if equivalent is `__restrict'.])
-fi
-
 AC_CACHE_CHECK([for C restricted array declarations], emacs_cv_c_restrict_arr,
   [AC_TRY_COMPILE([void fred (int x[__restrict]);], [],
                   emacs_cv_c_restrict_arr=yes, emacs_cv_c_restrict_arr=no)])
@@ -3064,15 +3064,7 @@ if test "x$GCC" = xyes \
    AC_MSG_ERROR([GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'.])
 fi
 
-#### Find out which version of Emacs this is.
-[version=`grep 'const char emacs_version' ${srcdir}/src/emacs.c \
-        | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`]
-if test x"${version}" = x; then
-  AC_MSG_ERROR([can't find current emacs version in `${srcdir}/src/emacs.c'.])
-fi
-if test x"${version}" != x"$PACKAGE_VERSION"; then
-  AC_MSG_WARN([version mismatch between `${srcdir}/configure.in' and `${srcdir}/src/emacs.c'.])
-fi
+version=$PACKAGE_VERSION
 
 ### Specify what sort of things we'll be editing into Makefile and config.h.
 ### Use configuration here uncanonicalized to avoid exceeding size limits.
@@ -3116,7 +3108,6 @@ fi
 S_FILE="\$(srcdir)/${opsysfile}"
 AC_SUBST(M_FILE)
 AC_SUBST(S_FILE)
-AC_SUBST(GETLOADAVG_LIBS)
 AC_SUBST(ns_appdir)
 AC_SUBST(ns_appbindir)
 AC_SUBST(ns_appresdir)
@@ -3236,7 +3227,7 @@ fi
 
 if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
   OLDXMENU_TARGET=
-  OLDXMENU=nothing  
+  OLDXMENU=nothing
   LIBXMENU=
   OLDXMENU_DEPS=
 fi
@@ -3300,7 +3291,7 @@ case "$opsys" in
      headerpad_extra=690
    fi
    LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
+
    ## This is here because src/Makefile.in did some extra fiddling around
    ## with LD_SWITCH_SYSTEM.  The cpp logic was:
    ##   #ifndef LD_SWITCH_SYSTEM
@@ -3436,8 +3427,9 @@ AC_SUBST(WINDOW_SUPPORT)
 
 
 AH_TOP([/* GNU Emacs site configuration template file.
-   Copyright (C) 1988, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005,
-     2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+
+Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2011
+  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -3519,13 +3511,6 @@ AH_BOTTOM([
 #endif
 #endif
 
-/* Avoid link-time collision with system mktime if we will use our own.  */
-#if ! HAVE_MKTIME || BROKEN_MKTIME
-#define mktime emacs_mktime
-#endif
-
-#define my_strftime nstrftime  /* for strftime.c */
-
 /* These default definitions are good for almost all machines.
    The exceptions override them in m/MACHINE.h.  */
 
@@ -3720,6 +3705,18 @@ fi
 test "${exec_prefix}" != NONE &&
   exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`]
 
+AC_CONFIG_FILES([Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile \
+       doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \
+       doc/lispref/Makefile src/Makefile \
+       lwlib/Makefile lisp/Makefile leim/Makefile test/automated/Makefile])
+
+dnl Make the necessary directories, if they don't exist.
+AC_CONFIG_COMMANDS([mkdirs], [
+for dir in etc lisp ; do
+  test -d ${dir} || mkdir ${dir}
+done
+])
+
 dnl You might wonder (I did) why epaths.h is generated by running make,
 dnl rather than just letting configure generate it from epaths.in.
 dnl One reason is that the various paths are not fully expanded (see above);
@@ -3728,23 +3725,18 @@ dnl Secondly, the GNU Coding standards require that one should be able
 dnl to run `make prefix=/some/where/else' and override the values set
 dnl by configure.  This also explains the `move-if-change' test and
 dnl the use of force in the `epaths-force' rule in Makefile.in.
-AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile \
-       doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \
-       doc/lispref/Makefile src/Makefile \
-       lwlib/Makefile lisp/Makefile leim/Makefile, [
-
-### Make the necessary directories, if they don't exist.
-for dir in etc lisp ; do
-  test -d ${dir} || mkdir ${dir}
-done
-
+AC_CONFIG_COMMANDS([epaths], [
 echo creating src/epaths.h
 ${MAKE-make} epaths-force
+], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"])
 
+AC_CONFIG_COMMANDS([gdbinit], [
 if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
   echo creating src/.gdbinit
   echo source $srcdir/src/.gdbinit > src/.gdbinit
 fi
+])
 
-], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"])
+AC_OUTPUT
 
+dnl configure.in ends here