]> git.draconx.ca Git - dxcommon.git/blobdiff - scripts/fix-ltdl.pl
Import getline helper from cdecl99.
[dxcommon.git] / scripts / fix-ltdl.pl
index 7dd1c8b0ef6e7991b2adb8e8cda86e4c28eb84db..bd026c87f7416acb27668dea91157af36929fd70 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env perl
 #
-# Copyright © 2012 Nick Bowler
+# Copyright © 2012, 2014, 2022 Nick Bowler
 #
 # Fixup a non-recursive libltdl makefile fragment.  While libltdl purports to
 # support inclusion into non-recursive automake builds, it does a few things
@@ -61,9 +61,9 @@ sub handle_libobj {
        die if (!defined $am_dir_prefix);
        print <<EOF;
 ${am_dir_prefix}libobj_la_SOURCES += $distfile
-$ltdl_dir/$base.lo: $ltdl_dir/${am_dir_prefix}libobj_la-$base.lo
+$ltdl_dir/$base.lo: $ltdl_dir/lo-$base.lo
 \t\$(AM_V_at)-rm -f \$@
-\t\$(AM_V_at)(cd \$(\@D) && \$(LN_S) ${am_dir_prefix}libobj_la-\$(\@F) \$(\@F))
+\t\$(AM_V_at)cd \$(\@D) && \$(LN_S) lo-\$(\@F) \$(\@F)
 EOF
 
        return 0;
@@ -98,7 +98,8 @@ while (<STDIN>) {
                print "# Postprocessed by ", basename($0), "\n";
                print <<'EOF';
 # This trick should define ltdl_orderonly to | iff we're using GNU make.
-ltdl_have_orderonly = $(findstring order-only,$(.FEATURES))
+ltdl_make_features = $(.FEATURES)
+ltdl_have_orderonly = $(findstring order-only,${ltdl_make_features})
 ltdl_orderonly = $(ltdl_have_orderonly:order-only=|)
 ltdl_core_headers =
 ltdl_src_headers = $(ltdl_orderonly) $(ltdl_core_headers)
@@ -133,6 +134,7 @@ EXTRA_LTLIBRARIES += $ltdl_dir/libobj.la
 ${am_dir_prefix}libobj_la_SOURCES =
 ${am_dir_prefix}libobj_la_CPPFLAGS = \$(AM_CPPFLAGS) \$(LTDL_CPPFLAGS)
 ${am_dir_prefix}libobj_la_LINK = false
+${am_dir_prefix}libobj_la_SHORTNAME = lo
 EOF
        }