Added gdbm to SimGear. Many systems will already have gdbm installed so

it is only built if it doesn't already exist on the user's platform.
gdbm is a set of database routines that use extendible hashing and works
similar to the standard UNIX dbm routines.  This guarantees the availability
of gdbm to any application that uses SimGear.
This commit is contained in:
curt
2000-03-28 21:37:36 +00:00
parent 1547d4ee2f
commit 7ea241b412
4 changed files with 33 additions and 1 deletions

View File

@@ -181,6 +181,9 @@
/* Define if you have the wait3 system call. */
#undef HAVE_WAIT3
/* Define if you have gdbm installed system wide. */
#undef HAVE_GDBM
/* Define if you have zlib installed system wide. */
#undef HAVE_ZLIB

View File

@@ -24,6 +24,10 @@ else
fi
dnl Run configure in the gdbm subdir
dnl AC_CONFIG_SUBDIRS( simgear/gdbm )
dnl Specify if we want logging (testing build) or not (release build)
# set logging default value
# with_logging=yes
@@ -196,6 +200,15 @@ if test "x$ac_cv_header_plib_pu_h" != "xyes"; then
exit
fi
dnl Check for system installed gdbm
AC_CHECK_HEADER(gdbm.h)
if test "x$ac_cv_header_gdbm_h" = "xyes"; then
AC_DEFINE( HAVE_GDBM )
else
echo "no gdbm found, configuring and building."
fi
AM_CONDITIONAL(HAVE_GDBM, test "x$ac_cv_header_gdbm_h" = "xyes" )
dnl Check for system installed zlib
AC_CHECK_HEADER(zlib.h)
if test "x$ac_cv_header_zlib_h" = "xyes"; then
@@ -232,6 +245,7 @@ AC_OUTPUT( \
simgear/version.h \
simgear/bucket/Makefile \
simgear/debug/Makefile \
simgear/gdbm/Makefile \
simgear/magvar/Makefile \
simgear/math/Makefile \
simgear/misc/Makefile \
@@ -260,3 +274,11 @@ if test "x$with_efence" != "x"; then
else
echo "Electric fence: no"
fi
if test "x$ac_cv_header_gdbm_h" != "xyes"; then
echo "Building gdbm"
fi
if test "x$ac_cv_header_zlib_h" != "xyes"; then
echo "Building zlib"
fi

View File

@@ -4,6 +4,12 @@ else
SERIAL_DIRS =
endif
if HAVE_GDBM
GDBM_DIRS =
else
GDBM_DIRS = gdbm
endif
if HAVE_ZLIB
ZLIB_DIRS =
else
@@ -20,6 +26,7 @@ include_HEADERS = compiler.h constants.h fg_traits.hxx fg_zlib.h version.h
SUBDIRS = \
bucket \
debug \
$(GDBM_DIRS) \
magvar \
math \
$(METAR_DIRS) \

View File

@@ -49,7 +49,7 @@
#define HAVE_VPRINTF 1
/* Define if you have zlib installed system wide. */
/* #undef HAVE_ZLIB */
#define HAVE_ZLIB 1
/* Define as the return type of signal handlers (int or void). */
#define RETSIGTYPE void