bug-gnulib
[Top][All Lists]
Advanced

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

relocatability tweaks


From: Paolo Bonzini
Subject: relocatability tweaks
Date: Mon, 17 Mar 2008 14:06:39 +0100
User-agent: Thunderbird 2.0.0.12 (Macintosh/20080213)

This patch does the following:

1) Split part of gl_RELOCATABLE_NOP into a separate gl_RELOCATABLE_ENABLE macro. The reason will be apparent from the other changes.

2) Add a gl_RELOCATABLE_DEFAULT macro that changes the default for --enable-relocatable.

3) Make gl_RELOCATABLE_NOP default to "yes". This just means "print yes on the configure script line", since the resulting package *will* be relocatable.

Ok to install?

Paolo
2008-03-15  Paolo Bonzini  <address@hidden>

        * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY):
        Require gl_RELOCATABLE_ENABLE.
        (gl_RELOCATABLE_ENABLE): Split out of gl_RELOCATABLE_NOP.
        (gl_RELOCATABLE_DEFAULT): New.
        (gl_RELOCATABLE_NOP): Build from gl_RELOCATABLE_ENABLE
        and gl_RELOCATABLE_DEFAULT.

diff --git a/m4/relocatable-lib.m4 b/m4/relocatable-lib.m4
index 4c90677..3a2e56f 100644
--- a/m4/relocatable-lib.m4
+++ b/m4/relocatable-lib.m4
@@ -16,7 +16,7 @@ AC_DEFUN([gl_RELOCATABLE_LIBRARY],
 ])
 AC_DEFUN([gl_RELOCATABLE_LIBRARY_BODY],
 [
-  AC_REQUIRE([gl_RELOCATABLE_NOP])
+  AC_REQUIRE([gl_RELOCATABLE_ENABLE])
   dnl Easier to put this here once, instead of into the DEFS of each Makefile.
   if test "X$prefix" = "XNONE"; then
     reloc_final_prefix="$ac_default_prefix"
@@ -41,6 +41,14 @@ AC_DEFUN([gl_RELOCATABLE_LIBRARY_SEPARATE],
 dnl Support for relocatable packages for which it is a nop.
 AC_DEFUN([gl_RELOCATABLE_NOP],
 [
+  AC_REQUIRE([gl_RELOCATABLE_DEFAULT])
+  AC_REQUIRE([gl_RELOCATABLE_ENABLE])
+])
+
+AC_DEFUN([gl_RELOCATABLE_DEFAULT], [])
+
+AC_DEFUN([gl_RELOCATABLE_ENABLE],
+[
   AC_MSG_CHECKING([whether to activate relocatable installation])
   AC_ARG_ENABLE(relocatable,
     [  --enable-relocatable    install a package that can be moved in the 
filesystem],
@@ -49,7 +57,7 @@ AC_DEFUN([gl_RELOCATABLE_NOP],
      else
        RELOCATABLE=no
      fi
-    ], RELOCATABLE=no)
+    ], [RELOCATABLE=m4_provide_if([gl_RELOCATABLE_DEFAULT], [yes], [no])
   AC_SUBST(RELOCATABLE)
   AC_MSG_RESULT([$RELOCATABLE])
 ])

reply via email to

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