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([QtCore], [QtCore >= 4.6.0])
31 PKG_CHECK_MODULES([QtGui], [QtGui >= 4.6.0])
32 PKG_CHECK_MODULES([QJson], [QJson >= 0.7.1])
35 #AC_ARG_ENABLE([libproxy],
36 # [AS_HELP_STRING([--enable-libproxy], [Build with libproxy])])
38 #AM_CONDITIONAL([ENABLE_LIBPROXY], [test -n "$enable_libproxy"])
40 #AS_IF([test -n "$enable_libproxy"], [
41 # PKG_CHECK_MODULES([libproxy], [libproxy-1.0 >= 0.4.7], [], [
42 # PKG_CHECK_MODULES([libproxy], [libproxy >= 0.4.7])])
43 # AC_DEFINE([HAVE_LIBPROXY], [1], [We have libproxy])
46 # Checks for Qt programs.
48 LRELEASE=`$PKG_CONFIG --variable=lrelease_location QtCore 2>/dev/null`
49 MOC=`$PKG_CONFIG --variable=moc_location QtCore 2>/dev/null`
50 RCC=`$PKG_CONFIG --variable=rcc_location QtCore 2>/dev/null`
51 UIC=`$PKG_CONFIG --variable=uic_location QtCore 2>/dev/null`
53 AS_IF([test -z "$MOC"], [
54 AC_MSG_ERROR([QtCore.pc: moc_location not found, is qt installed?])])
56 AS_IF([test -z "$UIC"], [
57 AC_MSG_ERROR([QtCore.pc: uic_location not found, is qt installed?])])
59 # debian: QtCore.pc (4.6.3): rcc_location undefined in QtCore.pc
60 # rcc: required. You can set RCC_PATH to point to a directory with lrelease.
61 AS_IF([test -z "$RCC"], [
62 AC_PATH_PROGS([RCC], [rcc rcc-qt4], [], [$RCC_PATH$PATH_SEPARATOR$PATH])
63 AS_IF([test -z "$RCC"], [AC_MSG_ERROR([rcc not found, is qt installed?])])
66 # debian: QtCore.pc (4.6.3): lrelease_location undefined in QtCore.pc
67 # lrelease: optional: translations will not be installed.
68 # You can set LRELEASE_PATH to point to a directory with lrelease.
69 AS_IF([test -z "$LRELEASE"], [
70 AC_PATH_PROGS([LRELEASE], [lrelease lrelease-qt4], [],
71 [$LRELEASE_PATH$PATH_SEPARATOR$PATH])
72 AS_IF([test -z "$LRELEASE"], [
73 AC_MSG_NOTICE([lrelease not found, translations will not be built])])
75 AM_CONDITIONAL([HAVE_LRELEASE], [test -n "$LRELEASE"])
82 # Checks for header files.
84 # Checks for typedefs, structures, and compiler characteristics.
88 # Checks for library functions.
92 VN=`$srcdir/gen-ver.sh $srcdir`
93 AC_DEFINE_UNQUOTED([VN],["$VN"], [We have version number from gen-ver.sh])
96 AC_ARG_ENABLE([verbose],
97 AS_HELP_STRING([--enable-verbose], [Enable --verbose program option]))
99 AS_IF([test "x$enable_verbose" = "xyes"], [
100 AC_DEFINE([ENABLE_VERBOSE], [1], [Enable --verbose option])])
103 AC_ARG_WITH([manual],
104 [AS_HELP_STRING([--with-manual],
105 [Install manual page(s) @<:@default=yes@:>@])],
108 AM_CONDITIONAL([WITH_MANUAL], [test x"$with_manual" != "xno"])
122 nomnom version: ${VERSION} (${VN})
125 install prefix: ${prefix}
126 with manual: ${with_manual}
127 --verbose: ${enable_verbose}
129 lrelease: ${LRELEASE}
134 # vim: set ts=2 sw=2 tw=72 expandtab: