2 # Process this file with autoconf to produce a configure script.
6 m4_include([m4/version.m4])
8 AC_INIT([nomnom], [_NOMNOM_VERSION],
9 [http://sourceforge.net/apps/trac/nomnom], [],
10 [http://nomnom.sourceforge.net/])
12 AC_CONFIG_SRCDIR([src/main.cpp])
13 AC_CONFIG_HEADERS([config.h])
14 AC_CONFIG_AUX_DIR([config.aux])
15 AC_CONFIG_MACRO_DIR([m4])
19 AC_DEFINE_UNQUOTED([CANONICAL_TARGET], "$target", [...])
20 AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [...])
22 AM_INIT_AUTOMAKE([-Wall -Werror foreign dist-bzip2 dist-xz])
23 AM_SILENT_RULES([yes])
25 # Checks for programs.
29 # Checks for libraries.
30 PKG_CHECK_MODULES([QtScript], [QtScript >= 4.6.0])
31 PKG_CHECK_MODULES([QtCore], [QtCore >= 4.6.0])
32 PKG_CHECK_MODULES([QtGui], [QtGui >= 4.6.0])
34 # Checks for Qt programs.
36 LRELEASE=`$PKG_CONFIG --variable=lrelease_location QtCore 2>/dev/null`
37 MOC=`$PKG_CONFIG --variable=moc_location QtCore 2>/dev/null`
38 RCC=`$PKG_CONFIG --variable=rcc_location QtCore 2>/dev/null`
39 UIC=`$PKG_CONFIG --variable=uic_location QtCore 2>/dev/null`
41 AS_IF([test -z "$MOC"], [
42 AC_MSG_ERROR([QtCore.pc: moc_location not found, is qt installed?])])
44 AS_IF([test -z "$UIC"], [
45 AC_MSG_ERROR([QtCore.pc: uic_location not found, is qt installed?])])
47 # debian: QtCore.pc (4.6.3): rcc_location undefined in QtCore.pc
48 # rcc: required. You can set RCC_PATH to point to a directory with lrelease.
49 AS_IF([test -z "$RCC"], [
50 AC_PATH_PROGS([RCC], [rcc rcc-qt4], [], [$RCC_PATH$PATH_SEPARATOR$PATH])
51 AS_IF([test -z "$RCC"], [AC_MSG_ERROR([rcc not found, is qt installed?])])
54 # debian: QtCore.pc (4.6.3): lrelease_location undefined in QtCore.pc
55 # lrelease: optional: translations will not be installed.
56 # You can set LRELEASE_PATH to point to a directory with lrelease.
57 AS_IF([test -z "$LRELEASE"], [
58 AC_PATH_PROGS([LRELEASE], [lrelease lrelease-qt4], [],
59 [$LRELEASE_PATH$PATH_SEPARATOR$PATH])
60 AS_IF([test -z "$LRELEASE"], [
61 AC_MSG_NOTICE([lrelease not found, translations will not be built])])
63 AM_CONDITIONAL([HAVE_LRELEASE], [test -n "$LRELEASE"])
70 # Checks for header files.
72 # Checks for typedefs, structures, and compiler characteristics.
76 # Checks for library functions.
80 VN=`$srcdir/gen-ver.sh $srcdir`
81 AC_DEFINE_UNQUOTED([VN],["$VN"], [We have version number from gen-ver.sh])
85 [AS_HELP_STRING([--with-manual],
86 [Install manual page(s) @<:@default=yes@:>@])],
89 AM_CONDITIONAL([WITH_MANUAL], [test x"$with_manual" != "xno"])
103 nomnom version: ${VERSION} (${VN})
106 install manual: ${with_manual}
108 lrelease: ${LRELEASE}
113 # vim: set ts=2 sw=2 tw=72 expandtab: