-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure.ac
125 lines (99 loc) · 2.81 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
dnl Process this file with autoconf to produce a configure script.
m4_define([gtkimcocoa_major_version], [0])
m4_define([gtkimcocoa_minor_version], [0])
m4_define([gtkimcocoa_micro_version], [2])
m4_define([gtkimcocoa_version],
gtkimcocoa_major_version.gtkimcocoa_minor_version.gtkimcocoa_micro_version)
AC_INIT([gtkimcocoa],
[gtkimcocoa_version],
[https://github.com/ashie/gtkimcocoa/issues],
[gtkimcocoa])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE([1.11])
AM_SILENT_RULES([yes])
dnl
dnl Checks for programs.
dnl
AC_LANG([Objective C])
AC_PROG_CPP
AC_PROG_CC
AC_PROG_CXX
AC_PROG_AWK
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
dnl
dnl Checks for host
dnl
AC_CANONICAL_HOST
dnl
dnl libtool
dnl
AC_ENABLE_SHARED(yes)
AC_ENABLE_STATIC(no)
AM_PROG_LIBTOOL
dnl
dnl Checks for gtk
dnl
GTK3_REQUIRED=3.0.0
PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= GTK3_REQUIRED,
[have_gtk3=yes], [have_gtk3=no])
AM_CONDITIONAL(HAVE_GTK3, test $have_gtk3 = "yes")
if test $have_gtk3 = "yes"; then
gtk3_binary_version=`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`
gtk3_libdir=`$PKG_CONFIG --variable=libdir gtk+-3.0`
GTK3_IM_MODULEDIR="$gtk3_libdir"/gtk-3.0/$gtk3_binary_version/immodules
AC_SUBST(GTK3_IM_MODULEDIR)
fi
GTK2_REQUIRED=2.24.0
PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= GTK2_REQUIRED,
[have_gtk2=yes], [have_gtk2=no])
AM_CONDITIONAL(HAVE_GTK2, test $have_gtk2 = "yes")
if test $have_gtk2 = "yes"; then
gtk2_binary_version=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
gtk2_libdir=`$PKG_CONFIG --variable=libdir gtk+-2.0`
GTK2_IM_MODULEDIR="$gtk2_libdir"/gtk-2.0/$gtk2_binary_version/immodules
AC_SUBST(GTK2_IM_MODULEDIR)
fi
dnl
dnl Checks for header files.
dnl
AC_HEADER_STDC
AC_CHECK_HEADERS([string.h])
dnl
dnl Checks for typedefs, structures, and compiler characteristics.
dnl
dnl
dnl Checks for library functions.
dnl
dnl
dnl Options to enable some features
dnl
AC_ARG_ENABLE([workaround],
AS_HELP_STRING([--enable-workaround],
[Enable some workaround code]),
enable_workaround=$enableval,
enable_workaround=no)
AC_MSG_RESULT([$enable_workaround])
if test "$enable_workaround" = "yes"; then
AC_DEFINE(GTK_IM_COCOA_ENABLE_JIS_KEYBOARD_WORKAROUND, 1,
[Define to 1 if you enable workaround for JIS keyboard])
AC_DEFINE(GTK_IM_COCOA_ENABLE_COLOR_WORKAROUND, 1,
[Define to 1 if you enable workaround for color of preedit string])
fi
AC_CONFIG_FILES([
Makefile
src/Makefile
gtk2/Makefile
test/Makefile
patches/Makefile
tools/Makefile
])
AC_OUTPUT
AC_MSG_RESULT([
Configure result:
GTK+3: ${have_gtk3}
GTK+2: ${have_gtk2}
])