-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in.in
100 lines (82 loc) · 2.93 KB
/
configure.in.in
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
REQUIRED_KDE_VERSION=3.2.0
#MIN_CONFIG($REQUIRED_KDE_VERSION)
##AC_CONFIG_SRCDIR(src/main.cpp)
AM_INIT_AUTOMAKE(skim, 1.4.6)
# libtool versioning for SCIM
# increment if the interface has additions, changes, removals.
SKIM_CURRENT=1
# increment any time the source changes; set to 0 if you increment CURRENT
SKIM_REVISION=0
# increment if any interfaces have been added; set to 0
# if any interfaces have been removed. removal has
# precedence over adding, so set to 0 if both happened.
SKIM_AGE=1
AC_SUBST(SKIM_CURRENT)
AC_SUBST(SKIM_REVISION)
AC_SUBST(SKIM_AGE)
REQUIRED_SCIM_VERSION=1.4.4
PKG_CHECK_MODULES(SCIM, [scim >= $REQUIRED_SCIM_VERSION],
[HAS_SCIM=yes],
[HAS_SCIM=no])
PKG_CHECK_MODULES(SCIM_X11, [scim-x11utils], [HAS_SCIM_X11=yes], [HAS_SCIM_X11=no])
AC_SUBST(REQUIRED_KDE_VERSION)
AC_SUBST(REQUIRED_SCIM_VERSION)
if test "$HAS_SCIM" = "yes"; then
SCIM_VERSION=`$PKG_CONFIG --modversion scim`
AC_SUBST(SCIM_VERSION)
AC_DEFINE_UNQUOTED(SCIM_VERSION, "$SCIM_VERSION", [The version of SCIM library.])
SCIM_BINARY_VERSION=`$PKG_CONFIG --variable=scim_binary_version scim`
AC_SUBST(SCIM_BINARY_VERSION)
AC_DEFINE_UNQUOTED(SCIM_BINARY_VERSION, "$SCIM_BINARY_VERSION", [The binary version of SCIM library.])
SCIM_LIBDIR=`$PKG_CONFIG --variable=libdir scim`
AC_SUBST(SCIM_LIBDIR)
else
AC_MSG_ERROR([SCIM library is not available or the version is too old!])
fi
##AM_INIT_AUTOMAKE(gettext, 0.12.1)
AM_GNU_GETTEXT([external])
dnl XComposite check
AC_CHECK_HEADER(X11/extensions/Xcomposite.h, [xcomposite_h=yes], [xcomposite_h=no], [#include <X11/Xlib.h>])
if test "$xcomposite_h" = yes; then
KDE_CHECK_LIB(Xcomposite, XCompositeQueryExtension, [
LIB_XCOMPOSITE=-lXcomposite
AC_DEFINE_UNQUOTED(HAVE_XCOMPOSITE, 1, [Define if you have the XComposite extension])
], [], -lXext -X11 $X_EXTRA_LIBS)
else
LIB_XCOMPOSITE=
fi
AC_SUBST(LIB_XCOMPOSITE)
AM_CONDITIONAL(XCOMPOSITE_IS_AVAILABLE,
[test "$xcomposite_h" = "yes"])
###########################################################
## Definiation of compile args. ##
###########################################################
AC_ARG_ENABLE(scim-debug,
[ --enable-scim-debug Turn on debugging],
scim_debug=yes,
scim_debug=no)
if test "$scim_debug" = "yes"; then
AC_DEFINE(ENABLE_DEBUG,1,[Define this to enable the debug facility in skim])
CFLAGS="$CFLAGS -g"
CXXFLAGS="$CXXFLAGS -g"
else
AC_DEFINE(ENABLE_DEBUG,0)
fi
#AC_CHECK_HEAD
AC_C_BIGENDIAN
AC_CHECK_KDEMAXPATHLEN
##AC_OUTPUT
AC_MSG_RESULT([
Build options:
Version $VERSION
Version of libscim $SCIM_VERSION
Install prefix $prefix
XComposite Support $xcomposite_h
Build shared libs $enable_shared
Build static libs $enable_static
Enable debug $scim_debug
])
dnl AC_OUTPUT(src/scim-panel-kde)
dnl AC_OUTPUT(skim.spec)
dnl AC_OUTPUT(skim.pc)
dnl AC_OUTPUT(scim_kdeutils.pc)