X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=configure.in;h=c18e44314fc068fc0cd3d46aca3d66b78bdb81a7;hb=1cc0116831e49bf70538639a8fc9b08b9524c683;hp=87d1a501af48afed9b21cfc3d98c8ef1cd40b6cc;hpb=579c5c2ee7d0d8aa67af7092e46158187cc27b99;p=idzebra-moved-to-github.git diff --git a/configure.in b/configure.in index 87d1a50..c18e443 100644 --- a/configure.in +++ b/configure.in @@ -1,8 +1,8 @@ -dnl Zebra, Index Data Aps, 1995-2003 -dnl $Id: configure.in,v 1.65 2003-02-20 21:13:37 adam Exp $ +dnl Zebra, Index Data Aps, 1995-2004 +dnl $Id: configure.in,v 1.97 2004-08-30 21:35:27 adam Exp $ dnl -AC_INIT(include/zebraver.h) -AM_INIT_AUTOMAKE(idzebra,1.3.5) +AC_INIT(include/idzebra/version.h) +AM_INIT_AUTOMAKE(idzebra,1.4.0) dnl ------ Substitutions AC_SUBST(TCL_INCLUDE) AC_SUBST(TCL_LIB) @@ -18,8 +18,8 @@ dnl dnl ------ Checking programs AC_PROG_CC AC_PROG_CPP -AC_PROG_INSTALL -AC_PROG_RANLIB +AM_DISABLE_SHARED +AM_PROG_LIBTOOL dnl dnl ----- DOCBOOK DTD AC_SUBST(DTD_DIR) @@ -76,7 +76,6 @@ else yazflag="" fi YAZ_INIT($yazflag) - dnl ------ Look for Tcl dnl See if user has specified location of tclConfig.sh; otherwise dnl see if tclConfig.sh exists in same prefix lcoation as tclsh; otherwise @@ -112,6 +111,7 @@ if test -r ${tclconfig}/tclConfig.sh; then TCL_INCLUDE=-I${TCL_PREFIX}/include TCL_LIB="$TCL_LIB_SPEC $TCL_LIBS" fi + TCL_LIB=`echo $TCL_LIB|sed 's%-L/usr/lib%%g'` SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS SHLIB_LD=$TCL_SHLIB_LD SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX @@ -207,6 +207,9 @@ else fi fi dnl +dnl ------ -lm +AC_CHECK_LIB(m,sqrt) +dnl dnl ------ EXPAT expat=yes AC_ARG_WITH(expat, [ --with-expat[=DIR] EXPAT library in DIR],[expat=$withval]) @@ -247,13 +250,11 @@ if test "$perl" != "no"; then AC_MSG_CHECKING(perl core directory) archdir=`$perlbin -MConfig -e 'print $Config{archlib}'`; perlcore="$archdir/CORE"; - if test "$perlcore"; then + if test -d "$perlcore"; then PERL_BINARY="$perlbin" AC_MSG_RESULT($perlcore) - AC_DEFINE(HAVE_PERL,1) else AC_MSG_RESULT(Failed) - AC_DEFINE(HAVE_PERL,0) fi AC_MSG_CHECKING("for ExtUtils::Embed to determine ccopts") @@ -287,10 +288,28 @@ if test "$perl" != "no"; then AC_MSG_RESULT(XS libraries are not going to be available) fi - ZPERL_LIBS="$LIBS" + xLIBS="$LIBS" + xCFLAGS="$CFLAGS" CFLAGS="$PERL_CFLAGS $CFLAGS" LIBS="$PERL_LIBS $LIBS" - AM_CONDITIONAL(perl,true) + + AC_MSG_CHECKING(for perl library) + AC_TRY_LINK([ + #include + ],[ + static void f() + { + ; + } + ],AM_CONDITIONAL(perl,true) + AC_DEFINE(HAVE_PERL,1) + AC_MSG_RESULT(found) + ZPERL_LIBS="$xLIBS" + , + AC_MSG_RESULT(not found) + AC_DEFINE(HAVE_PERL,0) + LIBS="$xLIBS" + CFLAGS="$xCFLAGS") else AC_DEFINE(HAVE_PERL,0) AC_MSG_RESULT(Not found) @@ -342,6 +361,10 @@ AC_STDC_HEADERS if test "$ac_cv_header_stdc" = "no"; then AC_MSG_WARN(Your system doesn't seem to support ANSI C) fi +AC_SUBST(IDZEBRA_SRC_ROOT) +AC_SUBST(IDZEBRA_BUILD_ROOT) +IDZEBRA_SRC_ROOT=`cd ${srcdir}; pwd` +IDZEBRA_BUILD_ROOT=`pwd` dnl ------ Create Makefiles AC_OUTPUT([ Makefile @@ -352,13 +375,12 @@ AC_OUTPUT([ isamb/Makefile isams/Makefile isamc/Makefile - isam/Makefile rset/Makefile data1/Makefile recctrl/Makefile recctrl/perlread.h index/Makefile - include/Makefile + include/Makefile include/idzebra/Makefile tab/Makefile doc/Makefile doc/zebra.xml @@ -367,12 +389,20 @@ AC_OUTPUT([ doc/zebraphp.dsl doc/tkl.xsl test/Makefile test/gils/Makefile test/usmarc/Makefile test/api/Makefile + test/rusmarc/Makefile test/cddb/Makefile test/malxml/Makefile + test/config/Makefile perl/Makefile.PL test/xelm/Makefile - test/dmoz/Makefile test/xpath/Makefile test/sort/Makefile + test/dmoz/Makefile test/xpath/Makefile test/sort/Makefile test/zsh/Makefile + test/marcxml/Makefile test/charmap/Makefile test/codec/Makefile examples/Makefile examples/gils/Makefile examples/zthes/Makefile idzebra.spec -]) - + idzebra-config +],[sed s%idzebra_echo_source=yes%idzebra_echo_source=no%g < idzebra-config > util/idzebra-config && chmod +x idzebra-config util/idzebra-config]) if test -x "$perlbin"; then - res=`cd perl ; $perlbin Makefile.PL ; cd .. ;`; + res=`cd perl ; $perlbin Makefile.PL ; cd .. ;`; +fi +if test -z "$YAZLIB"; then + echo "YAZ was not found. Use --with-yazconfig=DIR to specify location." + test -f /etc/debian_version && echo "Debian package libyaz-dev is required." fi +