m4-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: 18-gary-ltdl-config-cleanup.patch


From: Gary V. Vaughan
Subject: FYI: 18-gary-ltdl-config-cleanup.patch
Date: Sun, 30 Sep 2001 15:30:31 +0100
User-agent: Mutt/1.3.22.1i

Index: ChangeLog
from  Gary V. Vaughan  <address@hidden>
        * configure.in: Moved to...
        * configure.ac: ...here.  Added a libtool like timestamped
        banner, and tidied up the libltdl cruft.
        * config/mkstamp: Script to extract a timestamp from ChangeLog.
        * modules/Makefile.am (INCLTDL):  Removed.  This is required
        only when libltdl is configured in a subdirectory.
        * src/Makefile.am: Ditto.
        (LIBADD_DL):  No need to add this again, libtool already knows
        that libm4.la depends on it.
        * m4/Makefile.am: Automake sets variables from AC_SUBST.  Use
        them.

Index: configure.ac
===================================================================
RCS file: configure.ac
diff -N configure.ac
--- /dev/null   Sat Apr 14 20:46:23 2001
+++ configure.ac Sun Sep 30 10:20:17 2001
@@ -0,0 +1,234 @@
+# Configure template for GNU m4.                       -*-Autoconf-*-
+# Copyright 1991-1994, 2000, 2001  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307  USA
+
+## -------------------------- ##
+## We need a modern Autotest. ##
+## -------------------------- ##
+AC_PREREQ([2.52e])
+
+
+
+## ------------------------ ##
+## Autoconf initialisation. ##
+## ------------------------ ##
+AC_INIT([GNU m4], [1.4q], address@hidden)
+
+AC_CONFIG_SRCDIR([src/m4.h])
+AC_CONFIG_AUX_DIR(config)
+AM_CONFIG_HEADER(config.h:config-h.in)
+AC_CONFIG_TESTDIR(tests)
+AC_CONFIG_FILES([tests/m4], [chmod +x tests/m4])
+
+
+
+## ---------------------------------------- ##
+## Display a configure time version banner. ##
+## ---------------------------------------- ##
+TIMESTAMP=
+case AC_PACKAGE_VERSION in
+  *[[acegikmoqsuwy]])
+    TIMESTAMP=`$CONFIG_SHELL $ac_aux_dir/mkstamp < $srcdir/ChangeLog`
+    banner="Configuring AC_PACKAGE_TARNAME AC_PACKAGE_VERSION$TIMESTAMP"
+    dashes=`echo "$banner" | sed 's/./-/g'`
+    
+    # Display an obvious version banner
+    echo
+    echo $dashes
+    echo "$banner"
+    echo $dashes
+    echo
+    ;;
+esac
+
+
+
+## -------------------------- ##
+## M4 specific configuration. ##
+## -------------------------- ##
+m4_pattern_allow([^m4_cv_])
+
+# We use some of Jim's macros.
+m4_pattern_forbid([^jm_])
+m4_pattern_allow([^jm_cv_])
+
+pkglibexecdir='${libexecdir}'/$PACKAGE
+AC_SUBST([pkglibexecdir])
+AC_SUBST([ac_aux_dir])
+
+AC_MSG_CHECKING(for modules to preload)
+  m4_pattern_allow([^m4_default_preload$])
+  m4_default_preload="m4 traditional gnu"
+  DLPREOPEN=
+
+  AC_ARG_WITH([modules],
+    [AC_HELP_STRING([--with-modules=MODULES]
+                    [preload MODULES @<:@default: $m4_default_preload@:>@])],
+    [use_modules="$withval"],
+    [use_modules="$m4_default_preload"])
+
+  DLPREOPEN="-dlpreopen force"
+  if test -z "$use_modules"; then
+    use_modules=none
+  else
+    if test "$use_modules" != yes; then
+      for module in $use_modules; do
+        DLPREOPEN="$DLPREOPEN -dlpreopen ../modules/$module.la"
+      done
+    fi
+  fi
+AC_MSG_RESULT($use_modules)
+AC_SUBST(DLPREOPEN)
+
+
+
+## ------------------------ ##
+## Automake Initialisation. ##
+## ------------------------ ##
+AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION)
+
+
+
+## ------------------ ##
+## C compiler checks. ##
+## ------------------ ##
+AC_PROG_CC
+AC_ISC_POSIX
+AM_PROG_CC_STDC
+AC_PROG_CPP
+AC_PROG_CC_C_O
+M4_AC_CHECK_DEBUGGING
+
+# Use gcc's -pipe option if available: for faster compilation.
+case "$CFLAGS" in
+  *-pipe* ) ;;
+        * ) AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -pipe],
+                [m4_cv_prog_compiler_pipe],
+                [-pipe -c conftest.$ac_ext], [],
+                [CFLAGS="$CFLAGS -pipe"])
+              ;;
+esac
+
+
+
+## ----------------------- ##
+## Libtool initialisation. ##
+## ----------------------- ##
+AM_ENABLE_SHARED
+AC_LIBTOOL_DLOPEN
+AC_LIBTOOL_WIN32_DLL
+AM_PROG_LIBTOOL
+AC_LIB_LTDL
+
+AC_SUBST([LTDLINCL], ["${LTDLINCL-INCLTDL}"])
+
+
+
+## ---------------- ##
+## Gettext support. ##
+## ---------------- ##
+ALL_LINGUAS="cs de el fr it ja nl pl ru sv"
+AM_GNU_GETTEXT
+AC_CONFIG_FILES(po/Makefile.in intl/Makefile)
+
+if test "$USE_INCLUDED_LIBINTL" = yes; then
+  AC_SUBST([INTLINCL], ['-I$(top_srcdir)/intl'])
+fi
+
+
+
+## ------------------------ ##
+## Other external programs. ##
+## ------------------------ ##
+AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+AC_PATH_PROG(PERL,perl)
+AC_PROG_AWK
+
+
+
+## ------------------------- ##
+## C headers required by M4. ##
+## ------------------------- ##
+AC_CHECK_HEADERS(limits.h locale.h memory.h string.h unistd.h errno.h)
+AC_HEADER_STDC
+
+
+
+## --------------------------- ##
+## C compiler characteristics. ##
+## --------------------------- ##
+AM_C_PROTOTYPES
+AC_C_CONST
+AC_TYPE_SIZE_T
+AC_CHECK_SIZEOF([long long int])
+
+
+
+## --------------------------------- ##
+## Library functions required by M4. ##
+## --------------------------------- ##
+AC_CHECK_FUNCS(bzero calloc mkstemp mktemp strerror tmpfile)
+AC_REPLACE_FUNCS(strtol xmalloc xstrdup)
+AC_FUNC_ALLOCA
+AC_FUNC_VPRINTF
+
+AM_WITH_DMALLOC
+
+jm_PREREQ_ERROR
+
+M4_AC_FUNC_OBSTACK
+M4_AC_SYS_STACKOVF
+
+M4OBJS=
+m4_pattern_allow([^m4_getopt_h$])
+m4_getopt_h=src/getopt.h
+rm -f 
+AC_CHECK_FUNC([getopt_long], [],
+    [M4OBJS="getopt1.$ac_objext getopt.$ac_objext"
+    AC_CONFIG_LINKS([$m4_getopt_h:src/gnu-getopt.h])])
+AC_SUBST([M4OBJS])
+
+
+# This is for the modules
+AC_STRUCT_TM
+AC_FUNC_STRFTIME
+AC_CHECK_FUNCS(getcwd gethostname mktime uname)
+AC_CHECK_FUNCS(setenv unsetenv putenv clearenv)
+
+AC_LIB_GMP
+AM_CONDITIONAL([USE_GMP], [test "x$LIBADD_GMP" != xno])
+
+
+
+## ---------------------------------- ##
+## Make sure LTLIBOBJS is up to date. ##
+## ---------------------------------- ##
+Xsed="sed -e s/^X//"
+LTLIBOBJS=`echo X"$LIBOBJS" | \
+    $Xsed -e 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
+AC_SUBST([LTLIBOBJS])
+
+
+
+## -------- ##
+## Outputs. ##
+## -------- ##
+AC_CONFIG_FILES(Makefile config/Makefile doc/Makefile m4/Makefile
+                m4/system.h:m4/system-h.in src/Makefile modules/Makefile
+               tests/Makefile examples/Makefile)
+AC_OUTPUT
Index: configure.in
===================================================================
RCS file: configure.in
diff -N configure.in
--- configure.in Sun Sep 30 10:20:30 2001
+++ /dev/null   Sat Apr 14 20:46:23 2001
@@ -1,149 +0,0 @@
-# Configure template for GNU m4.                       -*-Autoconf-*-
-# Copyright 1991-1994, 2000, 2001  Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-# 02111-1307  USA
-
-# We need a modern Autotest.
-AC_PREREQ([2.52e])
-m4_pattern_allow([^m4_cv_])
-
-# We use some of Jim's macros.
-m4_pattern_forbid([^jm_])
-m4_pattern_allow([^jm_cv_])
-
-AC_INIT([GNU m4], [1.4q], address@hidden)
-AC_CONFIG_SRCDIR([src/m4.h])
-AC_CONFIG_AUX_DIR(config)
-AM_CONFIG_HEADER(config.h:config-h.in)
-AC_CONFIG_TESTDIR(tests)
-AC_CONFIG_FILES([tests/m4], [chmod +x tests/m4])
-
-AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION)
-
-AC_PROG_CC
-AC_ISC_POSIX
-AM_PROG_CC_STDC
-AC_PROG_CPP
-AC_PROG_CC_C_O
-M4_AC_CHECK_DEBUGGING
-
-# Gettext.
-ALL_LINGUAS="cs de el fr it ja nl pl ru sv"
-AM_GNU_GETTEXT
-AC_CONFIG_FILES(po/Makefile.in intl/Makefile)
-
-pkglibexecdir='${libexecdir}'/$PACKAGE
-AC_SUBST(pkglibexecdir)
-
-AM_ENABLE_SHARED
-AC_LIBTOOL_DLOPEN
-AC_LIBTOOL_WIN32_DLL
-AM_PROG_LIBTOOL
-
-case "$CFLAGS" in
-  *-pipe* ) ;;
-        * ) AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -pipe],
-                [m4_cv_prog_compiler_pipe],
-                [-pipe -c conftest.$ac_ext], [],
-                [CFLAGS="$CFLAGS -pipe"])
-              ;;
-esac
-
-AC_PROG_AWK
-AC_PROG_INSTALL
-AC_PROG_MAKE_SET
-AC_PATH_PROG(PERL,perl)
-
-AM_C_PROTOTYPES
-AC_C_CONST
-
-AC_LIB_LTDL
-
-AC_CHECK_HEADERS(limits.h locale.h memory.h string.h unistd.h errno.h)
-AC_HEADER_STDC
-AC_TYPE_SIZE_T
-AC_CHECK_SIZEOF(long long int)
-
-AC_CHECK_FUNCS(bzero calloc mkstemp mktemp strerror tmpfile)
-
-AC_FUNC_ALLOCA
-AC_FUNC_VPRINTF
-AC_REPLACE_FUNCS(strtol xmalloc xstrdup)
-
-M4OBJS=
-m4_pattern_allow([^m4_getopt_h$])
-m4_getopt_h=src/getopt.h
-rm -f $m4_getopt_h
-AC_CHECK_FUNC(getopt_long, [],
-[M4OBJS="getopt1.$ac_objext getopt.$ac_objext"
-AC_CONFIG_LINKS($m4_getopt_h:src/gnu-getopt.h)])
-AC_SUBST(M4OBJS)
-
-M4_AC_FUNC_OBSTACK
-
-jm_PREREQ_ERROR
-
-M4_AC_SYS_STACKOVF
-
-AC_MSG_CHECKING(for modules to preload)
-m4_pattern_allow([^m4_default_preload$])
-m4_default_preload="m4 traditional gnu"
-AC_ARG_WITH(modules,
-[  --with-modules=MODULES preload MODULES [default: $m4_default_preload]],
-[use_modules="$withval"], [use_modules="$m4_default_preload"])
-test -z "$use_modules" && use_modules=no
-DLPREOPEN="-dlpreopen force"
-if test "$use_modules" = no; then
-  AC_MSG_RESULT(none)
-else
-  AC_MSG_RESULT($use_modules)
-  if test "$use_modules" != yes; then
-    DLPREOPEN=
-    for module in $use_modules; do
-      DLPREOPEN="$DLPREOPEN -dlpreopen ../modules/$module.la"
-    done
-  fi
-fi
-AC_SUBST(DLPREOPEN)
-
-# This is for the modules
-AC_STRUCT_TM
-AC_FUNC_STRFTIME
-AC_CHECK_FUNCS(getcwd gethostname mktime uname)
-AC_CHECK_FUNCS(setenv unsetenv putenv clearenv)
-
-AC_LIB_GMP
-AM_CONDITIONAL([USE_GMP], [test "x$LIBADD_GMP" != xno])
-
-AM_WITH_DMALLOC
-if test "$USE_INCLUDED_LIBINTL" = yes; then
-  AC_SUBST([INTLINCL], ['-I$(top_srcdir)/intl'])
-fi
-
-
-Xsed="sed -e s/^X//"
-LTLIBOBJS=`echo X"$LIBOBJS" | \
-[$Xsed -e 's,\.[^.]* ,.lo ,g;s,\.[^.]*$,.lo,']`
-AC_SUBST(LTLIBOBJS)
-
-AC_SUBST(ac_aux_dir)
-
-# Outputs.
-AC_CONFIG_FILES(Makefile config/Makefile doc/Makefile m4/Makefile
-                m4/system.h:m4/system-h.in src/Makefile modules/Makefile
-               tests/Makefile examples/Makefile)
-
-AC_OUTPUT
Index: config/Makefile.am
===================================================================
RCS file: /cvsroot/m4/m4/config/Makefile.am,v
retrieving revision 1.8
diff -u -p -u -r1.8 Makefile.am
--- config/Makefile.am 2001/09/04 00:15:34 1.8
+++ config/Makefile.am 2001/09/30 14:20:17
@@ -71,4 +71,4 @@ stackovf.m4
 spy:
        @echo $($(SPIED))
 
-EXTRA_DIST = $(SPECIFIC_MACROS) $(ACLOCAL_MACROS)
+EXTRA_DIST = mkstamp $(SPECIFIC_MACROS) $(ACLOCAL_MACROS)
Index: config/mkstamp
===================================================================
RCS file: mkstamp
diff -N mkstamp
--- /dev/null   Sat Apr 14 20:46:23 2001
+++ config/mkstamp Sun Sep 30 10:20:17 2001
@@ -0,0 +1,37 @@
+#! /bin/sh
+
+# mkstamp - extract data from Revision and Date RCS tags in a file
+# Copyright (C) 1999 Free Software Foundation, Inc.
+# Alexandre Oliva <address@hidden>
+#
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This script expects to find a line containing both Revision and Date
+# tags, and it edits this line so that it looks line ` ($rev $date)'
+
+# Command-line arguments are passed down to sed; additional -e cmd
+# arguments are acceptable.  If no input filename is specified in the
+# command line, sed will read from stdin.
+
+exec sed -e '
+       s%.*\$''Revision: \([^$]*\) \$.*\$''Date: \([^$]*\) \$.*% (\1 \2)%
+       t end
+       d
+       : end' ${1+"$@"}
Index: m4/Makefile.am
===================================================================
RCS file: /cvsroot/m4/m4/m4/Makefile.am,v
retrieving revision 1.12
diff -u -p -u -r1.12 Makefile.am
--- m4/Makefile.am 2001/09/20 22:01:34 1.12
+++ m4/Makefile.am 2001/09/30 14:20:17
@@ -26,11 +26,11 @@ pkgincdir           = $(includedir)/@PACKAGE@
 
 LDFLAGS        = -no-undefined -export-dynamic
 INCLUDES       = -I$(top_builddir) -I$(top_srcdir) \
