Adding debug package.
[debian/lxshortcut.git] / configure.in
CommitLineData
7448b2ca
DB
1dnl Process this file with autoconf to produce a configure script.
2
3AC_INIT(configure.in)
6cbf1721 4AM_INIT_AUTOMAKE(lxshortcut, 0.1.2)
7448b2ca 5AM_CONFIG_HEADER(config.h)
6cbf1721
DB
6# Support silent build rules. Disable by either passing --disable-silent-rules
7# to configure or passing V=1 to make
8AM_SILENT_RULES([yes])
9
7448b2ca
DB
10AM_MAINTAINER_MODE
11
6cbf1721
DB
12# Init intltool
13IT_PROG_INTLTOOL
14
7448b2ca
DB
15AC_ISC_POSIX
16AC_PROG_CC
17AM_PROG_CC_STDC
18AC_HEADER_STDC
19
6cbf1721
DB
20AC_ARG_ENABLE(more_warnings,
21 [AC_HELP_STRING([--enable-more-warnings],
22 [Add more warnings @<:@default=no@:>@])],
23 [enable_more_warnings="${enableval}"],
24 [enable_more_warnings=no]
25)
26
27AC_ARG_ENABLE(gtk3,
28AC_HELP_STRING([--enable-gtk3],[enable to use gtk-3.0 instead of gtk-2.0]),
29[case "${enableval}" in
30 yes) enable_gtk3=yes ;;
31 no) enable_gtk3=no ;;
32 *) AC_MSG_ERROR([bad value "${enableval}" for --enable-gtk3, use "yes" (default) or "no".]) ;;
33esac],[])
34
35if test "x$enable_gtk3" = "xyes" ; then
36 CFLAGS="$CFLAGS -DENABLE_GTK3"
37 gtk_modules="gtk+-3.0 >= 3.0.0"
38else
39 gtk_modules="gtk+-2.0 >= 2.12.0 gthread-2.0"
40fi
41PKG_CHECK_MODULES(GTK, [$gtk_modules])
7448b2ca
DB
42AC_SUBST(GTK_CFLAGS)
43AC_SUBST(GTK_LIBS)
44
6cbf1721
DB
45if test x"$enable_more_warnings" = x"yes"; then
46 ADDITIONAL_FLAGS="-Wall -Werror=all -Werror=format -Werror=implicit-function-declaration -Werror=implicit-int -Werror=missing-braces -Werror=parentheses -Werror=return-type -Werror=strict-aliasing -Werror=switch -Wuninitialized -Werror=unused-label -Werror=unused-value -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Werror=missing-declarations -Wredundant-decls -Wmissing-noreturn -Wpointer-arith -Wcast-align -Wwrite-strings -Werror=inline -Werror=format-nonliteral -Wformat-nonliteral -Werror=format-security -Wformat-security -Winit-self -Werror=missing-include-dirs -Werror=undef -Werror=aggregate-return -Wmissing-format-attribute -Werror=nested-externs -fno-strict-aliasing -fmessage-length=0 -Wp,-D_FORTIFY_SOURCE=2 -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES"
7448b2ca 47fi
6cbf1721 48AC_SUBST(ADDITIONAL_FLAGS)
7448b2ca
DB
49
50GETTEXT_PACKAGE=lxshortcut
51AC_SUBST(GETTEXT_PACKAGE)
52AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
53
6cbf1721
DB
54# Generate po/LINGUAS on the fly rather than relying on translators
55# to maintain it manually. This also overcome the problem that Transifex
56# cannot add a language to po/LINGUAS if a new po file is submitted.
57rm -f $srcdir/po/LINGUAS
58for po_file in `ls $srcdir/po/*.po | sort`;
59do
60 lang=`echo "$po_file" | sed "s|.*/po/\(.*\)\.po|\1|g"`
61 echo $lang >> $srcdir/po/LINGUAS
62done
7448b2ca
DB
63AM_GLIB_GNU_GETTEXT
64
65AC_OUTPUT([
66Makefile
67src/Makefile
68po/Makefile.in
69])