diff options
author | Bruno Haible <bruno@clisp.org> | 2007-03-04 15:33:48 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2007-03-04 15:33:48 +0000 |
commit | 4f1ef93bb87111c89562d136d07e0278c12dca5b (patch) | |
tree | 93e5019024e205d6263d54215bba826303c1da19 | |
parent | c417407f31b86913a34d80bd4af4bae43d9793ba (diff) | |
download | gnulib-4f1ef93bb87111c89562d136d07e0278c12dca5b.tar.gz |
Compile relocatable.c only if --enable-relocatable was specified.
-rw-r--r-- | ChangeLog | 19 | ||||
-rw-r--r-- | m4/relocatable-lib.m4 | 16 | ||||
-rw-r--r-- | m4/relocatable.m4 | 8 | ||||
-rw-r--r-- | modules/relocatable-lib | 2 | ||||
-rw-r--r-- | modules/relocatable-lib-lgpl | 2 | ||||
-rw-r--r-- | modules/relocatable-prog | 2 | ||||
-rw-r--r-- | modules/relocatable-prog-wrapper | 2 |
7 files changed, 41 insertions, 10 deletions
@@ -1,5 +1,24 @@ 2007-03-04 Bruno Haible <bruno@clisp.org> + Compile relocatable.c only if --enable-relocatable is specified. + * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from + gl_RELOCATABLE_LIBRARY. + (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros. + * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY. + (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of + gl_RELOCATABLE_LIBRARY. + * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY. + (Makefile.am): Remove lib_SOURCES. + * modules/relocatable-lib-lgpl (configure.ac): Invoke + gl_RELOCATABLE_LIBRARY. + (Makefile.am): Remove lib_SOURCES. + * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c + always. + * modules/relocatable-prog-wrapper (configure.ac): Invoke + gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY. + +2007-03-04 Bruno Haible <bruno@clisp.org> + * modules/argmatch-tests: New file. * tests/test-argmatch.c: New file. diff --git a/m4/relocatable-lib.m4 b/m4/relocatable-lib.m4 index 9f840d967d..4c9067769e 100644 --- a/m4/relocatable-lib.m4 +++ b/m4/relocatable-lib.m4 @@ -1,4 +1,4 @@ -# relocatable-lib.m4 serial 2 +# relocatable-lib.m4 serial 3 dnl Copyright (C) 2003, 2005-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -9,6 +9,13 @@ dnl From Bruno Haible. dnl Support for relocatable libraries. AC_DEFUN([gl_RELOCATABLE_LIBRARY], [ + AC_REQUIRE([gl_RELOCATABLE_LIBRARY_BODY]) + if test $RELOCATABLE = yes; then + AC_LIBOBJ([relocatable]) + fi +]) +AC_DEFUN([gl_RELOCATABLE_LIBRARY_BODY], +[ AC_REQUIRE([gl_RELOCATABLE_NOP]) dnl Easier to put this here once, instead of into the DEFS of each Makefile. if test "X$prefix" = "XNONE"; then @@ -24,6 +31,13 @@ AC_DEFUN([gl_RELOCATABLE_LIBRARY], fi ]) +dnl Like gl_RELOCATABLE_LIBRARY, except prepare for separate compilation +dnl (no AC_LIBOBJ). +AC_DEFUN([gl_RELOCATABLE_LIBRARY_SEPARATE], +[ + AC_REQUIRE([gl_RELOCATABLE_LIBRARY_BODY]) +]) + dnl Support for relocatable packages for which it is a nop. AC_DEFUN([gl_RELOCATABLE_NOP], [ diff --git a/m4/relocatable.m4 b/m4/relocatable.m4 index fc24f79f8e..da14848a12 100644 --- a/m4/relocatable.m4 +++ b/m4/relocatable.m4 @@ -1,4 +1,4 @@ -# relocatable.m4 serial 9 +# relocatable.m4 serial 10 dnl Copyright (C) 2003, 2005-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -13,9 +13,7 @@ dnl Supply RELOCWRAPPER-DIR as the directory where relocwrapper.c may be found. AC_DEFUN([gl_RELOCATABLE], [ AC_REQUIRE([gl_RELOCATABLE_BODY]) - if test $RELOCATABLE = yes; then - AC_LIBOBJ([relocatable]) - fi + gl_RELOCATABLE_LIBRARY : ${RELOCATABLE_CONFIG_H_DIR='$(top_builddir)'} RELOCATABLE_SRC_DIR="\$(top_srcdir)/$gl_source_base" RELOCATABLE_BUILD_DIR="\$(top_builddir)/$gl_source_base" @@ -32,7 +30,7 @@ AC_DEFUN([gl_RELOCATABLE_BODY], dnl macro's setting of INSTALL_PROGRAM to persist. AC_BEFORE([AC_PROG_INSTALL],[gl_RELOCATABLE_BODY]) AC_REQUIRE([AC_LIB_LIBPATH]) - AC_REQUIRE([gl_RELOCATABLE_LIBRARY]) + AC_REQUIRE([gl_RELOCATABLE_LIBRARY_BODY]) is_noop=no use_elf_origin_trick=no if test $RELOCATABLE = yes; then diff --git a/modules/relocatable-lib b/modules/relocatable-lib index 86c70b522d..07dd4cb1a8 100644 --- a/modules/relocatable-lib +++ b/modules/relocatable-lib @@ -12,9 +12,9 @@ Depends-on: xalloc configure.ac: +gl_RELOCATABLE_LIBRARY Makefile.am: -lib_SOURCES += relocatable.c Include: "relocatable.h" diff --git a/modules/relocatable-lib-lgpl b/modules/relocatable-lib-lgpl index 6cbd8690c8..2b992d8889 100644 --- a/modules/relocatable-lib-lgpl +++ b/modules/relocatable-lib-lgpl @@ -11,10 +11,10 @@ m4/relocatable-lib.m4 Depends-on: configure.ac: +gl_RELOCATABLE_LIBRARY Makefile.am: DEFS += -DNO_XMALLOC -lib_SOURCES += relocatable.c Include: "relocatable.h" diff --git a/modules/relocatable-prog b/modules/relocatable-prog index 9436d9cd03..6029b7c783 100644 --- a/modules/relocatable-prog +++ b/modules/relocatable-prog @@ -26,7 +26,7 @@ gl_RELOCATABLE([$gl_source_base]) Makefile.am: DEFS += -DEXEEXT=\"$(EXEEXT)\" -lib_SOURCES += relocatable.c progreloc.c +lib_SOURCES += progreloc.c Include: #include "relocatable.h" diff --git a/modules/relocatable-prog-wrapper b/modules/relocatable-prog-wrapper index fb9c6c0ca9..07075254e6 100644 --- a/modules/relocatable-prog-wrapper +++ b/modules/relocatable-prog-wrapper @@ -43,7 +43,7 @@ configure.ac: gl_FUNC_READLINK_SEPARATE gl_CANONICALIZE_LGPL_SEPARATE gl_ALLOCSA -gl_RELOCATABLE_LIBRARY +gl_RELOCATABLE_LIBRARY_SEPARATE gl_FUNC_SETENV_SEPARATE gl_FUNC_STRERROR_SEPARATE |