# $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $
#
-# Generated on Sat May 17 15:55:21 CEST 2008 [metaconfig 3.5 PL0]
+# Generated on Sat May 17 16:03:30 CEST 2008 [metaconfig 3.5 PL0]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
i_math=''
i_memory=''
i_mntent=''
+d_ndbm=''
+i_gdbm_ndbm=''
+i_gdbmndbm=''
i_ndbm=''
i_netdb=''
i_neterrno=''
eval $inhdr
: see if ndbm.h is available
-set ndbm.h t_ndbm
+set ndbm.h i_ndbm
+eval $inhdr
+: Compatibility location for RedHat 7.1
+set gdbm/ndbm.h i_gdbmndbm
+eval $inhdr
+: Compatibility location for Debian 4.0
+set gdbm-ndbm.h i_gdbm_ndbm
eval $inhdr
-case "$t_ndbm" in
-$undef)
- # Some Linux distributions such as RedHat 7.1 put the
- # ndbm.h header in /usr/include/gdbm/ndbm.h.
- if $test -f /usr/include/gdbm/ndbm.h; then
- echo '<gdbm/ndbm.h> found.'
- ccflags="$ccflags -I/usr/include/gdbm"
- cppflags="$cppflags -I/usr/include/gdbm"
- t_ndbm=$define
- fi
- ;;
-esac
-
-case "$t_ndbm" in
-$define)
+if $test "$i_ndbm" = "$define" -o "$i_gdbmndbm" = "$define" -o "$i_gdbm_ndbm" = "$define"; then
: see if dbm_open exists
set dbm_open d_dbm_open
eval $inlibc
case "$d_dbm_open" in
$undef)
- t_ndbm="$undef"
+ i_ndbm="$undef"
+ i_gdbmndbm="$undef"
+ i_gdbm_ndbm="$undef"
echo "We won't be including <ndbm.h>"
+ val="$undef"
;;
+ *) val="$define"
+ ;;
esac
- ;;
-esac
-val="$t_ndbm"
-set i_ndbm
+fi
+set d_ndbm
eval $setvar
: see if net/errno.h is available
;;
*) case "$usedl" in
$define|true|[yY]*)
- set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
+ set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -lgdbm_compat @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'`
shift
perllibs="$*"
;;
d_msync='$d_msync'
d_munmap='$d_munmap'
d_mymalloc='$d_mymalloc'
+d_ndbm='$d_ndbm'
d_nice='$d_nice'
d_nl_langinfo='$d_nl_langinfo'
d_nv_preserves_uv='$d_nv_preserves_uv'
i_fp='$i_fp'
i_fp_class='$i_fp_class'
i_gdbm='$i_gdbm'
+i_gdbm_ndbm='$i_gdbm_ndbm'
+i_gdbmndbm='$i_gdbmndbm'
i_grp='$i_grp'
i_ieeefp='$i_ieeefp'
i_inttypes='$i_inttypes'
of the source want to take special action if MYMALLOC is used.
This may include different sorts of profiling or error detection.
+d_ndbm (i_ndbm.U):
+ This variable conditionally defines the HAS_NDBM symbol, which
+ indicates that both the ndbm.h include file and an appropriate ndbm
+ library exist. Consult the different i_*ndbm variables
+ to find out the actual include location. Sometimes, a system has the
+ header file but not the library. This variable will only be set if
+ the system has both.
+
d_nice (d_nice.U):
This variable conditionally defines the HAS_NICE symbol, which
indicates to the C program that the nice() routine is available.
indicates to the C program that <gdbm.h> exists and should
be included.
+i_gdbm_ndbm (i_ndbm.U):
+ This variable conditionally defines the I_GDBM_NDBM symbol, which
+ indicates to the C program that <gdbm-ndbm.h> exists and should
+ be included. This is the location of the ndbm.h compatibility file
+ in Debian 4.0.
+
+i_gdbmndbm (i_ndbm.U):
+ This variable conditionally defines the I_GDBMNDBM symbol, which
+ indicates to the C program that <gdbm/ndbm.h> exists and should
+ be included. This was the location of the ndbm.h compatibility file
+ in RedHat 7.1.
+
i_grp (i_grp.U):
This variable conditionally defines the I_GRP symbol, and indicates
whether a C program should include <grp.h>.
*/
#$i_locale I_LOCALE /**/
-/* I_MALLOCMALLOC:
- * This symbol, if defined, indicates to the C program that it should
- * include <malloc/malloc.h>.
- */
-#$i_mallocmalloc I_MALLOCMALLOC /**/
-
/* I_MATH:
* This symbol, if defined, indicates to the C program that it should
* include <math.h>.
*/
#$i_libutil I_LIBUTIL /**/
+/* I_MALLOCMALLOC:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <malloc/malloc.h>.
+ */
+#$i_mallocmalloc I_MALLOCMALLOC /**/
+
/* I_MNTENT:
* This symbol, if defined, indicates that <mntent.h> exists and
* should be included.
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
+#if defined(I_GDBM_NDBM)
+# include <gdbm-ndbm.h> /* Debian compatibility version */
+#elif defined(I_GDBMNDBM)
+# include <gdbm/ndbm.h> /* RedHat compatibility version */
+#elif defined(I_NDBM)
#include <ndbm.h>
+#endif
typedef struct {
DBM * dbp ;
shift
libswanted="$*"
+# Debian 4.0 puts ndbm in the -lgdbm_compat library.
+libswanted="$libswanted gdbm_compat"
+
# If you have glibc, then report the version for ./myconfig bug reporting.
# (Configure doesn't need to know the specific version since it just uses
# gcc to load the library for all tests.)