[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Support AC_CONFIG_LIBOBJ_DIR
From: |
Gary V. Vaughan |
Subject: |
[PATCH] Support AC_CONFIG_LIBOBJ_DIR |
Date: |
Mon, 18 Apr 2005 14:47:46 +0100 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041103) |
Hallo!
While trying to convert libtool HEAD to use a single toplevel Makefile.am,
I discovered that neither branch-1-9 or HEAD of automake pay heed to the
AC_CONFIG_LIBOBJ_DIR declaration in configure.ac.
With this patch, using a single top-level Makefile.am, Libtool can now build
libltdl/libltdl.la along with LIBOBJ sources also kept in libltdl/ provided I
add AC_CONFIG_LIBOBJ_DIR(libltdl) in configure.ac. The patch also applies
correctly (with fuzz) to HEAD.
As ever, I only use perl under extreme duress, so my command of the language
is poor at best. As such, I'm not entirely convinced that the interaction of
this patch with the value of $relative_dir in `&require_libobj_with_macro' is
entirely correct...
2005-04-18 Gary V. Vaughan <address@hidden>
* automake.in (config_libobj_dir): Either `.' or whatever directory is
given to AC_CONFIG_LIBOBJ_DIR in configure.ac.
(scan_autoconf_traces): Set config_libobj_dir.
(require_libobj_with_macro): Use $config_libobj_dir when looking for
LIBOBJs.
Cheers,
Gary.
--
Gary V. Vaughan ())_. address@hidden,gnu.org}
Research Scientist ( '/ http://tkd.kicks-ass.net
GNU Hacker / )= http://www.gnu.org/software/libtool
Technical Author `(_~)_ http://sources.redhat.com/autobook
--- ./automake~ 2005-02-27 15:04:23.000000000 +0000
+++ ./automake.in 2005-04-18 14:22:01.000000000 +0100
@@ -333,6 +333,10 @@
# in Makefiles.
my $am_config_aux_dir = '';
+# Directory to search for AC_LIBSOURCE file, as set by AC_CONFIG_LIBOBJ_DIR
+# in configure.ac.
+my $config_libobj_dir = '.';
+
# Whether AM_GNU_GETTEXT has been seen in configure.ac.
my $seen_gettext = 0;
# Whether AM_GNU_GETTEXT([external]) is used.
@@ -2067,7 +2071,7 @@
if ($iter =~ /\.h$/)
{
- require_file_with_macro ($cond, $var, FOREIGN, $iter);
+ require_libobj_with_macro ($cond, $var, FOREIGN, $iter);
}
elsif ($iter ne 'alloca.c')
{
@@ -2079,7 +2083,7 @@
my $bs = var ('BUILT_SOURCES');
if (! $bs || ! grep (/$rewrite/, $bs->value_as_list_recursive))
{
- require_file_with_macro ($cond, $var, FOREIGN, $iter);
+ require_libobj_with_macro ($cond, $var, FOREIGN, $iter);
}
}
}
@@ -4636,6 +4640,7 @@
AC_CONFIG_AUX_DIR => 1,
AC_CONFIG_FILES => 1,
AC_CONFIG_HEADERS => 1,
+ AC_CONFIG_LIBOBJ_DIR => 1,
AC_CONFIG_LINKS => 1,
AC_INIT => 0,
AC_LIBSOURCE => 1,
@@ -4731,6 +4736,11 @@
push @config_headers, $spec;
}
}
+ elsif ($macro eq 'AC_CONFIG_LIBOBJ_DIR')
+ {
+ $config_libobj_dir = $args[1];
+ check_directory ($config_libobj_dir, $where);
+ }
elsif ($macro eq 'AC_CONFIG_LINKS')
{
foreach my $spec (split (' ', $args[1]))
@@ -6975,6 +6985,14 @@
require_file ($macro->rdef ($cond)->location, $mystrict, @files);
}
+# &require_libobj_with_macro ($COND, $MACRO, $MYSTRICT, @FILES)
+# -------------------------------------------------------------
+sub require_libobj_with_macro ($$$@)
+{
+ my ($cond, $macro, $mystrict, @files) = @_;
+ $macro = rvar ($macro) unless ref $macro;
+ require_file_internal ($macro->rdef ($cond)->location, $mystrict,
$config_libobj_dir, @files);
+}
# &require_conf_file ($WHERE, $MYSTRICT, @FILES)
# ----------------------------------------------
signature.asc
Description: OpenPGP digital signature
- [PATCH] Support AC_CONFIG_LIBOBJ_DIR,
Gary V. Vaughan <=
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR, Gary V. Vaughan, 2005/04/18
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR, Paul Eggert, 2005/04/18
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR, Alexandre Duret-Lutz, 2005/04/18
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR, Gary V. Vaughan, 2005/04/20
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR (fixes PR/401), Gary V. Vaughan, 2005/04/20
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR (fixes PR/401), Paul Eggert, 2005/04/20
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR (fixes PR/401), Alexandre Duret-Lutz, 2005/04/21
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR (fixes PR/401), Gary V. Vaughan, 2005/04/25