Ignore:
Timestamp:
2001-04-04T16:42:05+12:00 (23 years ago)
Author:
jrm21
Message:

configure now allows an argument to give a path to non-std location of gdbm library.
Other changes to allow darwin (Mac OS X) support include adding config.* to guess the system type.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/configure.in

    r2214 r2279  
    22AC_INIT(lib/text_t.h)
    33AC_CONFIG_HEADER(config.h)
    4 AC_ARG_PROGRAM
    54
    65PACKAGE=gsdl
     
    3938AC_SUBST(USE_Z3950)
    4039
     40dnl
     41dnl look for libgdbm if not in standard location
     42dnl
     43AC_ARG_WITH(gdbm, [  --with-gdbm=dir         Use local gdbm library and headers], gdbmdir=$withval)
     44
     45
     46
    4147dnl Checks for programs.
    4248LDFLAGS=
     
    5157AC_PROG_AWK
    5258AC_PROG_YACC
     59dnl get $target_cpu, $target_vendor, and $target_os
     60dnl (as well as host_*)
     61AC_CANONICAL_SYSTEM
     62dnl do we actually want this? It adds a prefix based on host, system etc
     63dnl AC_ARG_PROGRAM
    5364AC_PROG_INSTALL
    5465AC_PROG_LN_S
     
    174185dnl Check that the GDBM library is available
    175186dnl
    176 AC_MSG_CHECKING("that the GDBM library is available")
    177 AC_TRY_COMPILE(
    178 [#include <gdbm.h>
     187dnl check libgdbm manually, in case it's not in the standard location.
     188
     189AC_MSG_CHECKING(that the GDBM library is available)
     190if test ! -z $gdbmdir ; then
     191  # look in given directory for header file
     192  if test -e $gdbmdir/include/gdbm.h ; then
     193    GDBM_INCLUDE="-I$gdbmdir/include" ;
     194  elif test -e $gdbmdir/gdbm.h ; then
     195    GDBM_INCLUDE="-I$gdbmdir" ;
     196  fi
     197
     198  # look in given directory for library
     199  if test -e $gdbmdir/libgdbm.a ; then
     200    GDBM_LIBPATH="-L$gdbmdir" ;
     201  elif test -e $gdbmdir/lib/libgdbm.a ; then
     202    GDBM_LIBPATH="-L$gdbmdir/lib" ;
     203  elif test -e $gdbmdir/.libs/libgdbm.a ; then
     204    GDBM_LIBPATH="-L$gdbmdir/.libs" ;
     205  fi
     206
     207  if test ! -z $GDBM_LIBPATH -a ! -z $GDBM_INCLUDE ; then
     208    AC_MSG_RESULT($gdbmdir) ;
     209    AC_DEFINE(HAVE_LIBGDBM , 1)
     210  else
     211    AC_MSG_RESULT(can't find both gdbm.h and libgdbm.a in $gdbmdir);
     212    AC_MSG_CHECKING(   looking for GDBM library in default locations)
     213  fi
     214fi
     215
     216if test -z $GDBM_INCLUDE ; then
     217  # try in system directory
     218  AC_TRY_COMPILE(
     219  [#include <gdbm.h>
    179220],
    180 [],
    181 success=yes,
    182 success=no
    183 )
    184 AC_MSG_RESULT($success)
    185 if test $success = "no"; then
    186 AC_MSG_ERROR("GDBM Library not available - cannot install")
    187 fi
     221  [],
     222  success=yes,
     223  success=no
     224  )
     225  AC_MSG_RESULT($success)
     226  if test $success = "no"; then
     227  AC_MSG_ERROR(GDBM Library not available - cannot install)
     228  fi
     229  GDBM_LIBPATH=
     230  GDBM_INCLUDE=
     231fi
     232
     233AC_SUBST(GDBM_LIBPATH)
     234AC_SUBST(GDBM_INCLUDE)
    188235
    189236dnl
    190237dnl Now check that Perl is actually around, and can be found
    191238dnl
    192 AC_MSG_CHECKING("that Perl 5 is available")
     239AC_MSG_CHECKING(that Perl 5 is available)
    193240success="no"
    194241pl_path="$PATH"
     
    282329
    283330# ---------------------------------------------------------------------------
    284 
     331dnl for Darwin, as our packages don't (yet) correctly guess our system type.
     332ac_configure_args="$ac_configure_args --host=$host --target=$target"
    285333AC_CONFIG_SUBDIRS(packages)
    286334
Note: See TracChangeset for help on using the changeset viewer.