bug-cppi
[Top][All Lists]
Advanced

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

[bug-cppi] [PATCH 14/19] build: part two of using subdir-objects: handle


From: Jim Meyering
Subject: [bug-cppi] [PATCH 14/19] build: part two of using subdir-objects: handle e.g., GETOPT_H
Date: Wed, 25 Jan 2012 09:22:51 +0100

From: Jim Meyering <address@hidden>

* configure.ac: Prepend lib/ to the value of each /_H$/ = /\.h$/
substituted variable, converting each <var,value> pair, e.g.,
<GETOPT_H,getopt.h> to <GETOPT_H,lib/getopt.h>.
---
 configure.ac |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index eb003ae..2c91d04 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,6 +83,20 @@ AC_HEADER_ASSERT
 AM_GNU_GETTEXT([external])
 AM_GNU_GETTEXT_VERSION([0.17])

-AC_CONFIG_FILES([Makefile po/Makefile.in])
+# This is copied from bison.  FIXME: keep it in sync!
+# We use gnulib, but from lib/local.mk instead of lib/Makefile.am.
+# So prefix paths with lib/.  See also etc/prefix-gnulib-mk.
+gl_LIBOBJS=`echo "$gl_LIBOBJS" | sed -e 's, , lib/,g'`
+# Listing the names of the variables to prefix is error-prone.
+# Rather, adjust all the AC_SUBST variables whose name ends in '_H',
+# and whose content ends in '.h'.
+for ac_var in $ac_subst_vars
+do
+  eval "ac_val=\$$ac_var"
+  case $ac_var=$ac_val in
+    (*_H=*.h) eval "$ac_var=lib/\$$ac_var";;
+  esac
+done

+AC_CONFIG_FILES([Makefile po/Makefile.in])
 AC_OUTPUT
-- 
1.7.9.rc2.2.g183d6




reply via email to

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