summaryrefslogtreecommitdiff
path: root/mcon/U/i_gdbm.U
diff options
context:
space:
mode:
authorrmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d>2010-11-27 11:55:39 +0000
committerrmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d>2010-11-27 11:55:39 +0000
commit13158f86e3904284dce3dad36b64f07414459551 (patch)
tree12cc7b8d1b808c8c3505bb44cf067bd9ab98b1e6 /mcon/U/i_gdbm.U
parent194d1db97053d853d5f81c362c461d71c05ea80e (diff)
Applied mega patch from Christian Biere to greatly improve feature detection
and make a huge step towards better support for cross-compiling. git-svn-id: svn://svn.code.sf.net/p/dist/code/trunk/dist@34 2592e710-e01b-42a5-8df0-11608a6cc53d
Diffstat (limited to 'mcon/U/i_gdbm.U')
-rw-r--r--mcon/U/i_gdbm.U33
1 files changed, 13 insertions, 20 deletions
diff --git a/mcon/U/i_gdbm.U b/mcon/U/i_gdbm.U
index c9cdbf0..81ceeba 100644
--- a/mcon/U/i_gdbm.U
+++ b/mcon/U/i_gdbm.U
@@ -15,7 +15,7 @@
?RCS: Revision 3.0 1993/08/18 12:08:19 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:i_gdbm: Inhdr Inlibc Setvar
+?MAKE:i_gdbm: Trylink cat
?MAKE: -pick add $@ %<
?S:i_gdbm (d_gdbm):
?S: This variable conditionally defines the I_GDBM symbol, which
@@ -28,26 +28,19 @@
?C:.
?H:#$i_gdbm I_GDBM /**/
?H:.
-?T:t_gdbm d_gdbm_open
?LINT:set i_gdbm
: see if gdbm.h is available
-?X: t_gdbm is a tentative check. We might just have the .h, not the lib -- ADO
-set gdbm.h t_gdbm
-eval $inhdr
-case "$t_gdbm" in
-$define)
- : see if gdbm_open exists
- set gdbm_open d_gdbm_open
- eval $inlibc
- case "$d_gdbm_open" in
- $undef)
- t_gdbm="$undef"
- echo "We won't be including <gdbm.h>"
- ;;
- esac
- ;;
-esac
-val="$t_gdbm"
+$cat >try.c <<EOC
+#include <gdbm.h>
+void fatal_func(void) { return; };
+int main(void)
+{
+ GDBM_FILE ret;
+
+ ret = gdbm_open("name", 1, 2, 3, fatal_func);
+ return ret ? 0 : 1;
+}
+EOC
set i_gdbm
-eval $setvar
+eval $trylink