forked from davidpicard/Gummi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
106 lines (86 loc) · 3.04 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.65)
AC_INIT([Gummi], [0.7.1], [[email protected]], [gummi], [http://gummi.midnightcoding.org/])
AM_INIT_AUTOMAKE([foreign -Wall -Werror])
GETTEXT_PACKAGE=gummi
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [The gettext domain])
AC_SUBST(GETTEXT_PACKAGE)
# ls po/*.po | sort | sed 's/po\///g;s/.po//g'| sed ':a;N;s/\n/ /g;ta'
ALL_LINGUAS="ar ca cs da de el es fr hu it nl pl pt pt_BR ro ru sv zh_CN zh_TW"
AC_CONFIG_SRCDIR([src/environment.h])
AC_CONFIG_HEADERS([config.h])
AH_VERBATIM([USE_GTKSPELL], [#undef USE_GTKSPELL])
# Checks for programs.
AC_PROG_CC
AC_PROG_CC_C_O
IT_PROG_INTLTOOL
AM_PROG_CC_C_O
# Checks for libraries.
AC_ARG_ENABLE([spellcheck],
AS_HELP_STRING([--disable-spellcheck],[disable spellcheck support]),
spellcheck=$enableval, spellcheck="yes")
if test "$spellcheck" = yes; then
AC_DEFINE(USE_GTKSPELL)
fi
AC_SUBST(USE_GTKSPELL)
AM_PATH_GLIB_2_0([2.20.0], [
GUI_CFLAGS="$GUI_CFLAGS $GLIB_CFLAGS"
GUI_LIBS="$GUI_LIBS $GLIB_LIBS"
], [AC_MSG_ERROR([You need Glib >= 2.20.0 to build $PACKAGE])])
PKG_CHECK_MODULES(gthread, [gthread-2.0],,
[AC_MSG_ERROR([You need ghread-2.0 to build $PACKAGE])])
GUI_CFLAGS="$GUI_CFLAGS $gthread_CFLAGS"
GUI_LIBS="$GUI_LIBS $gthread_LIBS"
AM_PATH_GTK_3_0([3.4.0], [
GUI_CFLAGS="$GUI_CFLAGS $GTK_CFLAGS"
GUI_LIBS="$GUI_LIBS $GTK_LIBS"
], [AC_MSG_ERROR([You need Gtk+ >= 3.4.0 to build $PACKAGE])])
PKG_CHECK_MODULES(gtksourceview, [gtksourceview-3.0 >= 3.4.0],,
[AC_MSG_ERROR([You need gtksourceview3 >= 3.4.0 to build $PACKAGE])])
GUI_CFLAGS="$GUI_CFLAGS $gtksourceview_CFLAGS"
GUI_LIBS="$GUI_LIBS $gtksourceview_LIBS"
PKG_CHECK_MODULES(poppler, [poppler-glib],,
[AC_MSG_ERROR([You need Poppler to build $PACKAGE])])
GUI_CFLAGS="$GUI_CFLAGS $poppler_CFLAGS"
GUI_LIBS="$GUI_LIBS $poppler_LIBS"
if test "$spellcheck" = yes; then
PKG_CHECK_MODULES(gtkspell3, [gtkspell3-3.0],,
[AC_MSG_ERROR([You need gtkspell3 to build $PACKAGE])])
GUI_CFLAGS="$GUI_CFLAGS $gtkspell3_CFLAGS"
GUI_LIBS="$GUI_LIBS $gtkspell3_LIBS"
fi
# Add explicit linking flags
GUI_LIBS="$GUI_LIBS -pthread -lm -lz -lrt"
# Checks for header files.
AC_CHECK_HEADERS([libintl.h locale.h netdb.h stdlib.h string.h sys/socket.h sys/time.h unistd.h fcntl.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
# Checks for library functions.
AC_CHECK_FUNCS([gethostbyname memset setlocale socket strstr])
AC_SUBST(GUI_LIBS)
AC_SUBST(GUI_CFLAGS)
AC_CONFIG_FILES([Makefile
src/Makefile
data/Makefile
data/ui/Makefile
data/icons/Makefile
data/snippets/Makefile
data/misc/Makefile
lib/Makefile
po/Makefile.in
data/misc/$PACKAGE.desktop
])
AC_OUTPUT
echo
echo gummi...................................... : Version $VERSION
echo
echo spellcheck support......................... : $spellcheck
echo
echo The binary will be installed in $prefix/bin
echo
echo configure complete, now type \'make\'.
echo