This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/prosqlite/configure.in

80 lines
1.8 KiB
Plaintext
Raw Normal View History

2014-07-16 00:56:45 +01:00
dnl Process this file with autoconf to produce a configure script.
m4_ifdef([HAS_TOP],[m4_ignore],[
AC_INIT(install-sh)
AC_PREREQ([2.50])
AC_CONFIG_HEADER(config.h)
])
PKG_PROSQLITE="packages/prosqlite"
AC_SUBST(PKG_PROSQLITE)
AC_SUBST(PROSQLITE_TARGETS)
AC_SUBST(PROSQLITE_PLTARGETS)
2014-10-25 16:46:13 +01:00
AC_SUBST(PROSQLITE_CPPFLAGS)
2014-07-16 00:56:45 +01:00
AC_SUBST(PROSQLITE_LDFLAGS)
AC_SUBST(PROSQLITE_LIBS)
m4_ifdef([HAS_TOP],[m4_ignore],[
m4_include([../ac_swi_c.m4])
])
yap_cv_prosqlite=yes
2014-10-25 16:46:13 +01:00
AC_ARG_WITH(prosqlite,
2014-07-16 00:56:45 +01:00
[ --with-prosqlite(=location) interface to sqlite],
if test "$withval" = yes; then
PROSQLITE_DIR=/usr
elif test "$withval" = no; then
yap_cv_prosqlite=no
2015-02-09 10:16:35 +00:00
else
PROSQLITE_DIR="$withval"
2014-07-16 00:56:45 +01:00
fi,
[PROSQLITE_DIR=/usr ])
havelib=no
if test $yap_cv_prosqlite = yes; then
2014-10-25 16:46:13 +01:00
OCPPFLAGS="${CPPFLAGS}"
2014-07-16 00:56:45 +01:00
OCPPFLAGS="${CPPFLAGS}"
OCIFLAGS="${CIFLAGS}"
OLDFLAGS="${LDFLAGS}"
if test ! -z "$PROSQLITE_DIR"; then
2014-10-25 16:46:13 +01:00
PROSQLITE_CPPFLAGS="-I${PROSQLITE_DIR}/include"
2014-07-16 00:56:45 +01:00
PROSQLITE_LDFLAGS="-L${PROSQLITE_DIR}/lib"
2014-10-25 16:46:13 +01:00
CPPFLAGS="-I${PROSQLITE_DIR}/include ${CPPFLAGS}"
2014-07-16 00:56:45 +01:00
CIFLAGS="-I${PROSQLITE_DIR}/include ${CIFLAGS}"
LDFLAGS="-L${PROSQLITE_DIR}/lib ${LDFLAGS}"
fi
AC_CHECK_LIB(sqlite3, sqlite3_open,
PROSQLITE_LIBS="-lsqlite3 $LIBS"
havelib=yes)
AC_CHECK_HEADERS(sqlite3.h, [], [])
2014-10-25 16:46:13 +01:00
CPPFLAGS="${OCPPFLAGS}"
2014-07-16 00:56:45 +01:00
CPPFLAGS="${OCPPFLAGS}"
CIFLAGS="${OCIFLAGS}"
LDFLAGS="${OLDFLAGS}"
fi
2015-02-09 10:16:35 +00:00
if test "$yap_cv_prosqlite" != no &&
test "$havelib" = yes &&
test "$ac_cv_header_sqlite3_h" = yes; then
2014-07-16 00:56:45 +01:00
PROSQLITE_TARGETS="prosqlite.$SO"
PROSQLITE_PLTARGETS="prolog/prosqlite.pl"
else
2015-02-09 10:16:35 +00:00
echo "ERROR: Cannot find sqlite3 library and/or the header sqlite3.h"
2014-07-16 00:56:45 +01:00
echo "WARNING: PROSQLITE interface will not be built"
PROSQLITE_TARGETS=""
fi
m4_ifdef([HAS_TOP],[m4_ignore],[
AC_OUTPUT(Makefile)
])