Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / examples / hello-c-gnome3 / configure.ac
1 dnl Example for use of GNU gettext.
2 dnl This file is in the public domain.
3 dnl
4 dnl Configuration file - processed by autoconf.
5
6 AC_INIT
7 AC_CONFIG_SRCDIR(hello.c)
8 AM_INIT_AUTOMAKE(hello-c-gnome3, 0)
9
10 AC_PROG_CC
11 AC_CHECK_HEADERS([unistd.h])
12 AM_GNU_GETTEXT([external])
13 AM_GNU_GETTEXT_VERSION(0.19)
14
15 dnl Check GNOME specific stuff.
16 dnl
17 dnl If you have full GNOME development environment installed on your
18 dnl system, you should be able to use the following macros:
19 dnl
20 dnl   AM_PATH_GLIB_2_0
21 dnl   PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= 3.10], ,
22 dnl     [AC_MSG_ERROR([can't find gtk+-3.0])])
23 dnl
24 dnl Here, in gettext-tools/examples, we do the checks manually for
25 dnl simplicity.
26
27 AC_PATH_PROG(GLIB_COMPILE_RESOURCES, [glib-compile-resources])
28 AS_IF([test -z "$GLIB_COMPILE_RESOURCES"], [
29   AC_MSG_ERROR([can't find glib-compile-resources])
30 ])
31
32 AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, [glib-compile-schemas])
33 AS_IF([test -z "$GLIB_COMPILE_SCHEMAS"], [
34   AC_MSG_ERROR([can't find glib-compile-schemas])
35 ])
36
37 AC_PATH_PROG([PKG_CONFIG], [pkg-config])
38 AS_IF([test -z "$PKG_CONFIG"], [
39   AC_MSG_ERROR([can't find pkg-config])
40 ])
41
42 GTK="gtk+-3.0 >= 3.10"
43 AS_IF(["$PKG_CONFIG" --exists "$GTK"], , [
44   AC_MSG_ERROR([can't find $GTK])
45 ])
46
47 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK"`
48 AC_SUBST(GTK_CFLAGS)
49
50 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK"`
51 AC_SUBST(GTK_LIBS)
52
53 AC_CONFIG_FILES([Makefile])
54 AC_CONFIG_FILES([m4/Makefile])
55 AC_CONFIG_FILES([po/Makefile.in])
56 AC_OUTPUT