You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.4 KiB
74 lines
2.4 KiB
dnl ======================================================================
|
|
dnl Configure checks for KexiDB
|
|
dnl
|
|
dnl This ought to be simple - use kde-config to find headers and libraries
|
|
dnl and link against them:
|
|
dnl `kde-config --prefix`/include
|
|
dnl However, kde-config doesn't return the expected directory on Debian
|
|
dnl (for one), which installs kde headers to /usr/include/kde.
|
|
dnl
|
|
dnl So the plan for headers is to check:
|
|
dnl `kde-config --prefix`/include,
|
|
dnl `kde-config --prefix`/kde/include,
|
|
dnl any other place we might find them
|
|
dnl Then for libraries, check
|
|
dnl `kde-config --prefix`/include,
|
|
dnl any other place we might find them
|
|
dnl ======================================================================
|
|
|
|
# Configure overrides
|
|
AC_ARG_WITH(kexidb_includes,
|
|
AC_HELP_STRING([--with-kexidb-includes=DIR],
|
|
[use KexiDB-includes installed in this directory]),
|
|
[ac_kexidb_incdir=$withval],
|
|
ac_kexidb_incdir="")
|
|
|
|
AC_ARG_WITH(kexidb_libraries,
|
|
AC_HELP_STRING([--with-kexidb-libraries=DIR],
|
|
[use KexiDB-libs installed in this directory ]),
|
|
[ac_kexidb_libdir=$withval],
|
|
ac_kexidb_libdir="")
|
|
|
|
# Find kde-config
|
|
|
|
if test "$ac_kexidb_incdir" = "" -o "$ac_kexidb_libdir" = "" ; then
|
|
KDE_FIND_PATH(kde_config,KDE_CONFIG,
|
|
[${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin /usr/bin
|
|
/opt/kde/bin ],
|
|
[AC_MSG_ERROR([Could not find kde-config anywhere])])
|
|
kde_prefix=`$KDE_CONFIG --prefix`
|
|
fi
|
|
|
|
# Find include dir
|
|
if test "$ac_kexidb_incdir" = "" ; then
|
|
AC_MSG_CHECKING([for KexiDB headers])
|
|
kexidb_incdirs="$kde_prefix/include $kde_prefix/include/kde /usr/include /usr/include/kde /usr/local/include /opt/kde/include"
|
|
AC_FIND_FILE("kexidb/driver.h", $kexidb_incdirs, kexidb_incdir)
|
|
if test ! -r $kexidb_incdir/kexidb/driver.h; then
|
|
AC_MSG_RESULT([Could not find the required KexiDB HEADER files.])
|
|
else
|
|
AC_MSG_RESULT([$kexidb_incdir])
|
|
KEXIDB_INC=$kexidb_incdir
|
|
fi
|
|
else
|
|
KEXIDB_INC=$ac_kexidb_incdir
|
|
fi
|
|
|
|
# Find lib dir
|
|
if test "$ac_kexidb_libdir" = "" ; then
|
|
AC_MSG_CHECKING([for KexiDB libraries])
|
|
kexidb_libdirs="$kde_prefix/lib /usr/lib /usr/local/lib /opt/kde/lib"
|
|
AC_FIND_FILE(libkexidb.so, $kexidb_libdirs, kexidb_libdir)
|
|
if test ! -r $kexidb_libdir/libkexidb.so ; then
|
|
AC_MSG_RESULT([Could not find the required KexiDB LIBRARY files.])
|
|
else
|
|
AC_MSG_RESULT([$kexidb_libdir])
|
|
KEXIDB_LIB=$kexidb_libdir
|
|
fi
|
|
else
|
|
KEXIDB_LIB=$ac_kexidb_libdir
|
|
fi
|
|
|
|
AC_SUBST(KEXIDB_INC)
|
|
AC_SUBST(KEXIDB_LIB)
|