+ files=`for f in $files; do echo $f; done | LC_ALL=C sort -u`
+}
+
+# func_emit_lib_Makefile_am
+# emits the contents of library makefile to standard output.
+# Input:
+# - local_gnulib_dir from --local-dir
+# - modules list of modules, including dependencies
+# - libname library name
+# - auxdir directory relative to destdir where to place build aux files
+# - makefile_name from --makefile-name
+# - libtool true if libtool will be used, false or blank otherwise
+# - macro_prefix prefix of gl_LIBOBJS macros to use
+# - actioncmd (optional) command that will reproduce this invocation
+# - for_test true if creating a package for testing, false otherwise
+# Output:
+# - uses_subdirs nonempty if object files in subdirs exist
+func_emit_lib_Makefile_am ()
+{
+ # When creating an includable Makefile.am snippet, augment variables with
+ # += instead of assigning them.
+ if test -n "$makefile_name"; then
+ assign='+='
+ else
+ assign='='
+ fi
+ if test "$libtool" = true; then
+ libext=la
+ perhapsLT=LT
+ sed_eliminate_LDFLAGS=
+ else
+ libext=a
+ perhapsLT=
+ sed_eliminate_LDFLAGS='/^lib_LDFLAGS[ ]*+=/d'
+ fi
+ if $for_test; then
+ # When creating a package for testing: Attempt to provoke failures,
+ # especially link errors, already during "make" rather than during
+ # "make check", because "make check" is not possible in a cross-compiling
+ # situation. Turn check_PROGRAMS into noinst_PROGRAMS.
+ sed_transform_check_PROGRAMS='s,check_PROGRAMS,noinst_PROGRAMS,g'
+ else
+ sed_transform_check_PROGRAMS=
+ fi
+ echo "## DO NOT EDIT! GENERATED AUTOMATICALLY!"
+ echo "## Process this file with automake to produce Makefile.in."
+ func_emit_copyright_notice
+ if test -n "$actioncmd"; then
+ echo "# Reproduce by: $actioncmd"
+ fi
+ echo
+ uses_subdirs=
+ {
+ for module in $modules; do
+ func_verify_nontests_module
+ if test -n "$module"; then
+ {
+ func_get_automake_snippet "$module" |
+ sed -e 's,lib_LIBRARIES,lib%_LIBRARIES,g' \
+ -e 's,lib_LTLIBRARIES,lib%_LTLIBRARIES,g' |
+ sed -e "$sed_eliminate_LDFLAGS" |
+ sed -e 's,lib_\([A-Z][A-Z]*\),'"${libname}_${libext}"'_\1,g' |
+ sed -e 's,lib%_LIBRARIES,lib_LIBRARIES,g' \
+ -e 's,lib%_LTLIBRARIES,lib_LTLIBRARIES,g' |
+ sed -e "$sed_transform_check_PROGRAMS"
+ if test "$module" = 'alloca'; then
+ echo "${libname}_${libext}_LIBADD += @${perhapsLT}ALLOCA@"
+ echo "${libname}_${libext}_DEPENDENCIES += @${perhapsLT}ALLOCA@"
+ fi
+ } > amsnippet.tmp
+ # Skip the contents if its entirely empty.
+ if grep '[^ ]' amsnippet.tmp > /dev/null ; then
+ echo "## begin gnulib module $module"
+ echo
+ cat amsnippet.tmp
+ echo "## end gnulib module $module"
+ echo
+ fi
+ rm -f amsnippet.tmp
+ # Test whether there are some source files in subdirectories.
+ for f in `func_get_filelist "$module"`; do
+ case $f in
+ lib/*/*.c) uses_subdirs=yes ;;
+ esac
+ done
+ fi
+ done
+ } > allsnippets.tmp
+ if test -z "$makefile_name"; then
+ # If there are source files in subdirectories, prevent collision of the
+ # object files (example: hash.c and libxml/hash.c).
+ subdir_options=
+ if test -n "$uses_subdirs"; then
+ subdir_options=' subdir-objects'
+ fi
+ echo "AUTOMAKE_OPTIONS = 1.5 gnits${subdir_options}"
+ fi
+ echo
+ if test -z "$makefile_name"; then
+ echo "noinst_HEADERS ="
+ echo "noinst_LIBRARIES ="
+ echo "noinst_LTLIBRARIES ="
+ # Automake versions < 1.9b create an empty pkgdatadir at installation time
+ # if you specify pkgdata_DATA to empty. This is a workaround.
+ if grep '^pkgdata_DATA *+=' allsnippets.tmp > /dev/null; then
+ echo "pkgdata_DATA ="
+ fi
+ echo "EXTRA_DIST ="
+ echo "BUILT_SOURCES ="
+ echo "SUFFIXES ="
+ fi
+ echo "MOSTLYCLEANFILES $assign core *.stackdump"
+ if test -z "$makefile_name"; then
+ echo "MOSTLYCLEANDIRS ="
+ echo "CLEANFILES ="
+ echo "DISTCLEANFILES ="
+ echo "MAINTAINERCLEANFILES ="
+ echo
+ echo "AM_CPPFLAGS ="
+ fi
+ echo
+ if LC_ALL=C grep "^[a-zA-Z0-9_]*_${perhapsLT}LIBRARIES *= *$libname\\.$libext\$" allsnippets.tmp > /dev/null; then
+ # One of the snippets already specifies an installation location for the
+ # library. Don't confuse automake by saying it should not be installed.
+ :
+ else
+ # By default, the generated library should not be installed.
+ echo "noinst_${perhapsLT}LIBRARIES += $libname.$libext"
+ fi
+ echo
+ echo "${libname}_${libext}_SOURCES ="
+ # Here we use $(LIBOBJS), not @LIBOBJS@. The value is the same. However,
+ # automake during its analyses looks for $(LIBOBJS), not for @LIBOBJS@.
+ echo "${libname}_${libext}_LIBADD = \$(${macro_prefix}_${perhapsLT}LIBOBJS)"
+ echo "${libname}_${libext}_DEPENDENCIES = \$(${macro_prefix}_${perhapsLT}LIBOBJS)"
+ echo "EXTRA_${libname}_${libext}_SOURCES ="
+ if test "$libtool" = true; then
+ echo "${libname}_${libext}_LDFLAGS = \$(AM_LDFLAGS)"
+ fi
+ echo
+ cat allsnippets.tmp \
+ | sed -e 's|\$(top_srcdir)/build-aux/|$(top_srcdir)/'"$auxdir"'/|g'
+ echo
+ echo "mostlyclean-local: mostlyclean-generic"
+ echo " @for dir in '' \$(MOSTLYCLEANDIRS); do \\"
+ echo " if test -n \"\$\$dir\" && test -d \$\$dir; then \\"
+ echo " echo \"rmdir \$\$dir\"; rmdir \$\$dir; \\"
+ echo " fi; \\"
+ echo " done"
+ rm -f allsnippets.tmp
+}
+
+# func_emit_tests_Makefile_am
+# emits the contents of tests makefile to standard output.
+# Input:
+# - local_gnulib_dir from --local-dir
+# - modules list of modules, including dependencies
+# - libname library name
+# - makefile_name from --makefile-name
+# - libtool true if libtool will be used, false or blank otherwise
+# - sourcebase relative directory containing lib source code
+# - m4base relative directory containing autoconf macros
+# - testsbase relative directory containing unit test code
+# - for_test true if creating a package for testing, false otherwise
+func_emit_tests_Makefile_am ()
+{
+ if test "$libtool" = true; then
+ libext=la
+ else
+ libext=a
+ fi
+ if test "$libtool" = true; then
+ libext=la
+ sed_eliminate_LDFLAGS=
+ else
+ libext=a
+ sed_eliminate_LDFLAGS='/^lib_LDFLAGS[ ]*+=/d'
+ fi
+ if $for_test; then
+ # When creating a package for testing: Attempt to provoke failures,
+ # especially link errors, already during "make" rather than during
+ # "make check", because "make check" is not possible in a cross-compiling
+ # situation. Turn check_PROGRAMS into noinst_PROGRAMS.
+ sed_transform_check_PROGRAMS='s,check_PROGRAMS,noinst_PROGRAMS,g'
+ else
+ sed_transform_check_PROGRAMS=
+ fi
+ testsbase_inverse=`echo "$testsbase" | sed -e 's,/$,,' | sed -e 's,[^/][^/]*,..,g'`
+ echo "## DO NOT EDIT! GENERATED AUTOMATICALLY!"
+ echo "## Process this file with automake to produce Makefile.in."
+ func_emit_copyright_notice
+ echo
+ # Generate dependencies here, since it eases the debugging of test failures.
+ echo "AUTOMAKE_OPTIONS = 1.5 foreign"
+ echo
+ echo "ACLOCAL_AMFLAGS = -I ${testsbase_inverse}/${m4base}"
+ echo
+ (
+ for module in $modules; do
+ func_verify_tests_module
+ if test -n "$module"; then
+ {
+ func_get_automake_snippet "$module" |
+ sed -e 's,lib_LIBRARIES,lib%_LIBRARIES,g' \
+ -e 's,lib_LTLIBRARIES,lib%_LTLIBRARIES,g' |
+ sed -e "$sed_eliminate_LDFLAGS" |
+ sed -e 's,lib_\([A-Z][A-Z]*\),'"${libname}_${libext}"'_\1,g' |
+ sed -e 's,lib%_LIBRARIES,lib_LIBRARIES,g' \
+ -e 's,lib%_LTLIBRARIES,lib_LTLIBRARIES,g' |
+ sed -e "$sed_transform_check_PROGRAMS"
+ } > amsnippet.tmp
+ # Skip the contents if its entirely empty.
+ if grep '[^ ]' amsnippet.tmp > /dev/null ; then
+ echo "## begin gnulib module $module"
+ echo
+ cat amsnippet.tmp
+ echo "## end gnulib module $module"
+ echo
+ fi
+ rm -f amsnippet.tmp
+ fi
+ done
+ ) > allsnippets.tmp
+ # Nothing is being added to SUBDIRS; nevertheless the existence of this
+ # variable is needed to avoid an error from automake:
+ # "AM_GNU_GETTEXT used but SUBDIRS not defined"
+ echo "SUBDIRS ="
+ echo "TESTS ="
+ echo "TESTS_ENVIRONMENT ="
+ echo "noinst_PROGRAMS ="
+ if ! $for_test; then
+ echo "check_PROGRAMS ="
+ fi
+ echo "noinst_HEADERS ="
+ if grep '^pkgdata_DATA *+=' allsnippets.tmp > /dev/null; then
+ echo "pkgdata_DATA ="
+ fi
+ echo "EXTRA_DIST ="
+ echo "BUILT_SOURCES ="
+ echo "SUFFIXES ="
+ echo "MOSTLYCLEANFILES = core *.stackdump"
+ echo "MOSTLYCLEANDIRS ="
+ echo "CLEANFILES ="
+ echo "DISTCLEANFILES ="
+ echo "MAINTAINERCLEANFILES ="
+ echo
+ echo "AM_CPPFLAGS = \\"
+ echo " -I. -I\$(srcdir) \\"
+ echo " -I${testsbase_inverse} -I\$(srcdir)/${testsbase_inverse} \\"
+ echo " -I${testsbase_inverse}/${sourcebase-lib} -I\$(srcdir)/${testsbase_inverse}/${sourcebase-lib}"
+ echo
+ echo "LDADD = ${testsbase_inverse}/${sourcebase-lib}/${libname}.${libext}"
+ echo
+ cat allsnippets.tmp
+ echo "# Clean up after Solaris cc."
+ echo "clean-local:"
+ echo " rm -rf SunWS_cache"
+ echo
+ echo "mostlyclean-local: mostlyclean-generic"
+ echo " @for dir in '' \$(MOSTLYCLEANDIRS); do \\"
+ echo " if test -n \"\$\$dir\" && test -d \$\$dir; then \\"
+ echo " echo \"rmdir \$\$dir\"; rmdir \$\$dir; \\"
+ echo " fi; \\"
+ echo " done"
+ rm -f allsnippets.tmp
+}
+
+# func_emit_initmacro_start
+# emits the first few statements of the gl_INIT macro to standard output.
+# - macro_prefix prefix of gl_EARLY, gl_INIT macros to use
+func_emit_initmacro_start ()
+{
+ # Overriding AC_LIBOBJ and AC_REPLACE_FUNCS has the effect of storing
+ # platform-dependent object files in ${macro_prefix}_LIBOBJS instead of
+ # LIBOBJS. The purpose is to allow several gnulib instantiations under
+ # a single configure.ac file. (AC_CONFIG_LIBOBJ_DIR does not allow this
+ # flexibility.)
+ # Furthermore it avoids an automake error like this when a Makefile.am
+ # that uses pieces of gnulib also uses $(LIBOBJ):
+ # automatically discovered file `error.c' should not be explicitly mentioned
+ echo " m4_pushdef([AC_LIBOBJ], m4_defn([${macro_prefix}_LIBOBJ]))"
+ echo " m4_pushdef([AC_REPLACE_FUNCS], m4_defn([${macro_prefix}_REPLACE_FUNCS]))"
+ # Overriding AC_LIBSOURCES has the same purpose of avoiding the automake
+ # error when a Makefile.am that uses pieces of gnulib also uses $(LIBOBJ):
+ # automatically discovered file `error.c' should not be explicitly mentioned
+ # We let automake know about the files to be distributed through the
+ # EXTRA_lib_SOURCES variable.
+ echo " m4_pushdef([AC_LIBSOURCES], m4_defn([${macro_prefix}_LIBSOURCES]))"
+}
+
+# func_emit_initmacro_end
+# emits the last few statements of the gl_INIT macro to standard output.
+# - macro_prefix prefix of gl_EARLY, gl_INIT macros to use
+func_emit_initmacro_end ()
+{
+ echo " m4_popdef([AC_LIBSOURCES])"
+ echo " m4_popdef([AC_REPLACE_FUNCS])"
+ echo " m4_popdef([AC_LIBOBJ])"
+ echo " AC_CONFIG_COMMANDS_PRE(["
+ echo " ${macro_prefix}_libobjs="
+ echo " ${macro_prefix}_ltlibobjs="
+ echo " if test -n \"\$${macro_prefix}_LIBOBJS\"; then"
+ echo " # Remove the extension."
+ echo " sed_drop_objext='s/\\.o\$//;s/\\.obj\$//'"
+ echo " for i in \`for i in \$${macro_prefix}_LIBOBJS; do echo \"\$i\"; done | sed \"\$sed_drop_objext\" | sort | uniq\`; do"
+ echo " ${macro_prefix}_libobjs=\"\$${macro_prefix}_libobjs \$i.\$ac_objext\""
+ echo " ${macro_prefix}_ltlibobjs=\"\$${macro_prefix}_ltlibobjs \$i.lo\""
+ echo " done"
+ echo " fi"
+ echo " AC_SUBST([${macro_prefix}_LIBOBJS], [\$${macro_prefix}_libobjs])"
+ echo " AC_SUBST([${macro_prefix}_LTLIBOBJS], [\$${macro_prefix}_ltlibobjs])"
+ echo " ])"
+}
+
+# func_emit_initmacro_done
+# emits a few statements after the gl_INIT macro to standard output.
+# - macro_prefix prefix of gl_EARLY, gl_INIT macros to use
+func_emit_initmacro_done ()
+{
+ echo
+ echo "# Like AC_LIBOBJ, except that the module name goes"
+ echo "# into ${macro_prefix}_LIBOBJS instead of into LIBOBJS."
+ echo "AC_DEFUN([${macro_prefix}_LIBOBJ],"
+ echo " [${macro_prefix}_LIBOBJS=\"\$${macro_prefix}_LIBOBJS \$1.\$ac_objext\"])"
+ echo
+ echo "# Like AC_REPLACE_FUNCS, except that the module name goes"
+ echo "# into ${macro_prefix}_LIBOBJS instead of into LIBOBJS."
+ echo "AC_DEFUN([${macro_prefix}_REPLACE_FUNCS],"
+ echo " [AC_CHECK_FUNCS([\$1], , [${macro_prefix}_LIBOBJ(\$ac_func)])])"
+ echo
+ echo "# Like AC_LIBSOURCES, except that it does nothing."
+ echo "# We rely on EXTRA_lib..._SOURCES instead."
+ echo "AC_DEFUN([${macro_prefix}_LIBSOURCES],"
+ echo " [])"
+}
+
+# func_import modules
+# Uses also the variables
+# - destdir target directory
+# - local_gnulib_dir from --local-dir
+# - libname library name
+# - sourcebase directory relative to destdir where to place source code
+# - m4base directory relative to destdir where to place *.m4 macros
+# - docbase directory relative to destdir where to place doc files
+# - testsbase directory relative to destdir where to place unit test code
+# - auxdir directory relative to destdir where to place build aux files
+# - inctests true if --with-tests was given, blank otherwise
+# - avoidlist list of modules to avoid, from --avoid
+# - lgpl true if library's license shall be LGPL, blank otherwise
+# - makefile_name from --makefile-name
+# - libtool true if --libtool was given, false if --no-libtool was
+# given, blank otherwise
+# - guessed_libtool true if the configure.ac file uses libtool, false otherwise
+# - macro_prefix prefix of gl_EARLY, gl_INIT macros to use
+# - autoconf_minversion minimum supported autoconf version
+# - doit : if actions shall be executed, false if only to be printed
+# - symbolic true if files should be symlinked, copied otherwise
+# - lsymbolic true if files from local_gnulib_dir should be symlinked,
+# copied otherwise
+func_import ()
+{
+ # Get the cached settings.
+ cached_local_gnulib_dir=
+ cached_specified_modules=
+ cached_avoidlist=
+ cached_sourcebase=
+ cached_m4base=
+ cached_docbase=
+ cached_testsbase=
+ cached_libname=
+ cached_lgpl=
+ cached_makefile_name=
+ cached_libtool=
+ cached_macro_prefix=
+ cached_files=
+ if test -f "$destdir"/$m4base/gnulib-cache.m4; then
+ cached_libtool=false
+ my_sed_traces='
+ s,#.*$,,
+ s,^dnl .*$,,
+ s, dnl .*$,,
+ /gl_LOCAL_DIR(/ {
+ s,^.*gl_LOCAL_DIR([[ ]*\([^])]*\).*$,cached_local_gnulib_dir="\1",p
+ }
+ /gl_MODULES(/ {
+ s,^.*gl_MODULES([[ ]*\([^])]*\).*$,cached_specified_modules="\1",p
+ }
+ /gl_AVOID(/ {
+ s,^.*gl_AVOID([[ ]*\([^])]*\).*$,cached_avoidlist="\1",p
+ }
+ /gl_SOURCE_BASE(/ {
+ s,^.*gl_SOURCE_BASE([[ ]*\([^])]*\).*$,cached_sourcebase="\1",p
+ }
+ /gl_M4_BASE(/ {
+ s,^.*gl_M4_BASE([[ ]*\([^])]*\).*$,cached_m4base="\1",p
+ }
+ /gl_DOC_BASE(/ {
+ s,^.*gl_DOC_BASE([[ ]*\([^])]*\).*$,cached_docbase="\1",p
+ }
+ /gl_TESTS_BASE(/ {
+ s,^.*gl_TESTS_BASE([[ ]*\([^])]*\).*$,cached_testsbase="\1",p
+ }
+ /gl_LIB(/ {
+ s,^.*gl_LIB([[ ]*\([^])]*\).*$,cached_libname="\1",p
+ }
+ /gl_LGPL/ {
+ s,^.*$,cached_lgpl=true,p
+ }
+ /gl_MAKEFILE_NAME(/ {
+ s,^.*gl_MAKEFILE_NAME([[ ]*\([^])]*\).*$,cached_makefile_name="\1",p
+ }
+ /gl_LIBTOOL/ {
+ s,^.*$,cached_libtool=true,p
+ }
+ /gl_MACRO_PREFIX(/ {
+ s,^.*gl_MACRO_PREFIX([[ ]*\([^])]*\).*$,cached_macro_prefix="\1",p
+ }'
+ eval `sed -n -e "$my_sed_traces" < "$destdir"/$m4base/gnulib-cache.m4`
+ if test -f "$destdir"/$m4base/gnulib-comp.m4; then
+ my_sed_traces='
+ s,#.*$,,
+ s,^dnl .*$,,
+ s, dnl .*$,,
+ /AC_DEFUN(\['"${cached_macro_prefix}"'_FILE_LIST\], \[/ {
+ s,^.*$,cached_files=",p
+ n
+ ta
+ :a
+ s,^\]).*$,",
+ tb
+ p
+ n
+ ba
+ :b
+ p
+ }'
+ eval `sed -n -e "$my_sed_traces" < "$destdir"/$m4base/gnulib-comp.m4`
+ fi
+ fi
+
+ # Merge the cached settings with the specified ones.
+ # The m4base must be the same as expected from the pathname.
+ if test -n "$cached_m4base" && test "$cached_m4base" != "$m4base"; then
+ func_fatal_error "$m4base/gnulib-cache.m4 is expected to contain gl_M4_BASE([$m4base])"
+ fi
+ # The local_gnulib_dir defaults to the cached one. Recall that the cached one
+ # is relative to $destdir, whereas the one we use is relative to . or absolute.
+ if test -z "$local_gnulib_dir"; then
+ if test -n "$cached_local_gnulib_dir"; then
+ case "$destdir" in
+ /*)
+ local_gnulib_dir="$destdir/$cached_local_gnulib_dir" ;;
+ *)
+ case "$cached_local_gnulib_dir" in
+ /*)
+ local_gnulib_dir="$destdir/$cached_local_gnulib_dir" ;;
+ *)
+ func_relconcat "$destdir" "$cached_local_gnulib_dir"
+ local_gnulib_dir="$relconcat" ;;
+ esac ;;
+ esac
+ fi
+ fi
+ # Append the cached and the specified module names. So that
+ # "gnulib-tool --import foo" means to add the module foo.
+ specified_modules="$cached_specified_modules $1"
+ # Append the cached and the specified avoidlist. This is probably better
+ # than dropping the cached one when --avoid is specified at least once.
+ avoidlist=`echo $cached_avoidlist $avoidlist`
+ # The sourcebase defaults to the cached one.
+ if test -z "$sourcebase"; then
+ sourcebase="$cached_sourcebase"
+ if test -z "$sourcebase"; then
+ func_fatal_error "missing --source-base option"
+ fi
+ fi
+ # The docbase defaults to the cached one.
+ if test -z "$docbase"; then
+ docbase="$cached_docbase"
+ if test -z "$docbase"; then
+ func_fatal_error "missing --doc-base option. --doc-base has been introduced on 2006-07-11; if your last invocation of 'gnulib-tool --import' is before that date, you need to run 'gnulib-tool --import' once, with a --doc-base option."
+ fi
+ fi
+ # The testsbase defaults to the cached one.
+ if test -z "$testsbase"; then
+ testsbase="$cached_testsbase"
+ if test -z "$testsbase"; then
+ func_fatal_error "missing --tests-base option"
+ fi
+ fi
+ # The libname defaults to the cached one.
+ if test -z "$supplied_libname"; then
+ libname="$cached_libname"
+ if test -z "$libname"; then
+ func_fatal_error "missing --lib option"
+ fi
+ fi
+ # Require LGPL if specified either way.
+ if test -z "$lgpl"; then
+ lgpl="$cached_lgpl"
+ fi
+ # The makefile_name defaults to the cached one.
+ if test -z "$makefile_name"; then
+ makefile_name="$cached_makefile_name"
+ fi
+ # Use libtool if specified either way, or if guessed.
+ if test -z "$libtool"; then
+ if test -n "$cached_m4base"; then
+ libtool="$cached_libtool"
+ else
+ libtool="$guessed_libtool"
+ fi
+ fi
+ # The macro_prefix defaults to the cached one.
+ if test -z "$macro_prefix"; then
+ macro_prefix="$cached_macro_prefix"
+ if test -z "$macro_prefix"; then
+ func_fatal_error "missing --macro-prefix option"
+ fi
+ fi
+
+ # Canonicalize the list of specified modules.
+ specified_modules=`for m in $specified_modules; do echo $m; done | LC_ALL=C sort -u`
+
+ # Determine final module list.
+ modules="$specified_modules"
+ func_modules_transitive_closure
+ echo "Module list with included dependencies:"
+ echo "$modules" | sed -e 's/^/ /'
+
+ # Add the dummy module if needed.
+ func_modules_add_dummy
+
+ # If --lgpl, verify that the licenses of modules are compatible.
+ if test -n "$lgpl"; then
+ for module in $modules; do
+ license=`func_get_license $module`
+ case $license in
+ LGPL | 'GPLed build tool') ;;
+ 'public domain' | 'unlimited' | 'unmodifiable license text') ;;
+ *) func_fatal_error "incompatible license on module $module: $license" ;;
+ esac
+ done
+ fi
+
+ # Determine script to apply to imported library files.
+ sed_transform_lib_file=
+ for module in $modules; do
+ if test $module = config-h; then
+ # Assume config.h exists, and that -DHAVE_CONFIG_H is omitted.
+ sed_transform_lib_file=$sed_transform_lib_file'
+ s/^#ifdef[ ]*HAVE_CONFIG_H[ ]*$/#if 1/
+ '
+ break
+ fi
+ done
+ if test -n "$lgpl"; then
+ # Update license.
+ sed_transform_lib_file=$sed_transform_lib_file'
+ s/GNU General/GNU Lesser General/g
+ s/version 2\([ ,]\)/version 2.1\1/g
+ '
+ fi
+
+ # Determine final file list.
+ func_modules_to_filelist