From 7ea241b412db100f7cc218957cd64f5edd0ce1e8 Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 28 Mar 2000 21:37:36 +0000 Subject: [PATCH] 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. --- acconfig.h | 3 +++ configure.in | 22 ++++++++++++++++++++++ simgear/Makefile.am | 7 +++++++ simgear/config.h | 2 +- 4 files changed, 33 insertions(+), 1 deletion(-) diff --git a/acconfig.h b/acconfig.h index a5fe5539..6a80f899 100644 --- a/acconfig.h +++ b/acconfig.h @@ -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 diff --git a/configure.in b/configure.in index 84b6bf95..60efa870 100644 --- a/configure.in +++ b/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 diff --git a/simgear/Makefile.am b/simgear/Makefile.am index 4bfc91ff..1f8e677d 100644 --- a/simgear/Makefile.am +++ b/simgear/Makefile.am @@ -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) \ diff --git a/simgear/config.h b/simgear/config.h index 754b6559..8598ed35 100644 --- a/simgear/config.h +++ b/simgear/config.h @@ -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 -- 2.39.5