forked from woodenshoe-wi/gtkdialog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
104 lines (91 loc) · 2.57 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
# Process this file with autoconf to produce a configure script.
AC_INIT([gtkdialog], [0.8.4], [[email protected]], [gtkdialog],
[http://code.google.com/p/gtkdialog/])
AM_INIT_AUTOMAKE
#AM_CONFIG_HEADER([config.h]) Obsolete.
AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE
# Setting config.h macros.
AC_PATH_PROG(svnv, svnversion)
if test "x$svnv" != "x" && test `$svnv -n` != "exported"; then
AC_DEFINE_UNQUOTED(BUILD_DETAILS, ["r`svnversion -n`"], [Build details])
else
AC_DEFINE_UNQUOTED(BUILD_DETAILS, ["release"], [Build details])
fi
# Don't uncomment this as there's a limit on the number of file
# descriptors -- see /proc/sys/fs/inotify/max_user_instances
#AC_CHECK_HEADER([sys/inotify.h], [AC_DEFINE([HAVE_SYS_INOTIFY_H], 1,
# [Define to 1 if you have the <sys/inotify.h> header file.])])
# Checks for programs.
AC_ISC_POSIX
#AM_PROG_CC_STDC Obsolete.
AC_PROG_CC
AC_HEADER_STDC
AM_PROG_LEX
AC_PROG_YACC
AC_SUBST(YACC)
# *** gtk3: Newly added to support checking for the correct libraries.
AC_ARG_ENABLE([gtk3], AS_HELP_STRING([--enable-gtk3],
[Enable support for GTK+ 3 (GTK+ 2 is currently the default)]))
# Checks for libraries.
pkg_modules="gthread-2.0"
PKG_CHECK_MODULES(GTHREAD, [$pkg_modules])
AC_SUBST(GTHREAD_CFLAGS)
AC_SUBST(GTHREAD_LIBS)
AS_IF([test "x$enable_gtk3" = "xyes"], [
pkg_modules="gtk+-3.0 >= 3.0.0"
PKG_CHECK_MODULES(GTK, \
[$pkg_modules], \
AC_SUBST(HAVE_GTK, 3),\
AC_SUBST(HAVE_GTK, 0))
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
AC_SUBST(HAVE_GLADE_LIB, 0)
vte_lib="vte-2.91 >= 0.29.0"
PKG_CHECK_MODULES([VTE], \
[$vte_lib], \
AC_SUBST(HAVE_VTE, 1),\
AC_SUBST(HAVE_VTE, 0))
AC_SUBST(VTE_CFLAGS)
AC_SUBST(VTE_LIBS)
],
[
pkg_modules="gtk+-2.0 >= 2.0.0"
PKG_CHECK_MODULES(GTK, \
[$pkg_modules], \
AC_SUBST(HAVE_GTK, 2),\
AC_SUBST(HAVE_GTK, 0))
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
glade_lib="libglade-2.0"
PKG_CHECK_MODULES([GLADE_LIB], \
[$glade_lib], \
AC_SUBST(HAVE_GLADE_LIB, 1),\
AC_SUBST(HAVE_GLADE_LIB, 0))
AC_SUBST(GLADE_LIB_CFLAGS)
AC_SUBST(GLADE_LIB_LIBS)
vte_lib="vte >= 0.23.5"
PKG_CHECK_MODULES([VTE], \
[$vte_lib], \
AC_SUBST(HAVE_VTE, 1),\
AC_SUBST(HAVE_VTE, 0))
AC_SUBST(VTE_CFLAGS)
AC_SUBST(VTE_LIBS)
])
# Checks for header files.
AC_CHECK_HEADERS([locale.h])
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_CHECK_FUNCS([setlocale])
#AC_CONFIG_FILES([])
AC_OUTPUT(
Makefile
gtkdialog.spec
src/Makefile
doc/Makefile
data/Makefile
data/icons/Makefile
data/icons/hicolor/Makefile
data/icons/hicolor/32x32/Makefile
data/icons/hicolor/32x32/apps/Makefile
)