Commit from LXDE Translation Project with Pootle by user andika.: 52 of 52 messages...
[lxde/gpicview.git] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2
3 AC_INIT(configure.in)
4 AM_INIT_AUTOMAKE(gpicview, 0.2.3)
5 AM_CONFIG_HEADER(config.h)
6 AM_MAINTAINER_MODE
7
8 AC_LANG_C
9 AM_PROG_LIBTOOL
10
11 AC_ISC_POSIX
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_ARG_ENABLE(more_warnings,
22        [AC_HELP_STRING([--enable-more-warnings],
23                [Add more warnings @<:@default=no@:>@])],
24        [enable_more_warnings="${enableval}"],
25        [enable_more_warnings=no]
26 )
27
28 if test x"$enable_more_warnings" = x"yes"; then
29   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"
30 fi
31 AC_SUBST(ADDITIONAL_FLAGS)
32
33
34 AM_GLIB_GNU_GETTEXT
35 IT_PROG_INTLTOOL([0.40.0])
36
37 AC_ARG_ENABLE(gtk3,
38 AC_HELP_STRING([--enable-gtk3],[enable to use gtk-3.0 instead of gtk-2.0]),
39 [case "${enableval}" in
40   yes)  enable_gtk3=yes ;;
41   no)   enable_gtk3=no ;;
42   *) AC_MSG_ERROR([bad value "${enableval}" for --enable-gtk3, use "yes" (default) or "no".]) ;;
43 esac],[])
44
45 if test "x$enable_gtk3" = "xyes" ; then
46   CFLAGS="$CFLAGS -DENABLE_GTK3"
47   gtk_modules="gtk+-3.0 >= 3.0.0"
48 else
49   gtk_modules="gtk+-2.0 >= 2.12.0"
50 fi
51 PKG_CHECK_MODULES(GTK, [$gtk_modules])
52 AC_SUBST(GTK_CFLAGS)
53 AC_SUBST(GTK_LIBS)
54
55 pkg_modules="x11"
56
57 PKG_CHECK_MODULES(X11, [$pkg_modules])
58 AC_CHECK_LIB(jpeg, jpeg_start_decompress, [],
59              [AC_MSG_ERROR([libjpeg not found])], -lm)
60 AC_CHECK_HEADER(jpeglib.h, , [AC_MSG_ERROR([libjpeg not found])])
61 LIBJPEG='-ljpeg'
62
63 AC_SUBST(X11_CFLAGS)
64 AC_SUBST(X11_LIBS)
65
66 GETTEXT_PACKAGE=gpicview
67 AC_SUBST(GETTEXT_PACKAGE)
68 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
69
70 AC_OUTPUT([
71 Makefile
72 src/Makefile
73 data/Makefile
74 po/Makefile.in
75 ])
76
77 echo
78 echo GPicView....................... : Version $VERSION
79 echo
80 echo Prefix..........................: $prefix
81 echo
82 echo The binary will be installed in $prefix/bin
83 echo
84 echo http://lxde.org/
85 echo