-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac.in
178 lines (149 loc) · 5.32 KB
/
configure.ac.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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
dnl $Id: configure.in.in 2439 2007-01-20 10:41:39Z benny $
dnl
dnl Copyright (c) 2006-2009
dnl The Thunar development team. All rights reserved.
dnl
dnl Originally written for Thunar by Benedikt Meurer <[email protected]>.
dnl Modified by Peter de Ridder <[email protected]>.
dnl Modified by Adam Plumb <[email protected]>
dnl
dnl ***************************
dnl *** Version information ***
dnl ***************************
m4_define([txp_version_major], [0])
m4_define([txp_version_minor], [3])
m4_define([txp_version_micro], [0])
m4_define([txp_version_tag], [])
m4_define([txp_version_build], [])
m4_define([txp_version], [txp_version_major().txp_version_minor().txp_version_micro()ifelse(txp_version_tag(), [], [], [txp_version_tag()-txp_version_build()])])
dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
AC_COPYRIGHT([Copyright (c) 2010 Adam Plumb <[email protected]>.])
AC_INIT([thunarx-python], [txp_version], [[email protected]])
AC_PREREQ([2.50])
AC_CANONICAL_TARGET()
dnl ***************************
dnl *** Initialize automake ***
dnl ***************************
AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar])
AM_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE()
dnl *******************************
dnl *** Check for UNIX variants ***
dnl *******************************
AC_AIX()
AC_ISC_POSIX()
AC_MINIX()
dnl ********************************
dnl *** Check for common headers ***
dnl ********************************
AC_CHECK_HEADERS([sys/wait.h])
dnl ********************************
dnl *** Check for basic programs ***
dnl ********************************
AC_PROG_CC()
AC_PROG_LD()
AC_PROG_INSTALL()
AM_PROG_CC_C_O()
dnl **************************
dnl *** Initialize libtool ***
dnl **************************
AC_DISABLE_STATIC()
AC_PROG_LIBTOOL()
dnl **************************************************
dnl * Check for Python
dnl **************************************************
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
AM_CHECK_PYTHON_LIBS(,[AC_MSG_ERROR(could not find Python lib)])
dnl Check for gtk-doc
GTK_DOC_CHECK(1.9)
dnl ***************************
dnl *** Determine the installed thunarx version ***
dnl ***************************
if test "`pkg-config --variable prefix thunarx-2`" != ""; then
THUNARX_API_VERSION=2
prefix=`pkg-config --variable prefix thunarx-2`
XDT_CHECK_PACKAGE([THUNARX], [thunarx-2], [1.1.0])
else
THUNARX_API_VERSION=1
prefix=`pkg-config --variable prefix thunarx-1`
XDT_CHECK_PACKAGE([THUNARX], [thunarx-1], [0.4.0])
fi
AC_SUBST(THUNARX_API_VERSION)
dnl ***********************************
dnl *** Check for required packages ***
dnl ***********************************
XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.6.0])
XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.6.0])
XDT_CHECK_PACKAGE([GOBJECT], [gobject-2.0], [2.6.0])
XDT_CHECK_PACKAGE([PYGTK], [pygtk-2.0], [2.6.0])
XDT_CHECK_PACKAGE([PYGOBJECT], [pygobject-2.0], [2.16.0])
PYTHON_CFLAGS="`python2-config --includes`"
PYTHON_LIBS="`python2-config --libs`"
PYTHON_LDFLAGS="`python2-config --ldflags`"
AC_SUBST(PYTHON_CFLAGS)
AC_SUBST(PYTHON_LIBS)
AC_SUBST(PYTHON_LDFLAGS)
THUNARX_LIBDIR=`pkg-config --variable=libdir thunarx-${THUNARX_API_VERSION}`
AC_SUBST(THUNARX_LIBDIR)
AC_DEFINE_UNQUOTED(THUNARX_LIBDIR, "$THUNARX_LIBDIR", [Thunarx libdir])
AC_MSG_CHECKING(for pygtk defs)
PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
AC_SUBST(PYGTK_DEFSDIR)
AC_MSG_RESULT($PYGTK_DEFSDIR)
AC_MSG_CHECKING(for pygobject defs)
PYGOBJECT_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygobject-2.0`
AC_SUBST(PYGOBJECT_DEFSDIR)
AC_MSG_RESULT($PYGOBJECT_DEFSDIR)
AC_MSG_CHECKING(for pygtk codegen)
PYGTK_CODEGEN="$PYTHON `$PKG_CONFIG --variable=codegendir pygobject-2.0`/codegen.py"
AC_SUBST(PYGTK_CODEGEN)
AC_MSG_RESULT($PYGTK_CODEGEN)
PYGOBJECT_DATADIR=`$PKG_CONFIG --variable=datadir pygobject-2.0`
AC_SUBST(PYGOBJECT_DATADIR)
PYGOBJECT_PYGDOCS="`$PKG_CONFIG --variable=pygdocs pygobject-2.0`"
AC_SUBST(PYGOBJECT_PYGDOCS)
PYGOBJECT_FIXXREF="$PYTHON `$PKG_CONFIG --variable=fixxref pygobject-2.0`"
AC_SUBST(PYGOBJECT_FIXXREF)
dnl ---------------------------------
dnl Get thunar extensions directory
dnl ---------------------------------
THUNARX_EXTENSION_DIR=`$PKG_CONFIG --variable=extensionsdir thunarx-${THUNARX_API_VERSION}`
AC_SUBST(THUNARX_EXTENSION_DIR)
AC_DEFINE_UNQUOTED(THUNARX_EXTENSION_DIR, "$THUNARX_EXTENSION_DIR", [Thunar's extensions directory])
dnl ---------------------------------
dnl Check for gtk-doc dependencies
dnl ---------------------------------
if test "${enable_gtk_doc}" != no; then
dnl Check for xsltproc
AC_PATH_PROG([XSLTPROC], [xsltproc])
if test -z "$XSLTPROC"; then
echo " disabling generation of docs"
enable_gtk_doc=no
fi
fi
dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
XDT_FEATURE_DEBUG([txp_debug_default])
dnl **************************************
dnl *** Check for linker optimizations ***
dnl **************************************
XDT_FEATURE_LINKER_OPTS()
AC_OUTPUT([
Makefile
src/Makefile
examples/Makefile
docs/Makefile
docs/reference/entities.docbook
])
dnl ***************************
dnl *** Print configuration ***
dnl ***************************
echo
echo "Build Configuration:"
echo
echo " Prefix: $prefix"
echo " Documentation: ${enable_gtk_doc}"
echo