]> Dogcows Code - chaz/openbox/blob - configure.ac
78d0753e172615d7088eee014f13b8d80d5396af
[chaz/openbox] / configure.ac
1 AC_PREREQ([2.54])
2 AC_INIT([openbox], [3.999.0], [http://bugzilla.icculus.org])
3 AM_INIT_AUTOMAKE
4 AC_CONFIG_SRCDIR([openbox/openbox.c])
5
6 dnl Making releases:
7 dnl RR_MICRO_VERSION += 1;
8 dnl RR_INTERFACE_AGE += 1;
9 dnl R_BINARY_AGE += 1;
10 dnl if any functions have been added, set RR_INTERFACE_AGE to 0.
11 dnl if backwards compatibility has been broken,
12 dnl set RR_BINARY_AGE and RR_INTERFACE_AGE to 0.
13 dnl
14 dnl if MAJOR or MINOR version changes, be sure to change AC_INIT above to match
15 dnl
16 RR_MAJOR_VERSION=4
17 RR_MINOR_VERSION=0
18 RR_MICRO_VERSION=17
19 RR_INTERFACE_AGE=0
20 RR_BINARY_AGE=0
21 RR_VERSION=$RR_MAJOR_VERSION.$RR_MINOR_VERSION
22
23 OBT_MAJOR_VERSION=4
24 OBT_MINOR_VERSION=0
25 OBT_MICRO_VERSION=0
26 OBT_INTERFACE_AGE=0
27 OBT_BINARY_AGE=0
28 OBT_VERSION=$OBT_MAJOR_VERSION.$OBT_MINOR_VERSION
29
30 AC_SUBST(RR_MAJOR_VERSION)
31 AC_SUBST(RR_MINOR_VERSION)
32 AC_SUBST(RR_MICRO_VERSION)
33 AC_SUBST(RR_INTERFACE_AGE)
34 AC_SUBST(RR_BINARY_AGE)
35 AC_SUBST(RR_VERSION)
36 AC_SUBST(OBT_MAJOR_VERSION)
37 AC_SUBST(OBT_MINOR_VERSION)
38 AC_SUBST(OBT_MICRO_VERSION)
39 AC_SUBST(OBT_INTERFACE_AGE)
40 AC_SUBST(OBT_BINARY_AGE)
41 AC_SUBST(OBT_VERSION)
42
43 dnl Libtool versioning
44 RR_RELEASE=$RR_MAJOR_VERSION.$RR_MINOR_VERSION
45 RR_CURRENT=`expr $RR_MICRO_VERSION - $RR_INTERFACE_AGE`
46 RR_REVISION=$RR_INTERFACE_AGE
47 RR_AGE=`expr $RR_BINARY_AGE - $RR_INTERFACE_AGE`
48 RR_CURRENT_MINUS_AGE=`expr $RR_CURRENT - $RR_AGE`
49
50 OBT_RELEASE=$OBT_MAJOR_VERSION.$OBT_MINOR_VERSION
51 OBT_CURRENT=`expr $OBT_MICRO_VERSION - $OBT_INTERFACE_AGE`
52 OBT_REVISION=$OBT_INTERFACE_AGE
53 OBT_AGE=`expr $OBT_BINARY_AGE - $OBT_INTERFACE_AGE`
54 OBT_CURRENT_MINUS_AGE=`expr $OBT_CURRENT - $OBT_AGE`
55
56 AC_SUBST(RR_RELEASE)
57 AC_SUBST(RR_CURRENT)
58 AC_SUBST(RR_REVISION)
59 AC_SUBST(RR_AGE)
60 AC_SUBST(RR_CURRENT_MINUS_AGE)
61 AC_SUBST(OBT_RELEASE)
62 AC_SUBST(OBT_CURRENT)
63 AC_SUBST(OBT_REVISION)
64 AC_SUBST(OBT_AGE)
65 AC_SUBST(OBT_CURRENT_MINUS_AGE)
66
67 AC_PREFIX_DEFAULT([/usr/local])
68 test "$prefix" = "NONE" && prefix=$ac_default_prefix
69
70 dnl Determine build target
71 OB_DEBUG
72 dnl Pick compiler specific/build target flags, and set $CVS
73 AM_PROG_CC_C_O
74 OB_COMPILER_FLAGS
75 AC_C_CONST
76 AC_C_INLINE
77
78 AC_PROG_LIBTOOL
79 AC_SUBST(LIBTOOL_DEPS)
80 LIBTOOL="$LIBTOOL --silent"
81
82 AC_PROG_INSTALL
83
84 AM_GNU_GETTEXT_VERSION(0.15)
85 AM_GNU_GETTEXT([external])
86
87 AC_CHECK_HEADERS(ctype.h fcntl.h locale.h signal.h string.h stdio.h stdlib.h)
88 AC_CHECK_HEADERS(unistd.h sys/stat.h sys/select.h sys/time.h sys/wait.h)
89 # AC_HEADER_TIME
90 # AC_TYPE_SIGNAL
91
92 AC_PATH_PROG([SED], [sed], [no])
93 if test "$SED" = "no"; then
94 AC_MSG_ERROR([The program "sed" is not available. This program is required to build Openbox.])
95 fi
96
97 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.14.0])
98 AC_SUBST(GLIB_CFLAGS)
99 AC_SUBST(GLIB_LIBS)
100
101 PKG_CHECK_MODULES(PANGO, [pango >= 1.8.0 pangoxft >= 1.8.0])
102 AC_SUBST(PANGO_CFLAGS)
103 AC_SUBST(PANGO_LIBS)
104
105 PKG_CHECK_MODULES(XML, [libxml-2.0 >= 2.6.0])
106 AC_SUBST(XML_CFLAGS)
107 AC_SUBST(XML_LIBS)
108
109 AC_ARG_ENABLE(startup-notification,
110 AC_HELP_STRING(
111 [--disable-startup-notification],
112 [disable the startup notification library. [[default=enabled]]]
113 ),
114 [enable_sn=$enableval],
115 [enable_sn=yes]
116 )
117
118 if test "$enable_sn" = yes; then
119 PKG_CHECK_MODULES(LIBSN, [libstartup-notification-1.0 >= 0.8],
120 [
121 AC_DEFINE(USE_LIBSN, [1], [Use startup-notification])
122 AC_SUBST(LIBSN_CFLAGS)
123 AC_SUBST(LIBSN_LIBS)
124 sn_found=yes
125 ],
126 [
127 sn_found=no
128 ]
129 )
130 else
131 sn_found=no
132 fi
133
134 AC_ARG_ENABLE(xcursor,
135 AC_HELP_STRING(
136 [--disable-xcursor],
137 [disable use of the X Cursor library. [[default=enabled]]]
138 ),
139 [enable_xcursor=$enableval],
140 [enable_xcursor=yes]
141 )
142
143 if test "$enable_xcursor" = yes; then
144 PKG_CHECK_MODULES(XCURSOR, [xcursor],
145 [
146 AC_DEFINE(USE_XCURSOR, [1], [Use X Cursor library])
147 AC_SUBST(XCURSOR_CFLAGS)
148 AC_SUBST(XCURSOR_LIBS)
149 xcursor_found=yes
150 ],
151 [
152 xcursor_found=no
153 ]
154 )
155 else
156 xcursor_found=no
157 fi
158
159 dnl Check for session management
160 X11_SM
161
162 #EFENCE_LIBS=-lefence
163 EFENCE_LIBS=""
164 AC_SUBST(EFENCE_LIBS)
165
166 dnl Check for X11 extensions
167 X11_EXT_XKB
168 X11_EXT_XRANDR
169 X11_EXT_SHAPE
170 X11_EXT_XINERAMA
171 X11_EXT_SYNC
172
173 AC_CONFIG_FILES([
174 Makefile
175 m4/Makefile
176 po/Makefile.in
177 render/obrender-4.0.pc
178 obt/obt-4.0.pc
179 render/version.h
180 obt/version.h
181 ])
182 AC_CONFIG_COMMANDS([doc],
183 [test -d doc || mkdir doc])
184 AC_CONFIG_COMMANDS([data],
185 [test -d data || mkdir data])
186 AC_CONFIG_COMMANDS([data/xsession],
187 [test -d data/xsession || mkdir data/xsession])
188 AC_OUTPUT
189
190 AC_MSG_RESULT
191 AC_MSG_RESULT([Compiling with these options:
192 Startup Notification... $sn_found
193 X Cursor Library... $xcursor_found
194 Session Management... $SM
195 ])
196 AC_MSG_RESULT([configure complete, now type "make"])
This page took 0.04219 seconds and 4 git commands to generate.