1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
|
dnl This file is part of the KDE libraries/packages
dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
dnl This file is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Library General Public
dnl License as published by the Free Software Foundation; either
dnl version 2 of the License, or (at your option) any later version.
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Library General Public License for more details.
dnl You should have received a copy of the GNU Library General Public License
dnl along with this library; see the file COPYING.LIB. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
# Original Author was Kalle@kde.org
# I lifted it in some mater. (Stephan Kulow)
# I used much code from Janos Farkas
dnl Process this file with autoconf to produce a configure script.
AC_INIT(acinclude.m4) dnl a source file from your sub dir
dnl This is so we can use kde-common
AC_CONFIG_AUX_DIR(admin)
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
unset CDPATH
dnl Checking host/target/build systems, for make, install etc.
AC_CANONICAL_SYSTEM
dnl Perform program name transformation
AC_ARG_PROGRAM
dnl Automake doc recommends to do this only here. (Janos)
AM_INIT_AUTOMAKE(kdesdk, "2.2.2") dnl searches for some needed programs
KDE_SET_PREFIX
dnl generate the config header
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
dnl Checks for programs.
AC_CHECK_COMPILERS
AC_ENABLE_SHARED(yes)
AC_ENABLE_STATIC(no)
KDE_PROG_LIBTOOL
dnl for NLS support. Call them in this order!
dnl WITH_NLS is for the po files
AM_KDE_WITH_NLS
AC_PATH_KDE
#MIN_CONFIG
DO_NOT_COMPILE="$DO_NOT_COMPILE kappgen"
CXXFLAGS="$CXXFLAGS -DQT_CLEAN_NAMESPACE -DQT_NO_COMPAT -DQT_NO_ASCII_CAST"
case "$host" in
*-gnu)
kde_compile_kmtrace=$GCC
if test ! -f /usr/lib/libiberty.a; then
kde_compile_kmtrace=no
fi
;;
*)
kde_compile_kmtrace=no
;;
esac
if test ! "x$kde_compile_kmtrace" = "xyes"; then
DO_NOT_COMPILE="$DO_NOT_COMPILE kmtrace"
fi
dnl I wonder who needs this..
AC_HEADER_STDC
AM_PROG_LEX
AC_PROG_YACC
AC_MSG_CHECKING([for Berkeley Database II])
db_libraries=""
db_includes=""
db_name=""
ac_db_name="db"
ac_db_includes="."
ac_db_libraries="."
AC_ARG_WITH(db-dir,
[ --with-db-dir=DIR where the root of Berkeley DB II is installed],
[ ac_db_includes="$withval"/include
ac_db_libraries="$withval"/lib
])
AC_ARG_WITH(db-name,
[ --with-db-name=NAME name of the Berkeley DB II library (default db)],
[ ac_db_name="$withval"
])
AC_CACHE_VAL(kde_cv_berk_database,
[
kde_safe_LDFLAGS=$LDFLAGS
kde_safe_LIBS=$LIBS
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $all_libraries -L$ac_db_libraries $all_includes -I$ac_db_includes"
LIBS="-l$ac_db_name"
AC_TRY_LINK([
#include <db.h>
],
[
#if DB_VERSION_MAJOR == 2
DB *db;
DBC *cursor;
db_open("test",DB_BTREE,0,0644,0,0,&db);
#else
error
#endif
],
kde_cv_berk_database=db,
[
LIBS="-ldb2"
AC_TRY_LINK([
#include <db2/db.h>
],
[
#if DB_VERSION_MAJOR == 2
DB *db;
DBC *cursor;
db_open("test",DB_BTREE,0,0644,0,0,&db);
#else
error
#endif
],
kde_cv_berk_database=db2,
[
LIBS="-ldb2"
AC_TRY_LINK([
#include <db.h>
],
[
#if DB_VERSION_MAJOR == 2
DB *db;
DBC *cursor;
db_open("test",DB_BTREE,0,0644,0,0,&db);
#else
error
#endif
],
kde_cv_berk_database=db2-db,
kde_cv_berk_database=NO
)
])
])
LIBS="$kde_safe_LIBS"
LDFLAGS="$kde_safe_LDFLAGS"
])
kde_db_header=""
DBSEARCHENGINE=dbsearchengine
case "$kde_cv_berk_database" in
NO)
AC_MSG_RESULT(not found)
AC_MSG_WARN(Dictionary plugin \"Translation Database\" for KBabel will not be built! Please install Berkeley Database II. See http://www.sleepycat.com for more information.)
LIB_DBII=""
DBSEARCHENGINE=""
;;
db)
LIB_DBII="-l$ac_db_name"
kde_db_header=db.h
AC_MSG_RESULT(-l$ac_db_name)
AC_DEFINE_UNQUOTED(HAVE_DB_DB_H, 1, [DB 2 header location] )
;;
db2-db)
LIB_DBII='-ldb2'
kde_db_header=db.h
AC_MSG_RESULT("flag is -ldb2 and header is db.h")
AC_DEFINE_UNQUOTED(HAVE_DB_DB_H, 1, [DB 2 header location] )
;;
db2)
LIB_DBII='-ldb2'
kde_db_header=db2/db.h
AC_MSG_RESULT(-ldb2)
AC_DEFINE_UNQUOTED(HAVE_DB2_DB_H, 1, [DB 2 header location] )
esac
DBII_LDFLAGS="$ac_db_libraries"
DBII_INCLUDES="$ac_db_includes"
DBII_NAME="$ac_db_name"
AC_SUBST(DBII_INCLUDES)
AC_SUBST(DBII_LDFLAGS)
AC_SUBST(DBII_NAME)
AC_SUBST(DBSEARCHENGINE)
AC_SUBST(LIB_DBII)
CXXFLAGS="$CXXFLAGS -DQT_CLEAN_NAMESPACE -DQT_NO_COMPAT -DQT_NO_ASCII_CAST"
dnl in this space add everything you want to check for;
dnl examples are specific headers, libraries, etc.
dnl everything to compile and run a KDE program is already checked
KDE_CREATE_SUBDIRSLIST
AC_OUTPUT( \
./Makefile \
doc/Makefile \
doc/kbabel/Makefile \
doc/ktranslator/Makefile \
doc/markup/Makefile \
kbabel/Makefile \
kbabel/addons/Makefile \
kbabel/addons/preview/Makefile \
kbabel/common/Makefile \
kbabel/common/libgettext/Makefile \
kbabel/kbabel/Makefile \
kbabel/kbabeldict/Makefile \
kbabel/kbabeldict/modules/Makefile \
kbabel/kbabeldict/modules/dbsearchengine/Makefile \
kbabel/kbabeldict/modules/poauxiliary/Makefile \
kbabel/kbabeldict/modules/pocompendium/Makefile \
kbabel/kbabel/icons/Makefile \
kbabel/kbabel/mime/Makefile \
kbabel/kbabel/pics/Makefile \
kexample/Makefile \
kexample/kless/Makefile \
kmtrace/Makefile \
kspy/Makefile \
kstartperf/Makefile \
poxml/Makefile \
poxml/antlr/Makefile \
poxml/antlr/antlr/Makefile \
poxml/antlr/src/Makefile \
scripts/Makefile \
)
|