summaryrefslogtreecommitdiff
path: root/mcon/U/i_dbm.U
diff options
context:
space:
mode:
Diffstat (limited to 'mcon/U/i_dbm.U')
-rw-r--r--mcon/U/i_dbm.U60
1 files changed, 39 insertions, 21 deletions
diff --git a/mcon/U/i_dbm.U b/mcon/U/i_dbm.U
index 14c9fca..bdca919 100644
--- a/mcon/U/i_dbm.U
+++ b/mcon/U/i_dbm.U
@@ -1,11 +1,11 @@
-?RCS: $Id: i_dbm.U 1 2006-08-24 12:32:52Z rmanfredi $
+?RCS: $Id: i_dbm.U 175 2014-04-07 07:14:41Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: i_dbm.U,v $
@@ -18,7 +18,7 @@
?RCS: Revision 3.0 1993/08/18 12:08:15 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:i_dbm i_rpcsvcdbm: Inhdr Inlibc Setvar
+?MAKE:i_dbm i_rpcsvcdbm: Inhdr Trylink Setvar cat
?MAKE: -pick add $@ %<
?S:i_dbm (d_odbm):
?S: This variable conditionally defines the I_DBM symbol, which
@@ -49,31 +49,49 @@
?X: some versions of SCO Unix have -ldbm, but are missing dbmclose(). -- ADO
?X: Some System V systems have <rpcsvc/dbm.h> instead of <dbm.h>.
: see if dbmclose exists
-set dbmclose d_dbmclose
-eval $inlibc
+$cat >try.c <<EOC
+#include <dbm.h>
+int main(void)
+{
+ dbmclose();
+ return 0;
+}
+EOC
+set d_dbmclose
+eval $trylink
case "$d_dbmclose" in
$define)
- set dbm.h i_dbm
- eval $inhdr
- case "$i_dbm" in
- $define)
- val="$undef"
- set i_rpcsvcdbm
- eval $setvar
- ;;
- *) set rpcsvc/dbm.h i_rpcsvcdbm
- eval $inhdr
- ;;
- esac
- ;;
-*) echo "We won't be including <dbm.h>"
val="$undef"
+ set i_rpcsvcdbm
+ eval $setvar
+
+ val="$define"
set i_dbm
eval $setvar
- val="$undef"
+ ;;
+*)
+ echo " "
+ echo "Hmm... trying to include <rpcsvc/dbm.h> to get dbmclose()..." >&4
+ $cat >try.c <<EOC
+#include <rpcsvc/dbm.h>
+int main(void)
+{
+ static int ret;
+ ret |= dbmclose();
+ return ret ? 0 : 1;
+}
+EOC
+ set d_dbmclose
+ eval $trylink
+
+ val="$d_dbmclose"
set i_rpcsvcdbm
eval $setvar
+
+ val="$undef"
+ set i_dbm
+ eval $setvar
;;
esac