-                 -I$(top_builddir)/src -I$(top_srcdir)/src @INTLINCL@
+                 -I$(top_builddir)/src -I$(top_srcdir)/src $(INTLINCL)
 
 include_HEADERS        = m4module.h
 noinst_HEADERS = m4private.h
-pkginc_HEADERS = error.h hash.h ltdl.h regex.h system.h @OBSTACK_H@
+pkginc_HEADERS = error.h hash.h ltdl.h regex.h system.h $(OBSTACK_H)
 EXTRA_HEADERS  = system-h.in gnu-obstack.h
 
 EXTRA_DIST = $(EXTRA_HEADERS) obstack.c
@@ -39,7 +39,7 @@ lib_LTLIBRARIES               = libm4.la
 libm4_la_SOURCES       = builtin.c debug.c error.c hash.c \
                          input.c ltdl.c macro.c module.c output.c \
                          path.c regex.c symtab.c utility.c
-libm4_la_LIBADD                = @LTLIBOBJS@ @LIBADD_DL@
+libm4_la_LIBADD                = $(LTLIBOBJS) $(LIBADD_DL)
 
 module.o module.lo: $(srcdir)/module.c pathconf.h
 pathconf.h: Makefile
Index: modules/Makefile.am
===================================================================
RCS file: /cvsroot/m4/m4/modules/Makefile.am,v
retrieving revision 1.16
diff -u -p -u -r1.16 Makefile.am
--- modules/Makefile.am 2001/09/21 00:13:30 1.16
+++ modules/Makefile.am 2001/09/30 14:20:17
@@ -28,7 +28,7 @@ ETAGS_ARGS = --regex='/M4BUILTIN_HANDLER
 EXTRA_DIST = modtest.m4 shadow.m4 time.m4 time2.m4 stdlib.m4 format.c
 
 INCLUDES       = -I$(top_builddir) -I$(top_srcdir) \
