Create ltconfig.x, while we are emitting the libtool script.
diff --git a/ltconfig.in b/ltconfig.in index d97e906..fa30691 100755 --- a/ltconfig.in +++ b/ltconfig.in
@@ -2489,6 +2489,33 @@ if test -z "$tagname"; then echo '### END LIBTOOL CONFIG' >> "$ofile" + ( cat <<EOF +/* + * DO NOT EDIT THIS FILE - it was generated by + * version $LTCONFIG_VERSION of the $PACKAGE configurator. + * + * The shell script source for creating this is in ltconfig.in. + * It gets incorporated into the \`configure' script. + */ +#ifndef LIBTOOL_CONFIG_TEXT +#define LIBTOOL_CONFIG_TEXT 1 + +static const char z_ltconfig[] = "\\n\\ +EOF + sed -n '/### BEGIN LIBTOOL CONFIG/,/### END LIBTOOL CONFIG/p' "$ofile" | \ + egrep -v '^[ ]*($|#)' | \ + sed 's/\\/\\\\/g;s/"/\\"/g;s/$/\\n\\/;$s/n\\$/n";/' + cat <<EOF + +const char* pz_ltconfig = z_ltconfig; +const char* pz_shell = "$SHELL"; +const char* pz_vers = "$VERSION"; +const char* pz_package = "$PACKAGE"; +const char* pz_timestamp = "$TIMESTAMP"; + +#endif /* LIBTOOL_CONFIG_TEXT */ +EOF + ) > ltconfig.x else echo "### END LIBTOOL TAG CONFIG: $tagname" >> "$ofile" fi