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
|
# Original Author was Kalle@kde.org
# I lifted it in some mater. (Stephan Kulow)
# I used much code from Janos Farkas
# modified somewhat by John DOnoghue for threads and UIC
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)
AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM
dnl Automake doc recommends to do this only here. (Janos)
AM_INIT_AUTOMAKE(knapster2, 0.3) 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
#setup uic since it dont wanna sometimes :)
AC_MSG_CHECKING("for uic ");
KDE_FIND_PATH(uic, UIC, [$ac_qt_bindir $QTDIR/bin \
/usr/bin /usr/X11R6/bin /usr/lib/qt/bin \
/usr/local/qt/bin], [KDE_MOC_ERROR_MESSAGE])
if test -z "$UIC"; then
AC_MSG_RESULT("no")
AC_MSG_ERROR("Cannot find a uic")
else
AC_MSG_RESULT("yes")
fi
AC_SUBST(UIC)
dnl pthreads check
# KDE_CHECK_LIBPTHREAD
# seems to be a problem with KDE_CHECK_LIBPTHREAD when using open/free bsd
# so lets do it ourselves
LIBPTHREAD=none
AC_CHECK_LIB(pthread, pthread_create, LIBPTHREAD="-lpthread")
if test "x$LIBPTHREAD" = xnone; then
# This is for FreeBSD
LIBS="-pthread"
AC_MSG_CHECKING("for pthread_create in -pthread");
AC_TRY_LINK(
[#include <pthread.h>],
[ pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ],
LIBPTHREAD=-pthread, LIBPTHREAD=none)
if test "x$LIBPTHREAD" = xnone; then
AC_MSG_RESULT("no")
else
AC_MSG_RESULT("yes")
fi
fi
if test "x$LIBPTHREAD" = xnone; then
AC_MSG_ERROR("Cannot find a thread library")
fi
AC_SUBST(LIBPTHREAD)
dnl Perform program name transformation
AC_ARG_PROGRAM
#MIN_CONFIG
# set up path for welcome page
# WELCOME_PAGE="file:@kde_htmldir@/default/knapster2/knapster-welcome.html"
AC_SUBST(WELCOME_PAGE)
#tmp_flags=$CXXFLAGS
#CXXFLAGS=$(CXXFLAGS) -DWELCOME_PAGE="$(welcome_page)"
dnl PACKAGE set before
KDE_CREATE_SUBDIRSLIST
AC_OUTPUT( \
./Makefile \
doc/Makefile \
doc/en/Makefile \
knapster2/Makefile \
po/Makefile \
)
|