## ---------------- ##
configure_edit = $(SED) \
- -e 's,@aclocal_DATA\@,$(aclocalfiles),g' \
-e 's,@aclocaldir\@,$(aclocaldir),g' \
-e 's,@aux_dir\@,$(aux_dir),g' \
-e 's,@datadir\@,$(datadir),g' \
-e "s,@pkgconfig_files\@,$(auxfiles),g" \
-e 's,@pkgdatadir\@,$(pkgdatadir),g' \
-e "s,@pkgltdl_files\@,$(ltdldatafiles),g" \
+ -e 's,@pkgmacro_files\@,$(pkgmacro_files),g' \
-e 's,@prefix\@,$(prefix),g' \
-e 's,@SED\@,$(SED),g' \
-e 's,@srcdir\@,$(srcdir),g'
# Everything that gets picked up by aclocal is automatically distributed,
# this is the list of macro files we install on the user's system.
-aclocalfiles = m4/argz.m4 m4/libtool.m4 m4/ltdl.m4 m4/ltoptions.m4 \
- m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4
+pkgmacro_files = argz.m4 libtool.m4 ltdl.m4 ltoptions.m4 ltsugar.m4 \
+ ltversion.m4 lt~obsolete.m4
## These are installed as a subdirectory of pkgdatadir so that
## libtoolize --ltdl can find them later:
## Don't install over the top of an old pkgdatadir
-rm -rf '$(DESTDIR)$(pkgdatadir)'/*
## First, put a copy of the libtool m4 macros in the aclocal dir
- @list='$(aclocalfiles)'; for p in $$list; do \
- f=`echo "$$p" |'$(SED)' 's|^.*/||'`; \
- d=`echo "$(DESTDIR)$(aclocaldir)/$$f" |$(SED) 's,[^/]*$$,,'`; \
+ @list='$(pkgmacro_files)'; for p in $$list; do \
+ d=`echo "$(DESTDIR)$(aclocaldir)/$$p" |$(SED) 's,[^/]*$$,,'`; \
test -d "$$d" || $(mkinstalldirs) "$$d"; \
- echo " $(INSTALL_DATA) '$(srcdir)/$(macro_dir)/$$f' '$(DESTDIR)$(aclocaldir)/$$f'"; \
- $(INSTALL_DATA) "$(srcdir)/$(macro_dir)/$$f" "$(DESTDIR)$(aclocaldir)/$$f"; \
+ echo " $(INSTALL_DATA) '$(srcdir)/$(macro_dir)/$$p' '$(DESTDIR)$(aclocaldir)/$$p'"; \
+ $(INSTALL_DATA) "$(srcdir)/$(macro_dir)/$$p" "$(DESTDIR)$(aclocaldir)/$$p"; \
done
## install the helper scripts
@list='config/extract-trace config/options-parser $(pkgaux_scripts)' && \
echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
done
- @for p in $(aclocalfiles); do \
+ @for p in $(pkgmacro_files); do \
f=`echo "$$p" |$(SED) 's|^.*/||'`; \
echo " rm -f '$(DESTDIR)$(aclocaldir)/$$f'"; \
rm -f "$(DESTDIR)$(aclocaldir)/$$f"; \
}
-# func_massage_aclocal_DATA [glob_exclude]
-# @aclocal_DATA\@ is substituted as per its value in Makefile.am;
-# this function massages it into a suitable format for func_copy_some_files.
-func_massage_aclocal_DATA ()
-{
- $debug_cmd
-
- pkgmacro_files= # GLOBAL VAR
-
- my_glob_exclude="$1"
-
- # Massage a value for pkgmacro_files from the value used in Makefile.am.
- for my_filename in @aclocal_DATA@; do
- func_dirname_and_basename "$my_filename"
- my_filename=$func_basename_result
-
- # ignore excluded filenames
- if test -n "$my_glob_exclude"; then
- my_cont=false
- eval 'case $my_filename in '$my_glob_exclude') my_cont=: ;; esac'
- $my_cont && continue
- fi
-
- pkgmacro_files="${pkgmacro_files+$pkgmacro_files }$my_filename"
- done
-}
-
-
# func_install_pkgmacro_subproject
# Unless --quiet was passed, display a message. Then copy pkgmacro_files
# from libtool installation tree to subproject libltdl tree.
pkgmacro_header="putting macros in AC_CONFIG_MACRO_DIR, \`$subproject_macro_dir'."
fi
- func_copy_some_files "argz.m4 libtool.m4 ltdl.m4 $pkgmacro_files" \
+ func_copy_some_files "$pkgmacro_files" \
"$aclocaldir" "$subproject_macro_dir" pkgmacro_header
}
my_pkgmacro_header="putting macros in \`$macro_dir'."
fi
- if $opt_ltdl; then
- func_serial_update argz.m4 "$aclocaldir" "$macro_dir" \
- my_pkgmacro_header argz.m4
- else
- func_verbose "Not copying \`$macro_dir/argz.m4', libltdl not used."
- fi
+ for file in $pkgmacro_files; do
+ case $file in
+ argz.m4|ltdl.m4)
+ $opt_ltdl || {
+ func_verbose "Not copying \`$macro_dir/$file', libltdl not used."
+ continue
+ }
+ ;;
+ esac
- func_serial_update libtool.m4 "$aclocaldir" "$macro_dir" \
- my_pkgmacro_header LT_INIT 'A[CM]_PROG_LIBTOOL'
+ case $file in
+ libtool.m4)
+ func_serial_update libtool.m4 "$aclocaldir" "$macro_dir" \
+ my_pkgmacro_header LT_INIT 'A[CM]_PROG_LIBTOOL' ;;
- if $opt_ltdl; then
- func_serial_update ltdl.m4 "$aclocaldir" "$macro_dir" \
- my_pkgmacro_header 'LTDL_INIT'
- else
- func_verbose "Not copying \`$macro_dir/ltdl.m4', libltdl not used."
- fi
+ ltdl.m4)
+ func_serial_update ltdl.m4 "$aclocaldir" "$macro_dir" \
+ my_pkgmacro_header 'LTDL_INIT' ;;
- for file in $pkgmacro_files; do
- func_serial_update "$file" "$aclocaldir" "$macro_dir" \
- my_pkgmacro_header "$file"
+ *)
+ func_serial_update "$file" "$aclocaldir" "$macro_dir" \
+ my_pkgmacro_header "$file" ;;
+ esac
done
}
$require_ltdl_mode
$require_macro_dir
- # argz.m4, libtool.m4 and ltdl.m4 are handled specially:
- func_massage_aclocal_DATA 'argz.m4|libtool.m4|ltdl.m4'
-
# 1. Parent has separate macro_dir to subproject ltdl:
if $opt_ltdl && test "x$ltdl_mode" = "xsubproject" &&
test "x$macro_dir" != "x$subproject_macro_dir"
my_ac_config_macro_srcdir="$subproject_macro_dir"
fi
- my_needed="libtool.m4 ltoptions.m4 ltversion.m4 ltsugar.m4 lt~obsolete.m4"
- $opt_ltdl && my_needed="$my_needed argz.m4 ltdl.m4"
-
- if test -f "aclocal.m4"; then
- for need in $my_needed; do
- func_aclocal_update_check $need
- $func_aclocal_update_check_result && my_missing="$my_missing $need"
- done
- else
- my_missing="$my_needed"
- fi
+ my_missing=
+ for file in $pkgmacro_files; do
+ case $file in
+ argz.m4|ltdl.m4) $opt_ltdl || continue ;;
+ esac
+ if test -f "aclocal.m4"; then
+ func_aclocal_update_check $file
+ $func_aclocal_update_check_result || continue
+ fi
+ my_missing="$my_missing $file"
+ done
if test -n "$my_missing"; then
func_echo "You should add the contents of the following files to \`aclocal.m4':"
all_pkgmacro_files="argz.m4 libtool.m4 ltdl.m4 ltoptions.m4 ltsugar.m4 ltversion.in ltversion.m4 lt~obsolete.m4"
all_pkgltdl_files="COPYING.LIB Makefile Makefile.in Makefile.inc Makefile.am README acinclude.m4 aclocal.m4 argz_.h argz.c config.h.in config-h.in configure configure.ac configure.in libltdl/lt__alloc.h libltdl/lt__dirent.h libltdl/lt__glibc.h libltdl/lt__private.h libltdl/lt__strl.h libltdl/lt_dlloader.h libltdl/lt_error.h libltdl/lt_system.h libltdl/slist.h loaders/dld_link.c loaders/dlopen.c loaders/dyld.c loaders/load_add_on.c loaders/loadlibrary.c loaders/preopen.c loaders/shl_load.c lt__alloc.c lt__dirent.c lt__strl.c lt_dlloader.c lt_error.c ltdl.c ltdl.h slist.c"
+ # Files installed by func_install_pkgmacro_files(), not including
+ # libtool.m4 and ltdl.m4 which are handled specially.
+ pkgmacro_files="@pkgmacro_files@"
+
# Locations for important files:
prefix=@prefix@
datadir=@datadir@
libtoolize: You should add the contents of the following files to `aclocal.m4':
libtoolize: `/usr/local/share/aclocal/libtool.m4'
libtoolize: `/usr/local/share/aclocal/ltoptions.m4'
-libtoolize: `/usr/local/share/aclocal/ltversion.m4'
libtoolize: `/usr/local/share/aclocal/ltsugar.m4'
+libtoolize: `/usr/local/share/aclocal/ltversion.m4'
libtoolize: `/usr/local/share/aclocal/lt~obsolete.m4'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: copying file `./ltmain.sh'
libtoolize: You should add the contents of the following files to `aclocal.m4':
libtoolize: `/usr/local/share/aclocal/libtool.m4'
-libtoolize: `/usr/local/share/aclocal/ltversion.m4'
libtoolize: `/usr/local/share/aclocal/ltsugar.m4'
+libtoolize: `/usr/local/share/aclocal/ltversion.m4'
libtoolize: `/usr/local/share/aclocal/lt~obsolete.m4'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.