diff configure.in @ 64639:385af3e03206

Merge gnulib getopt implementation into Emacs. * Makefile.in (AUTOCONF_INPUTS): New macro. ($(srcdir)/configure, $(srcdir)/src/stamp-h.in): Depend on it, so that these files also depend on m4/getopt.m4. * configure.in: Configure getopt by including m4/getopt.m4, and configuring a getopt replacement if necessary. * make-dist: Add m4 subdirectory. Unlink lib-src/getopt.h. * m4/getopt.m4: New file. * lib-src/Makefile.in (mostlyclean): Remove getopt.h, getopt.h-t. (GETOPT_H): New macro, from gnulib. (getopt.h): New rule, from gnulib. (GETOPTOBJS): Now autoconfigured. (GETOPTDEPS): getopt.h is now autoconfigured. (getopt.o, getopt1.o): Depend on $(GETOPT_H), not ${srcdir}/getopt.h. (getopt.o): Depend on ${srcdir}/gettext.h. (movemail.o): Depend on $(GETOPT_H). * lib-src/getopt.c, lib-src/getopt1.c: Sync from gnulib. * lib-src/getopt_.h, lib-src/getopt_int.h, lib-src/gettext.h: New files, from gnulib. * lib-src/getopt.h: Removed (now is getopt_.h). * nt/inc/gettext.h: Remove; no longer needed now that lib-src/gettext.h exists. * src/s/cygwin.h (C_SWITCH_SYSTEM): Remove, since gettext.h is now part of lib-src.
author Paul Eggert <eggert@twinsun.com>
date Tue, 26 Jul 2005 21:43:13 +0000
parents 1dca08518d97
children 7361cc4f01a8 532e0a9335a9 890cc78a5a24
line wrap: on
line diff
--- a/configure.in	Tue Jul 26 16:28:44 2005 +0000
+++ b/configure.in	Tue Jul 26 21:43:13 2005 +0000
@@ -2353,7 +2353,7 @@
   CFLAGS="$CFLAGS -framework Carbon"
   AC_CHECK_FUNC(CancelMenuTracking, have_cmt=yes, have_cmt=no)
   if test "$have_cmt" = yes; then
-    AC_DEFINE(HAVE_CANCELMENUTRACKING, 1, 
+    AC_DEFINE(HAVE_CANCELMENUTRACKING, 1,
               [Define to 1 if CancelMenuTracking is available (Mac OSX).])
   fi
   CFLAGS="$tmp_CFLAGS"
@@ -2434,6 +2434,15 @@
 
 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