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:
@@ -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
|
||||
|
||||
|
||||
22
configure.in
22
configure.in
@@ -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
|
||||
|
||||
@@ -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) \
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user