-                 -I$(top_builddir)/m4 -I$(top_srcdir)/m4 $(INCLTDL) $(INTLINCL)
+                 -I$(top_builddir)/m4 -I$(top_srcdir)/m4 $(INTLINCL)
 LIBS = $(top_builddir)/m4/libm4.la
 LDFLAGS = -no-undefined
 
Index: src/Makefile.am
===================================================================
RCS file: /cvsroot/m4/m4/src/Makefile.am,v
retrieving revision 1.8
diff -u -p -u -r1.8 Makefile.am
--- src/Makefile.am 2001/09/06 20:13:12 1.8
+++ src/Makefile.am 2001/09/30 14:20:30
@@ -22,7 +22,7 @@ CLEANFILES = m4$(EXEEXT)
 MAINTAINERCLEANFILES = Makefile.in
 
 INCLUDES       = -I$(top_builddir) -I$(top_srcdir) \
-                 -I$(top_builddir)/m4 -I$(top_srcdir)/m4 $(INCLTDL) $(INTLINCL)
+                 -I$(top_builddir)/m4 -I$(top_srcdir)/m4 $(INTLINCL)
 
 noinst_HEADERS = gnu-getopt.h
 
@@ -30,7 +30,7 @@ bin_PROGRAMS = m4
 m4_SOURCES = main.c m4.h freeze.c stackovf.c
 EXTRA_m4_SOURCES = getopt.c getopt1.c
 
-m4_LDADD = $(M4OBJS) $(top_builddir)/m4/libm4.la $(LIBADD_DL) $(INTLLIBS)
+m4_LDADD = $(M4OBJS) $(top_builddir)/m4/libm4.la $(INTLLIBS)
 m4_LDFLAGS = -no-undefined -export-dynamic $(DLPREOPEN)
 
 $(bin_PROGRAMS): $(M4OBJS)

-- 
  ())_. Gary V. Vaughan     gary@(oranda.demon.co.uk|gnu.org)
  ( '/  Research Scientist  http://www.oranda.demon.co.uk       ,_())____
  / )=  GNU Hacker          http://www.gnu.org/software/libtool  \'      `&
`(_~)_  Tech' Author        http://sources.redhat.com/autobook   =`---d__/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]