Commit from LXDE Pootle server by user flywheel.: 52 of 52 strings translated (0...
[lxde/gpicview.git] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2
3 AC_INIT([gpicview],[0.2.4],[],[gpicview])
4 # Autotols programs
5 AM_INIT_AUTOMAKE([1.10 -Wall -Werror foreign no-dist-gzip dist-xz])
6 AM_MAINTAINER_MODE
7
8 AC_LANG([C])
9 LT_INIT
10
11 AC_SEARCH_LIBS([strerror],[cposix])
12 AC_PROG_CC
13 AM_PROG_CC_STDC
14 AM_PROG_CC_C_O
15 AC_HEADER_STDC
16
17 # Support silent build rules. Disable by either passing --disable-silent-rules
18 # to configure or passing V=1 to make
19 AM_SILENT_RULES([yes])
20
21 AC_CONFIG_HEADERS([config.h])
22 AC_CONFIG_MACRO_DIR([m4])
23
24 AC_ARG_ENABLE(more_warnings,
25        [AS_HELP_STRING([--enable-more-warnings],[Add more warnings @<:@default=no@:>@])],
26        [enable_more_warnings="${enableval}"],
27        [enable_more_warnings=no]
28 )
29
30 if test x"$enable_more_warnings" = x"yes"; then
31   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"
32 fi
33 AC_SUBST(ADDITIONAL_FLAGS)
34
35
36 AM_GLIB_GNU_GETTEXT
37 IT_PROG_INTLTOOL([0.40.0])
38
39 AC_ARG_ENABLE(gtk3,
40 AS_HELP_STRING([--enable-gtk3],[enable to use gtk-3.0 instead of gtk-2.0]),
41 [case "${enableval}" in
42   yes)  enable_gtk3=yes ;;
43   no)   enable_gtk3=no ;;
44   *) AC_MSG_ERROR([bad value "${enableval}" for --enable-gtk3, use "yes" (default) or "no".]) ;;
45 esac],[])
46
47 if test "x$enable_gtk3" = "xyes" ; then
48   CFLAGS="$CFLAGS -DENABLE_GTK3"
49   gtk_modules="gtk+-3.0 >= 3.0.0"
50 else
51   gtk_modules="gtk+-2.0 >= 2.12.0"
52 fi
53 PKG_CHECK_MODULES(GTK, [$gtk_modules])
54 AC_SUBST(GTK_CFLAGS)
55 AC_SUBST(GTK_LIBS)
56
57 pkg_modules="x11"
58
59 PKG_CHECK_MODULES(X11, [$pkg_modules])
60 AC_CHECK_LIB(jpeg, jpeg_start_decompress, [],
61              [AC_MSG_ERROR([libjpeg not found])], -lm)
62 AC_CHECK_HEADER(jpeglib.h, , [AC_MSG_ERROR([libjpeg not found])])
63 LIBJPEG='-ljpeg'
64
65 AC_SUBST(X11_CFLAGS)
66 AC_SUBST(X11_LIBS)
67
68 GETTEXT_PACKAGE=gpicview
69 AC_SUBST(GETTEXT_PACKAGE)
70 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
71
72 AC_CONFIG_FILES([
73 Makefile
74 src/Makefile
75 data/Makefile
76 po/Makefile.in
77 ])
78 AC_OUTPUT
79
80 echo
81 echo GPicView....................... : Version $VERSION
82 echo
83 echo Prefix..........................: $prefix
84 echo
85 echo The binary will be installed in $prefix/bin
86 echo
87 echo http://lxde.org/
88 echo