blob: 2fb9793eb2c4bccb842e0ba85b67c7a602eb62f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
diff -urN pam_userdb.orig/Makefile pam_userdb/Makefile
--- Linux-PAM-0.75/modules/pam_userdb/Makefile.orig 2002-11-03 12:09:40.000000000 +0200
+++ Linux-PAM-0.75/modules/pam_userdb/Makefile 2002-11-03 12:23:50.000000000 +0200
@@ -12,7 +12,7 @@
ifeq ($(HAVE_NDBM_H),yes)
WHICH_DB=ndbm
- MODULE_SIMPLE_EXTRALIBS = -lndbm
+ MODULE_SIMPLE_EXTRALIBS = `sh ./dbversion.sh`
else
ifeq ($(HAVE_LIBDB),yes)
WHICH_DB=db
diff -urN pam_userdb.orig/dbversion.sh pam_userdb/dbversion.sh
--- Linux-PAM-0.75/modules/pam_userdb/dbversion.sh.orig 1970-01-01 02:00:00.000000000 +0200
+++ Linux-PAM-0.75/modules/pam_userdb/dbversion.sh 2002-11-03 12:25:35.000000000 +0200
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+# libndbm functionality is included in db3 and db4, so
+# rather use them if found ...
+
+list=`ls /lib/libdb.so.4* /usr/lib/libdb.so.4* 2>/dev/null`
+if [ -n "$list" ]
+then
+ for x in $list
+ do
+ if [ -e $x ]
+ then
+ echo "$x"
+ exit 0
+ fi
+ done
+fi
+
+list=`ls /lib/libdb.so.3* /usr/lib/libdb.so.3* 2>/dev/null`
+if [ -n "$list" ]
+then
+ for x in $list
+ do
+ if [ -e $x ]
+ then
+ echo "$x"
+ exit 0
+ fi
+ done
+fi
+
+echo "-lndbm"
+exit 0
+
|