Improve general GNU hints, needed for GNU/Hurd.
authorPino Toscano <pino@debian.org>
Wed, 10 Aug 2011 05:11:33 +0000 (08:11 +0300)
committerRicardo Signes <rjbs@cpan.org>
Thu, 9 Aug 2012 20:04:10 +0000 (16:04 -0400)
Bug-Debian: http://bugs.debian.org/636609

With minor modifications to add Pino to AUTHORS.

MANIFEST
ext/ODBM_File/hints/gnu.pl [new file with mode: 0644]
hints/gnu.sh

index ed67d45..2504728 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -3474,6 +3474,7 @@ ext/ODBM_File/hints/cygwin.pl     Hint for ODBM_File for named architecture
 ext/ODBM_File/hints/dec_osf.pl Hint for ODBM_File for named architecture
 ext/ODBM_File/hints/gnukfreebsd.pl     Hint for NDBM_File for named architecture
 ext/ODBM_File/hints/gnuknetbsd.pl      Hint for NDBM_File for named architecture
+ext/ODBM_File/hints/gnu.pl     Hint for ODBM_File for named architecture
 ext/ODBM_File/hints/hpux.pl    Hint for ODBM_File for named architecture
 ext/ODBM_File/hints/linux.pl   Hint for NDBM_File for named architecture
 ext/ODBM_File/hints/sco.pl     Hint for ODBM_File for named architecture
diff --git a/ext/ODBM_File/hints/gnu.pl b/ext/ODBM_File/hints/gnu.pl
new file mode 100644 (file)
index 0000000..db63567
--- /dev/null
@@ -0,0 +1 @@
+do './hints/linux.pl' or die $@;
index c1ba2db..f075642 100644 (file)
@@ -8,10 +8,22 @@ set `echo X "$libswanted "| sed -e 's/ nsl / /' -e 's/ c / pthread /'`
 shift
 libswanted="$*"
 
+# Debian 4.0 puts ndbm in the -lgdbm_compat library.
+libswanted="$libswanted gdbm_compat"
+
 case "$optimize" in
 '') optimize='-O2' ;;
 esac
 
+case "$plibpth" in
+'') plibpth=`gcc -print-search-dirs | grep libraries |
+        cut -f2- -d= | tr ':' $trnl | grep -v 'gcc' | sed -e 's:/$::'`
+    set X $plibpth # Collapse all entries on one line
+    shift
+    plibpth="$*"
+    ;;
+esac
+
 # Flags needed to produce shared libraries.
 lddlflags='-shared'