summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/ODBM_File/hints/linux.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/ODBM_File/hints/linux.pl b/ext/ODBM_File/hints/linux.pl
index 9271b45f71..43b59df31a 100644
--- a/ext/ODBM_File/hints/linux.pl
+++ b/ext/ODBM_File/hints/linux.pl
@@ -1,2 +1,8 @@
# uses GDBM dbm compatibility feature - at least on SuSE 8.0
-$self->{LIBS} = ['-lgdbm -lgdbm_compat'];
+$self->{LIBS} = ['-lgdbm'];
+
+# Debian/Ubuntu have /usr/lib/libgdbm_compat.so.3* but not this file,
+# so linking may fail
+if (-f '/usr/lib/libgdbm_compat.so') {
+ $self->{LIBS}->[0] .= ' -lgdbm_compat';
+}