Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 954 lines (884 sloc) 24.887 kB
ec43479 @dpage Copyright updates
dpage authored
1 #######################################################################
2 #
3 # pgAdmin III - PostgreSQL Tools
c5ccafd @dpage Remove CVS/SVN ID tags.
dpage authored
4 #
2caa236 @dpage Copyright update
dpage authored
5 # Copyright (C) 2002 - 2009, The pgAdmin Development Team
405bf72 @dpage s/BSD Licence/PostgreSQL Licence
dpage authored
6 # This software is released under the PostgreSQL Licence
ec43479 @dpage Copyright updates
dpage authored
7 #
8 # acinclude.m4 - Build system scripts.
9 #
10 #######################################################################
11
4bdf4e6 @dpage Ensure a C++ compiler is actually installed per Joshua Drake
dpage authored
12 #################################
13 # Check there is a C++ compiler #
14 #################################
15
16 AC_DEFUN([CHECK_CPP_COMPILER],
17 [
9c386ea @dpage Fix some portability issues in the configure code [Max Khon]
dpage authored
18 if test "$ac_cv_prog_cxx_g" = no; then
477fa68 @dpage Fix typo
dpage authored
19 AC_MSG_ERROR([could not find a suitable C++ compiler to build pgAdmin])
4bdf4e6 @dpage Ensure a C++ compiler is actually installed per Joshua Drake
dpage authored
20 fi
21 ])
22
4ad771f @dpage Add support for Sun's compiler [Dhanaraj M]
dpage authored
23 #################################
24 # Check this is SUN compiler #
25 #################################
26
27 AC_DEFUN([CHECK_SUN_COMPILER],
28 [
29 $CC -V 2>test.txt
30 SUN_STR=`head -1 test.txt |cut -f2 -d" "`
31 rm -rf test.txt
32 if test "$SUN_STR" = "Sun"; then
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
33 SUN_CC_COMPILER=yes
4ad771f @dpage Add support for Sun's compiler [Dhanaraj M]
dpage authored
34 fi
35
36 $CXX -V 2>test.txt
37 SUN_STR=`head -1 test.txt |cut -f2 -d" "`
38 rm -rf test.txt
39 if test "$SUN_STR" = "Sun"; then
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
40 SUN_CXX_COMPILER=yes
4ad771f @dpage Add support for Sun's compiler [Dhanaraj M]
dpage authored
41 fi
42
43 ])
44
341ee7b Add m4 code needed to successfully bootstrap on systems that don't have
Ashesh Vashi authored
45 m4_include([lib-prefix.m4])
46 m4_include([lib-ld.m4])
47 m4_include([lib-link.m4])
48
fbb539a @dpage Updated build system from Adam, including addition of: --enable-stati…
dpage authored
49 #############################
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
50 # Override wxWidgets version #
fbb539a @dpage Updated build system from Adam, including addition of: --enable-stati…
dpage authored
51 #############################
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
52 AC_DEFUN([SET_WX_VERSION],
53 [
3d8b519 @dpage Update the autotools build system to build only the default system
dpage authored
54 AC_ARG_WITH(wx-version, [ --with-wx-version=<version> the wxWidgets version in major.minor format (default: 2.8)],
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
55 [
9c386ea @dpage Fix some portability issues in the configure code [Max Khon]
dpage authored
56 if test "$withval" = yes; then
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
57 AC_MSG_ERROR([you must specify a version number when using --with-wx-version=<version number>])
58 else
59 if test -z "$withval"; then
60 AC_MSG_ERROR([you must specify a version number when using --with-wx-version=<version number>])
61 else
62 WX_VERSION="$withval"
63 fi
64 fi
65 ],
66 [
e410a08 @dpage Update for wxWidgets 2.8
dpage authored
67 WX_VERSION="2.8"
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
68 ])
3c6f911 @dpage The attached patch provides the following changes/fixes:
dpage authored
69 ])
70
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
71 ####################
72 # Locate wxWidgets #
73 ####################
74 AC_DEFUN([LOCATE_WXWIDGETS],
75 [
3d8b519 @dpage Update the autotools build system to build only the default system
dpage authored
76 AC_ARG_WITH(wx, [ --with-wx=DIR root directory for wxWidgets installation],
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
77 [
78 if test "$withval" != no
79 then
80 WX_HOME="$withval"
3d8b519 @dpage Update the autotools build system to build only the default system
dpage authored
81 if test ! -f "${WX_HOME}/bin/wx-config"
82 then
83 AC_MSG_ERROR([Could not find your wxWidgets installation in ${WX_HOME}])
84 fi
b786f7b @dpage Don't forget to set WX_CONFIG and PG_CONFIG if --with-wx or --with-pg…
dpage authored
85
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
86 fi
b786f7b @dpage Don't forget to set WX_CONFIG and PG_CONFIG if --with-wx or --with-pg…
dpage authored
87 WX_CONFIG=${WX_HOME}/bin/wx-config
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
88 ],
89 [
90 WX_HOME=/usr/local/wx2
91 if test ! -f "${WX_HOME}/bin/wx-config"
92 then
93 WX_HOME=/usr/local
94 if test ! -f "${WX_HOME}/bin/wx-config"
95 then
96 WX_HOME=/usr
97 if test ! -f "${WX_HOME}/bin/wx-config"
98 then
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
99 # Search the path
b22d86c @dpage Check for *-config binaries in the path as well as normal locations, …
dpage authored
100 AC_PATH_PROGS(WX_CONFIG, wx-config)
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
101 if test ! -f "${WX_CONFIG}"
b22d86c @dpage Check for *-config binaries in the path as well as normal locations, …
dpage authored
102 then
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
103 AC_MSG_ERROR([Could not find your wxWidgets installation. You might need to use the --with-wx=DIR configure option])
104 else
b22d86c @dpage Check for *-config binaries in the path as well as normal locations, …
dpage authored
105 WX_HOME=`${WX_CONFIG} --prefix`
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
106 fi
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
107 fi
108 fi
109 fi
110 WX_CONFIG=${WX_HOME}/bin/wx-config
111 ])
65e1865 @dpage Ensure we know what wxVersion we are building with. Allow the user to…
dpage authored
112 ])
113
2bff114 @dpage Check the wxWidgets version during configure, per Kris Jurka
dpage authored
114 ###########################
115 # Check wxWidgets version #
116 ###########################
117 AC_DEFUN([CHECK_WXWIDGETS],
118 [
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
119 AC_MSG_CHECKING(wxWidgets version)
120 TMP_WX_VERSION=`${WX_CONFIG} --version=${WX_VERSION} --version 2> /dev/null`
121 if test "$TMP_WX_VERSION" = ""
122 then
123 AC_MSG_RESULT(failed)
124 AC_MSG_ERROR([The version of wxWidgets required (${WX_VERSION}) is not supported by the installations in ${WX_HOME}.])
125 fi
126 changequote(<<. >>)dnl
127 WX_MAJOR=`expr ${TMP_WX_VERSION} : '\([0-9]*\)'`
128 WX_MINOR=`expr ${TMP_WX_VERSION} : '[0-9]*\.\([0-9]*\)'`
129 changequote([, ])dnl
130 if test "$WX_MAJOR" -lt 2; then
131 AC_MSG_ERROR([wxWidgets 2.8.0 or newer is required to build pgAdmin])
132 fi
133 if test "$WX_MAJOR" -eq 2 && test "$WX_MINOR" -lt 8; then
134 AC_MSG_ERROR([wxWidgets 2.8.0 or newer is required to build pgAdmin])
135 fi
136 AC_MSG_RESULT(ok)
2bff114 @dpage Check the wxWidgets version during configure, per Kris Jurka
dpage authored
137 ])
138
139
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
140 #####################
cecafec @dpage Search for libxml2 in /mingw
dpage authored
141 # Locate libxml #
7b2d03e @dpage Add a 'Favourites' query organiser to the Query Tool. Note; this adds…
dpage authored
142 #####################
143 AC_DEFUN([LOCATE_LIBXML2],
144 [
3d8b519 @dpage Update the autotools build system to build only the default system
dpage authored
145 AC_ARG_WITH(libxml2, [ --with-libxml2=DIR root directory for libxml2 installation],
cecafec @dpage Search for libxml2 in /mingw
dpage authored
146 [
147 if test "$withval" != no
148 then
149 XML2_HOME="$withval"
150 if test ! -f "${XML2_HOME}/bin/xml2-config"
151 then
152 AC_MSG_ERROR([Could not find your libxml2 installation in ${XML2_HOME}])
153 fi
154 fi
155 XML2_CONFIG=${XML2_HOME}/bin/xml2-config
7b2d03e @dpage Add a 'Favourites' query organiser to the Query Tool. Note; this adds…
dpage authored
156 ],
157 [
cecafec @dpage Search for libxml2 in /mingw
dpage authored
158 XML2_HOME=/usr/local
159 if test ! -f "${XML2_HOME}/bin/xml2-config"
160 then
161
162 XML2_HOME=/usr
163 if test ! -f "${XML2_HOME}/bin/xml2-config"
164 then
165 XML2_HOME=/mingw
166 if test ! -f "${XML2_HOME}/bin/xml2-config"
167 then
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
168 # Search the path
b22d86c @dpage Check for *-config binaries in the path as well as normal locations, …
dpage authored
169 AC_PATH_PROGS(XML2_CONFIG, xml2-config)
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
170 if test ! -f "${XML2_CONFIG}"
b22d86c @dpage Check for *-config binaries in the path as well as normal locations, …
dpage authored
171 then
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
172 AC_MSG_ERROR([Could not find your libxml2 installation. You might need to use the --with-libxml2=DIR configure option])
173 else
b22d86c @dpage Check for *-config binaries in the path as well as normal locations, …
dpage authored
174 XML2_HOME=`${XML2_CONFIG} --prefix`
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
175 fi
cecafec @dpage Search for libxml2 in /mingw
dpage authored
176 fi
177 fi
178 fi
179 XML2_CONFIG=${XML2_HOME}/bin/xml2-config
7b2d03e @dpage Add a 'Favourites' query organiser to the Query Tool. Note; this adds…
dpage authored
180 ])
181 ])
182
585cec5 @dpage Ensure we use a working version of libxml2.
dpage authored
183 #########################
184 # Check libxml2 version #
185 #########################
186 AC_DEFUN([CHECK_LIBXML2],
187 [
3c82f0d @dpage Couple of minor tweaks
dpage authored
188 AC_MSG_CHECKING(libxml2 version)
585cec5 @dpage Ensure we use a working version of libxml2.
dpage authored
189 XML2_VERSION=`${XML2_CONFIG} --version`
190 changequote(<<. >>)dnl
191 XML2_MAJOR=`expr ${XML2_VERSION} : '\([0-9]*\)'`
192 XML2_MINOR=`expr ${XML2_VERSION} : '[0-9]*\.\([0-9]*\)'`
193 XML2_REVISION=`expr ${XML2_VERSION} : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
194 changequote([, ])dnl
195 if test "$XML2_MAJOR" -lt 2; then
ea56309 @dpage Fix typo per Devrim
dpage authored
196 AC_MSG_ERROR([libxml2 2.6.18 or newer is required to build pgAdmin])
585cec5 @dpage Ensure we use a working version of libxml2.
dpage authored
197 fi
198 if test "$XML2_MAJOR" -eq 2 && test "$XML2_MINOR" -lt 6; then
ea56309 @dpage Fix typo per Devrim
dpage authored
199 AC_MSG_ERROR([libxml2 2.6.18 or newer is required to build pgAdmin])
585cec5 @dpage Ensure we use a working version of libxml2.
dpage authored
200 fi
201 if test "$XML2_MAJOR" -eq 2 && test "$XML2_MINOR" -eq 6 && test "$XML2_REVISION" -lt 18; then
ea56309 @dpage Fix typo per Devrim
dpage authored
202 AC_MSG_ERROR([libxml2 2.6.18 or newer is required to build pgAdmin])
585cec5 @dpage Ensure we use a working version of libxml2.
dpage authored
203 fi
41c8bcc @dpage Show test result
dpage authored
204 AC_MSG_RESULT(ok)
585cec5 @dpage Ensure we use a working version of libxml2.
dpage authored
205 ])
206
207
7b2d03e @dpage Add a 'Favourites' query organiser to the Query Tool. Note; this adds…
dpage authored
208 #####################
55e2372 @dpage Generate reports in XML, then use XSLT to transform them as required.
dpage authored
209 # Locate libxslt #
210 #####################
211 AC_DEFUN([LOCATE_LIBXSLT],
212 [
3d8b519 @dpage Update the autotools build system to build only the default system
dpage authored
213 AC_ARG_WITH(libxslt, [ --with-libxslt=DIR root directory for libxslt installation],
55e2372 @dpage Generate reports in XML, then use XSLT to transform them as required.
dpage authored
214 [
215 if test "$withval" != no
216 then
217 XSLT_HOME="$withval"
218 if test ! -f "${XSLT_HOME}/bin/xslt-config"
219 then
220 AC_MSG_ERROR([Could not find your libxslt installation in ${XSLT_HOME}])
221 fi
222 fi
223 XSLT_CONFIG=${XSLT_HOME}/bin/xslt-config
224 ],
225 [
226 XSLT_HOME=/usr/local
227 if test ! -f "${XSLT_HOME}/bin/xslt-config"
228 then
229
230 XSLT_HOME=/usr
231 if test ! -f "${XSLT_HOME}/bin/xslt-config"
232 then
233 XSLT_HOME=/mingw
234 if test ! -f "${XSLT_HOME}/bin/xslt-config"
235 then
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
236 # Search the path
b22d86c @dpage Check for *-config binaries in the path as well as normal locations, …
dpage authored
237 AC_PATH_PROGS(XSLT_CONFIG, xslt-config)
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
238 if test ! -f "${XSLT_CONFIG}"
b22d86c @dpage Check for *-config binaries in the path as well as normal locations, …
dpage authored
239 then
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
240 AC_MSG_ERROR([Could not find your libxslt installation. You might need to use the --with-libxslt=DIR configure option])
241 else
b22d86c @dpage Check for *-config binaries in the path as well as normal locations, …
dpage authored
242 XSLT_HOME=`${XSLT_CONFIG} --prefix`
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
243 fi
55e2372 @dpage Generate reports in XML, then use XSLT to transform them as required.
dpage authored
244 fi
245 fi
246 fi
247 XSLT_CONFIG=${XSLT_HOME}/bin/xslt-config
248 ])
249 ])
250
251 #####################
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
252 # Locate PostgreSQL #
253 #####################
254 AC_DEFUN([LOCATE_POSTGRESQL],
255 [
cecafec @dpage Search for libxml2 in /mingw
dpage authored
256 AC_ARG_WITH(pgsql, [ --with-pgsql=DIR root directory for PostgreSQL installation],
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
257 [
258 if test "$withval" != no
259 then
260 PG_HOME="$withval"
cecafec @dpage Search for libxml2 in /mingw
dpage authored
261 if test ! -f "${PG_HOME}/bin/pg_config"
262 then
263 AC_MSG_ERROR([Could not find your PostgreSQL installation in ${PG_HOME}])
264 fi
b786f7b @dpage Don't forget to set WX_CONFIG and PG_CONFIG if --with-wx or --with-pg…
dpage authored
265
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
266 fi
b786f7b @dpage Don't forget to set WX_CONFIG and PG_CONFIG if --with-wx or --with-pg…
dpage authored
267 PG_CONFIG=${PG_HOME}/bin/pg_config
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
268 ],
269 [
270 PG_HOME=/usr/local/pgsql
271 if test ! -f "${PG_HOME}/bin/pg_config"
272 then
273 PG_HOME=/usr/local
274 if test ! -f "${PG_HOME}/bin/pg_config"
275 then
276 PG_HOME=/usr
277 if test ! -f "${PG_HOME}/bin/pg_config"
278 then
b22d86c @dpage Check for *-config binaries in the path as well as normal locations, …
dpage authored
279 # Search the path
280 AC_PATH_PROGS(PG_CONFIG, pg_config)
281 if test ! -f "${PG_CONFIG}"
282 then
283 AC_MSG_ERROR([Could not find your PostgreSQL installation. You might need to use the --with-pgsql=DIR configure option])
284 else
285 PG_HOME=`${PG_CONFIG} --bindir | sed "s/\/bin$//"`
286 fi
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
287 fi
288 fi
289 fi
290 PG_CONFIG=${PG_HOME}/bin/pg_config
291 ])
3c6f911 @dpage The attached patch provides the following changes/fixes:
dpage authored
292 ])
293
2d85533 @gleu Use sphinx documentation system
gleu authored
294 #################
295 # Locate Sphinx #
296 #################
297 AC_DEFUN([LOCATE_SPHINX],
298 [
299 AC_ARG_WITH(sphinx-build, [ --with-sphinx-build=FILE sphinx-build executable to build the docs with],
300 [
301 if test "$withval" != no
302 then
303 SPHINX_BUILD="$withval"
304 if test ! -f "${SPHINX_BUILD}"
305 then
306 AC_MSG_ERROR([Could not find your sphinx-build executable ${SPHINX_BUILD}])
307 fi
308
309 fi
310 ],
311 [
312 SPHINX_BUILD=/usr/local/bin/sphinx-build
313 if test ! -f "${SPHINX_BUILD}"
314 then
315 SPHINX_BUILD=/usr/bin/sphinx-build
316 if test ! -f "${SPHINX_BUILD}"
317 then
318 # Search the path
319 SPHINX_BUILD=""
320 AC_PATH_PROGS(SPHINX_BUILD, sphinx-build sphinx-build-2.7 sphinx-build-2.6, "")
321 if test ! -f "${SPHINX_BUILD}"
322 then
323 AC_MSG_WARN([Could not find your sphinx-build executable. You might need to use the --with-sphinx-build=FILE configure option])
324 fi
325 fi
326 fi
327 ])
328 ])
329 AC_SUBST(SPHINX_BUILD)
330
926bd69 @gleu Database designer is now not compiled by default
gleu authored
331 ########################################
332 # Enable Database Designer in pgAdmin3 #
333 ########################################
334 AC_DEFUN([ENABLE_DATABASEDESIGNER],
335 [
336 AC_ARG_ENABLE(databasedesigner, [ --enable-databasedesigner build the database designer of pgAdmin3],
337 [
338 if test "$enableval" = yes
339 then
340 HAVE_DATABASEDESIGNER=yes
341 else
342 HAVE_DATABASEDESIGNER=no
343 fi
344 ],
345 [
346 HAVE_DATABASEDESIGNER=no
347 ])
348 ])
349 AC_SUBST(HAVE_DATABASEDESIGNER)
350
fbb539a @dpage Updated build system from Adam, including addition of: --enable-stati…
dpage authored
351 ###########################
352 # Debug build of pgAdmin3 #
353 ###########################
354 AC_DEFUN([ENABLE_DEBUG],
9d010ab @dpage Make sure that --disable-xxx works as expected.
dpage authored
355 [
3d8b519 @dpage Update the autotools build system to build only the default system
dpage authored
356 AC_ARG_ENABLE(debug, [ --enable-debug build a debug version of pgAdmin3],
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
357 [
358 if test "$enableval" = yes
359 then
360 BUILD_DEBUG=yes
361 else
362 BUILD_DEBUG=no
363 fi
364 ],
365 [
366 BUILD_DEBUG=no
367 ])
a5e72f8 @dpage Attached is a patch to autoconf which makes the following changes:
dpage authored
368 ])
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
369 AC_SUBST(BUILD_DEBUG)
a5e72f8 @dpage Attached is a patch to autoconf which makes the following changes:
dpage authored
370
fbb539a @dpage Updated build system from Adam, including addition of: --enable-stati…
dpage authored
371 ############################
d39cdd8 @dpage Fix static build.
dpage authored
372 # Static build of pgAdmin3 #
373 ############################
374 AC_DEFUN([ENABLE_STATIC],
9d010ab @dpage Make sure that --disable-xxx works as expected.
dpage authored
375 [
3d8b519 @dpage Update the autotools build system to build only the default system
dpage authored
376 AC_ARG_ENABLE(static, [ --enable-static build a statically linked version of pgAdmin3],
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
377 [
378 if test "$enableval" = yes
379 then
380 BUILD_STATIC=yes
381 WX_STATIC="--static=yes"
382 else
383 BUILD_STATIC=no
384 WX_STATIC="--static=no"
385 fi
386 ],
387 [
388 BUILD_STATIC=no
389 WX_STATIC="--static=no"
390 ])
d39cdd8 @dpage Fix static build.
dpage authored
391 ])
392
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
393 #################################
394 # Override the OSX architecture #
395 #################################
3d8b519 @dpage Update the autotools build system to build only the default system
dpage authored
396 AC_DEFUN([SETUP_ARCH_I386],
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
397 [
3d8b519 @dpage Update the autotools build system to build only the default system
dpage authored
398 AC_ARG_WITH(arch-i386, [ --with-arch-i386 include an i386 image in an OS X Universal build],
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
399 [
3d8b519 @dpage Update the autotools build system to build only the default system
dpage authored
400 if test "$withval" = "yes"
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
401 then
3d8b519 @dpage Update the autotools build system to build only the default system
dpage authored
402 OSX_ARCH="$OSX_ARCH -arch i386"
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
403 fi
404 ])
405 ])
3d8b519 @dpage Update the autotools build system to build only the default system
dpage authored
406 AC_DEFUN([SETUP_ARCH_X86_64],
ee1ac27 @dpage Dirty hack to avoid having png2c link with libpq.
dpage authored
407 [ AC_ARG_WITH(arch-x86_64, [ --with-arch-x86_64 include an x86_64 image in an OS X Universal build],
408 [
409 if test "$withval" = "yes"
410 then
411 OSX_ARCH="$OSX_ARCH -arch x86_64"
412 fi
413 ])
3d8b519 @dpage Update the autotools build system to build only the default system
dpage authored
414 ])
415 AC_DEFUN([SETUP_ARCH_PPC],
ee1ac27 @dpage Dirty hack to avoid having png2c link with libpq.
dpage authored
416 [ AC_ARG_WITH(arch-ppc, [ --with-arch-ppc include a PPC image in an OS X Universal build],
417 [
418 if test "$withval" = "yes"
419 then
420 OSX_ARCH="$OSX_ARCH -arch ppc"
421 fi
422 ])
3d8b519 @dpage Update the autotools build system to build only the default system
dpage authored
423 ])
424 AC_DEFUN([SETUP_ARCH_PPC64],
ee1ac27 @dpage Dirty hack to avoid having png2c link with libpq.
dpage authored
425 [ AC_ARG_WITH(arch-ppc64, [ --with-arch-ppc64 include a PPC64 image in an OS X Universal build],
426 [
427 if test "$withval" = "yes"
428 then
429 OSX_ARCH="$OSX_ARCH -arch ppc64"
430 fi
431 ])
3d8b519 @dpage Update the autotools build system to build only the default system
dpage authored
432 ])
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
433
36117a9 @dpage Fix configure to allow the wxWidgets version to be specified by the u…
dpage authored
434 ##########################
435 # Build a Mac App Bundle #
436 ##########################
4a05dcc @dpage Mask the password on the main tab of the user properties dialogue [Hi…
dpage authored
437 AC_DEFUN([ENABLE_APPBUNDLE],
9d010ab @dpage Make sure that --disable-xxx works as expected.
dpage authored
438 [
3d8b519 @dpage Update the autotools build system to build only the default system
dpage authored
439 AC_ARG_ENABLE(appbundle, [ --enable-appbundle Build a Mac OS X appbundle],
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
440 [
441 if test "$enableval" = yes
442 then
443 BUILD_APPBUNDLE=yes
444 prefix=$(pwd)/tmp
445 bundledir="$(pwd)/pgAdmin3.app"
446 bindir="$bundledir/Contents/MacOS"
447 datadir="$bundledir/Contents/SharedSupport"
448 AC_SUBST(bundledir)
449 else
450 BUILD_APPBUNDLE=no
451 fi
452 ],
453 [
454 BUILD_APPBUNDLE=no
455 ])
63d756c @dpage Here is the latest autoconf code. Because you wanted the files in
dpage authored
456 ])
457
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
458 #########################################
459 # Check for libpq libraries and headers #
460 #########################################
461 AC_DEFUN([SETUP_POSTGRESQL],
462 [
463 if test -n "${PG_HOME}"
464 then
b22d86c @dpage Check for *-config binaries in the path as well as normal locations, …
dpage authored
465 PG_LIB=`${PG_CONFIG} --libdir`
466
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
467 PGSQL_OLD_LDFLAGS="$LDFLAGS"
468 PGSQL_OLD_CPPFLAGS="$CPPFLAGS"
09d28e7 @dpage Tweaks for Solaris
dpage authored
469
b4ed462 @dpage Add checks for kerberos and ssl [Zdenek Kotala]
dpage authored
470 AC_LANG_SAVE
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
471 AC_LANG_C
b4ed462 @dpage Add checks for kerberos and ssl [Zdenek Kotala]
dpage authored
472 AC_CHECK_LIB(ssl, SSL_library_init, [LIB_SSL=yes], [LIB_SSL=no])
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
473 AC_LANG_RESTORE
b4ed462 @dpage Add checks for kerberos and ssl [Zdenek Kotala]
dpage authored
474
475 AC_LANG_SAVE
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
476 AC_LANG_C
b4ed462 @dpage Add checks for kerberos and ssl [Zdenek Kotala]
dpage authored
477 AC_CHECK_LIB(krb5, krb5_sendauth, [LIB_KRB5=yes], [LIB_KRB5=no])
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
478 AC_LANG_RESTORE
b4ed462 @dpage Add checks for kerberos and ssl [Zdenek Kotala]
dpage authored
479
480
6a02db2 @dpage Fix SSL test on Mac
dpage authored
481 # Solaris/Mac need -lssl for this test
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
482 case "${host}" in
6a02db2 @dpage Fix SSL test on Mac
dpage authored
483 *solaris* | *-apple-darwin*)
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
484 if test "$LIB_SSL" = "yes"
b4ed462 @dpage Add checks for kerberos and ssl [Zdenek Kotala]
dpage authored
485 then
486 LDFLAGS="$LDFLAGS -L${PG_LIB} -lssl"
487 else
488 LDFLAGS="$LDFLAGS -L${PG_LIB}"
489 fi
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
490 ;;
491 *)
b22d86c @dpage Check for *-config binaries in the path as well as normal locations, …
dpage authored
492 LDFLAGS="$LDFLAGS -L${PG_LIB}"
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
493 ;;
494 esac
c0f25c2 @dpage Properly detect SSL
dpage authored
495
b22d86c @dpage Check for *-config binaries in the path as well as normal locations, …
dpage authored
496
ee1ac27 @dpage Dirty hack to avoid having png2c link with libpq.
dpage authored
497 # Check for PQexec (basic sanity check!)
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
498 if test "$BUILD_STATIC" = "yes"
499 then
500 AC_MSG_CHECKING(for PQexec in libpq.a)
501 if test "$(nm ${PG_LIB}/libpq.a | grep -c PQexec)" -gt 0
502 then
503 AC_MSG_RESULT(present)
504 PG_LIBPQ="yes"
505 else
506 AC_MSG_RESULT(not present)
507 PG_LIBPQ="no"
508 fi
509 else
510 AC_LANG_SAVE
511 AC_LANG_C
512 AC_CHECK_LIB(pq, PQexec, [PG_LIBPQ=yes], [PG_LIBPQ=no])
513 AC_LANG_RESTORE
514 fi
bf635aa @dpage Add support to the debugger for capture of OUT/INOUT params from edbs…
dpage authored
515
ee1ac27 @dpage Dirty hack to avoid having png2c link with libpq.
dpage authored
516 # Check for PQconninfoParse
517 if test "$BUILD_STATIC" = "yes"
518 then
519 AC_MSG_CHECKING(for PQconninfoParse in libpq.a)
520 if test "$(nm ${PG_LIB}/libpq.a | grep -c PQconninfoParse)" -gt 0
521 then
522 AC_MSG_RESULT(present)
523 HAVE_CONNINFO_PARSE="yes"
524 else
525 AC_MSG_RESULT(not present)
526 HAVE_CONNINFO_PARSE="no"
527 fi
528 else
529 AC_LANG_SAVE
530 AC_LANG_C
531 AC_CHECK_LIB(pq, PQconninfoParse, [HAVE_CONNINFO_PARSE=yes], [HAVE_CONNINFO_PARSE=no])
532 AC_LANG_RESTORE
533 fi
bf635aa @dpage Add support to the debugger for capture of OUT/INOUT params from edbs…
dpage authored
534
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
535 AC_LANG_SAVE
536 AC_LANG_C
9fc5c74 Ensure that libkrb5.a is mentioned when required (libpq depends on it at
Raphael Enrici authored
537
b4ed462 @dpage Add checks for kerberos and ssl [Zdenek Kotala]
dpage authored
538 if test "$LIB_SSL" = "yes"
539 then
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
540 # Check for SSL support
541 if test "$BUILD_STATIC" = "yes"
542 then
543 AC_MSG_CHECKING(for SSL_connect in libpq.a)
544 if test "$(nm ${PG_LIB}/libpq.a | grep -c SSL_connect)" -gt 0
545 then
546 AC_MSG_RESULT(present)
547 PG_SSL="yes"
548 else
549 AC_MSG_RESULT(not present)
550 PG_SSL="no"
551 fi
552 else
553 if test "$build_cpu-$build_vendor" = "powerpc-apple" -o "$build_cpu-$build_vendor" = "i386-apple" -o "$build_cpu-$build_vendor" = "i686-apple"
554 then
555 AC_MSG_CHECKING(for SSL_connect in -lpq)
556 if test "$(otool -L ${PG_LIB}/libpq.?.dylib | grep -c libssl)" -gt 0
557 then
558 AC_MSG_RESULT(present)
559 PG_SSL="yes"
560 else
561 AC_MSG_RESULT(not present)
562 PG_SSL="no"
563 fi
564 else
8744545 @gleu Allow SSL use
gleu authored
565 AC_CHECK_LIB(pq, SSL_connect, [PG_SSL=yes], [PG_SSL=no], "-lssl")
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
566 fi
567 fi
b4ed462 @dpage Add checks for kerberos and ssl [Zdenek Kotala]
dpage authored
568 else
569 PG_SSL="no"
570 fi
bf635aa @dpage Add support to the debugger for capture of OUT/INOUT params from edbs…
dpage authored
571
b4ed462 @dpage Add checks for kerberos and ssl [Zdenek Kotala]
dpage authored
572 if test "$LIB_KRB5" = "yes"
573 then
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
574 # Check for Kerberos support
b4ed462 @dpage Add checks for kerberos and ssl [Zdenek Kotala]
dpage authored
575
576 LDFLAGS="$LDFLAGS -lkrb5"
577
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
578 if test "$BUILD_STATIC" = "yes"
579 then
580 AC_MSG_CHECKING(for krb5_free_principal in libpq.a)
581 if test "$(nm ${PG_LIB}/libpq.a | grep -c krb5_free_principal)" -gt 0
582 then
583 AC_MSG_RESULT(present)
584 PG_KRB5="yes"
585 else
586 AC_MSG_RESULT(not present)
587 PG_KRB5="no"
588 fi
589 else
590 if test "$build_cpu-$build_vendor" = "powerpc-apple" -o "$build_cpu-$build_vendor" = "i386-apple" -o "$build_cpu-$build_vendor" = "i686-apple"
591 then
592 AC_MSG_CHECKING(for krb5_free_principle in -lpq)
593 if test "$(otool -L ${PG_LIB}/libpq.?.dylib | grep -c libkrb5)" -gt 0
594 then
595 AC_MSG_RESULT(present)
596 PG_KRB5="yes"
597 else
598 AC_MSG_RESULT(not present)
599 PG_KRB5="no"
600 fi
601 else
602 AC_CHECK_LIB(pq, krb5_free_principal, [PG_KRB5=yes], [PG_KRB5=no])
603 fi
604 fi
b4ed462 @dpage Add checks for kerberos and ssl [Zdenek Kotala]
dpage authored
605 else
606 PG_KRB5="no"
607 fi
9fc5c74 Ensure that libkrb5.a is mentioned when required (libpq depends on it at
Raphael Enrici authored
608
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
609 AC_LANG_RESTORE
c0f25c2 @dpage Properly detect SSL
dpage authored
610
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
611 PG_INCLUDE=`${PG_CONFIG} --includedir`
4f63f7c @gleu Handle the server include directory
gleu authored
612 PG_SVRINCLUDE=`${PG_CONFIG} --includedir-server`
08c2f73 Add pkgincludedir to the list of includes
Ashesh Vashi authored
613 PG_PKGINCLUDE=`${PG_CONFIG} --pkgincludedir`
4f63f7c @gleu Handle the server include directory
gleu authored
614 CPPFLAGS="$CPPFLAGS -I${PG_INCLUDE} -I${PG_SVRINCLUDE} -I${PG_PKGINCLUDE}"
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
615
616 PG_VERSION=`${PG_CONFIG} --version`
ce27b2a @dpage Tweaks for Mingw
dpage authored
617
618 if test "$build_os" = "mingw32"
619 then
620 CRYPTO_LIB=""
621 else
622 CRYPTO_LIB="-lcrypto"
623 fi
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
624
625 if test "$BUILD_STATIC" = "yes"
626 then
c097753 @dpage Some versions of automake give us i386-apple-darwin instead of 1686-a…
dpage authored
627 if test "$build_cpu-$build_vendor" = "powerpc-apple" -o "$build_cpu-$build_vendor" = "i386-apple" -o "$build_cpu-$build_vendor" = "i686-apple"
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
628 then
629 CRYPT_LIB=""
630 else
631 CRYPT_LIB="-lcrypt"
632 fi
c0f25c2 @dpage Properly detect SSL
dpage authored
633
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
634 if test "$PG_SSL" = "yes"
635 then
ce27b2a @dpage Tweaks for Mingw
dpage authored
636 LIBS="${PG_LIB}/libpq.a $CRYPT_LIB $LIBS -lssl $CRYPTO_LIB"
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
637 else
ce27b2a @dpage Tweaks for Mingw
dpage authored
638 LIBS="${PG_LIB}/libpq.a $CRYPT_LIB $LIBS $CRYPTO_LIB"
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
639 fi
9fc5c74 Ensure that libkrb5.a is mentioned when required (libpq depends on it at
Raphael Enrici authored
640
641 if test "$PG_KRB5" = "yes"
642 then
643 LIBS="$LIBS -lkrb5"
644 fi
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
645 else
646 if test "$PG_SSL" = "yes"
647 then
98abe0e @dpage Don't double-link libssl/libcrypto [Loïc Minier]
dpage authored
648 LIBS="$LIBS -L${PG_LIB} -lpq"
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
649 else
ce27b2a @dpage Tweaks for Mingw
dpage authored
650 LIBS="$LIBS -L${PG_LIB} $CRYPTO_LIB -lpq"
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
651 fi
652 fi
c0f25c2 @dpage Properly detect SSL
dpage authored
653
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
654 AC_LANG_SAVE
655 AC_LANG_C
656 AC_CHECK_HEADER(libpq-fe.h, [PG_LIBPQFE=yes], [PG_LIBPQFE=no])
657 AC_LANG_RESTORE
62ac01c @dpage The attached patch should solve this pesky SSL bug once and for all.
dpage authored
658
ce27b2a @dpage Tweaks for Mingw
dpage authored
659 if test "$PG_LIBPQ" = "yes"
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
660 then
661 AC_MSG_CHECKING(PostgreSQL in ${PG_HOME})
662 AC_MSG_RESULT(ok)
663 else
664 AC_MSG_CHECKING(PostgreSQL in ${PG_HOME})
665 AC_MSG_RESULT(failed)
666 LDFLAGS="$PGSQL_OLD_LDFLAGS"
667 CPPFLAGS="$PGSQL_OLD_CPPFLAGS"
d898c89 @dpage Check for the presence of PQconninfoParse in libpq when configuring, per
dpage authored
668 AC_MSG_ERROR([you must specify a valid PostgreSQL 8.4+ installation with --with-pgsql=DIR])
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
669 fi
63d756c @dpage Here is the latest autoconf code. Because you wanted the files in
dpage authored
670
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
671 if test "$PG_SSL" = "yes"
672 then
21049ce @akshay-joshi Add SSH tunneling support.
akshay-joshi authored
673 CPPFLAGS="$CPPFLAGS -DPG_SSL"
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
674 fi
02644e5 @gleu Better detection of PQconninfoParse function
gleu authored
675 if test "$HAVE_CONNINFO_PARSE" = "yes"
676 then
677 CPPFLAGS="$CPPFLAGS -DHAVE_CONNINFO_PARSE"
678 fi
926bd69 @gleu Database designer is now not compiled by default
gleu authored
679 if test "$HAVE_DATABASEDESIGNER" = "yes"
680 then
681 CPPFLAGS="$CPPFLAGS -DDATABASEDESIGNER"
682 fi
ee1ac27 @dpage Dirty hack to avoid having png2c link with libpq.
dpage authored
683
684 # Avoid linking with things we don't need. Really this is a hack
685 # to prevent png2c linking with libpq with gcc on non-OSX OSs
686 if test "$SUN_CC_COMPILER" != "yes"
687 then
688 case "${host}" in
689 *-apple-darwin*)
690 ;;
53fd51e @risto3 Don't use --as-needed on Solaris.
risto3 authored
691 *solaris*)
692 LDFLAGS="$LDFLAGS"
693 ;;
ee1ac27 @dpage Dirty hack to avoid having png2c link with libpq.
dpage authored
694 *)
695 LDFLAGS="$LDFLAGS -Wl,-as-needed"
696 ;;
697 esac
698 fi
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
699 fi
fbb539a @dpage Updated build system from Adam, including addition of: --enable-stati…
dpage authored
700 ])
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
701 AC_SUBST(PG_CONFIG)
63d756c @dpage Here is the latest autoconf code. Because you wanted the files in
dpage authored
702
bf635aa @dpage Add support to the debugger for capture of OUT/INOUT params from edbs…
dpage authored
703 #######################################################
704 # Check for extended libpq functions in EnterpriseDB #
705 #######################################################
706 AC_DEFUN([CHECK_EDB_LIBPQ],
707 [
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
708 if test "$BUILD_STATIC" = "yes"
709 then
710 AC_MSG_CHECKING(for PQgetOutResult in libpq.a)
711 if test "$(nm ${PG_LIB}/libpq.a | grep -c PQgetOutResult)" -gt 0
712 then
713 AC_MSG_RESULT(present)
714 EDB_LIBPQ="yes"
715 else
716 AC_MSG_RESULT(not present)
717 EDB_LIBPQ="no"
718 fi
719 else
720 AC_LANG_SAVE
721 AC_LANG_C
722 AC_CHECK_LIB(pq, PQgetOutResult, [EDB_LIBPQ=yes], [EDB_LIBPQ=no])
723 AC_LANG_RESTORE
724 fi
bf635aa @dpage Add support to the debugger for capture of OUT/INOUT params from edbs…
dpage authored
725 ])
726 AC_SUBST(EDB_LIBPQ)
727
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
728 ################################################
cecafec @dpage Search for libxml2 in /mingw
dpage authored
729 # Check for wxWidgets libraries and headers #
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
730 ################################################
731 AC_DEFUN([SETUP_WXWIDGETS],
732 [
733 if test -n "${WX_HOME}"
734 then
735 LDFLAGS="$LDFLAGS -L${WX_HOME}/lib"
736 WX_OLD_LDFLAGS="$LDFLAGS"
737 WX_OLD_CPPFLAGS="$CPPFLAGS"
ed43d9b @dpage Cleanup *nix build in an attempt to fix the debug/non debug compile/l…
dpage authored
738
9c386ea @dpage Fix some portability issues in the configure code [Max Khon]
dpage authored
739 if test "$BUILD_DEBUG" = yes
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
740 then
3c82f0d @dpage Couple of minor tweaks
dpage authored
741 WX_NEW_CPPFLAGS=`${WX_CONFIG} --cppflags --unicode=yes --debug=yes --version=${WX_VERSION} 2> /dev/null`
a092a9e @dpage Additional cleanup of the build system as discussed at FOSDEM:
dpage authored
742 CPPFLAGS="$CPPFLAGS $WX_NEW_CPPFLAGS"
743 CFLAGS=`echo $CFLAGS | sed -e "s/-O2/-O0/g"`
744 CXXFLAGS=`echo $CXXFLAGS | sed -e "s/-O2/-O0/g"`
ed43d9b @dpage Cleanup *nix build in an attempt to fix the debug/non debug compile/l…
dpage authored
745
573638f @petergeoghegan Another set of wx2.9 updates. This patch includes the merge of wxOGL
petergeoghegan authored
746 pgadmin3_LDADD=`${WX_CONFIG} ${WX_STATIC} --libs std,stc,aui --unicode=yes --debug=yes --version=${WX_VERSION} 2> /dev/null`
165dbcc @mhagander pgScript - a scripting language for PostgreSQL/pgAdmin
mhagander authored
747 pgsTest_LDADD=`${WX_CONFIG} ${WX_STATIC} --libs base,core,xml --unicode=yes --debug=yes --version=${WX_VERSION} 2> /dev/null`
748 pgScript_LDADD=`${WX_CONFIG} ${WX_STATIC} --libs base,core,xml --unicode=yes --debug=yes --version=${WX_VERSION} 2> /dev/null`
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
749 else
3c82f0d @dpage Couple of minor tweaks
dpage authored
750 WX_NEW_CPPFLAGS=`${WX_CONFIG} --cppflags --unicode=yes --debug=no --version=${WX_VERSION} 2> /dev/null`
a092a9e @dpage Additional cleanup of the build system as discussed at FOSDEM:
dpage authored
751 CPPFLAGS="$CPPFLAGS $WX_NEW_CPPFLAGS -DEMBED_XRC"
752 CFLAGS=`echo $CFLAGS | sed -e "s/-g //g"`
753 CXXFLAGS=`echo $CXXFLAGS | sed -e "s/-g //g"`
ed43d9b @dpage Cleanup *nix build in an attempt to fix the debug/non debug compile/l…
dpage authored
754
573638f @petergeoghegan Another set of wx2.9 updates. This patch includes the merge of wxOGL
petergeoghegan authored
755 pgadmin3_LDADD=`${WX_CONFIG} ${WX_STATIC} --libs std,stc,aui --unicode=yes --debug=no --version=${WX_VERSION} 2> /dev/null`
165dbcc @mhagander pgScript - a scripting language for PostgreSQL/pgAdmin
mhagander authored
756 pgsTest_LDADD=`${WX_CONFIG} ${WX_STATIC} --libs base,core,xml --unicode=yes --debug=no --version=${WX_VERSION} 2> /dev/null`
757 pgScript_LDADD=`${WX_CONFIG} ${WX_STATIC} --libs base,core,xml --unicode=yes --debug=no --version=${WX_VERSION} 2> /dev/null`
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
758 fi
5747558 @dpage Ensure we will only configure against a Unicode enabled wxWidgets.
dpage authored
759
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
760 AC_MSG_CHECKING(wxWidgets in ${WX_HOME})
e3c74f5 @dpage Don't double up on parts of the wx link command
dpage authored
761 if test "$WX_NEW_CPPFLAGS" = "" -o "$pgadmin3_LDADD" = ""
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
762 then
cecafec @dpage Search for libxml2 in /mingw
dpage authored
763 AC_MSG_RESULT(failed)
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
764 AC_MSG_ERROR([Your wxWidgets installation cannot support pgAdmin in the selected configuration. This may be because it was configured without the --enable-unicode option, or the combination of dynamic/static linking and debug/non-debug libraries selected did not match any installed wxWidgets libraries.])
765 else
766 AC_MSG_RESULT(ok)
767 fi
ed43d9b @dpage Cleanup *nix build in an attempt to fix the debug/non debug compile/l…
dpage authored
768
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
769 case "${host}" in
770 *-apple-darwin*)
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
771
3d8b519 @dpage Update the autotools build system to build only the default system
dpage authored
772 # Use the default arch if none is specified.
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
773 if test "$OSX_ARCH" = ""
6dbcfc5 @dpage Initial support for Mac Intel & Universal
dpage authored
774 then
3d8b519 @dpage Update the autotools build system to build only the default system
dpage authored
775 OSX_ARCH="-arch `uname -p`"
6dbcfc5 @dpage Initial support for Mac Intel & Universal
dpage authored
776 fi
3d8b519 @dpage Update the autotools build system to build only the default system
dpage authored
777
778 LDFLAGS="$LDFLAGS -headerpad_max_install_names"
a092a9e @dpage Additional cleanup of the build system as discussed at FOSDEM:
dpage authored
779 CPPFLAGS="$CPPFLAGS $OSX_ARCH"
3d8b519 @dpage Update the autotools build system to build only the default system
dpage authored
780
781 # Strip any existing arch flags from LDFLAGS and add the desired ones
782 # This is required as wxWidgets 2.8 (but not 2.9) includes the arch flags
783 # in it's --libs output.
784 pgadmin3_LDADD=`echo $pgadmin3_LDADD | sed -e "s/-arch ppc//g" -e "s/-arch i386//g" -e "s/-arch x86_64//g" -e "s/-arch ppc64//g"`
785 pgadmin3_LDADD="$pgadmin3_LDADD $OSX_ARCH"
786 pgsTest_LDADD=`echo $pgsTest_LDADD | sed -e "s/-arch ppc//g" -e "s/-arch i386//g" -e "s/-arch x86_64//g" -e "s/-arch ppc64//g"`
787 pgsTest_LDADD="$pgsTest_LDADD $OSX_ARCH"
788 pgScript_LDADD=`echo $pgScript_LDADD | sed -e "s/-arch ppc//g" -e "s/-arch i386//g" -e "s/-arch x86_64//g" -e "s/-arch ppc64//g"`
789 pgScript_LDADD="$pgScript_LDADD $OSX_ARCH"
7e51c80 @dpage Replace all the XPM images in pgAdmin with PNG ones. This offers us
dpage authored
790 png2c_LDADD="$OSX_ARCH"
3d8b519 @dpage Update the autotools build system to build only the default system
dpage authored
791
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
792 ;;
793 *solaris*)
794 LDFLAGS="$LDFLAGS -lnsl"
795 ;;
796 *)
797 ;;
798 esac
799 fi
63d756c @dpage Here is the latest autoconf code. Because you wanted the files in
dpage authored
800 ])
4a05dcc @dpage Mask the password on the main tab of the user properties dialogue [Hi…
dpage authored
801 AC_SUBST(WX_CONFIG)
49e1816 @dpage Minimally link pgAgent under *nix [Magnus Hagander]
dpage authored
802 AC_SUBST(pgadmin3_LDADD)
165dbcc @mhagander pgScript - a scripting language for PostgreSQL/pgAdmin
mhagander authored
803 AC_SUBST(pgsTest_LDADD)
804 AC_SUBST(pgScript_LDADD)
7e51c80 @dpage Replace all the XPM images in pgAdmin with PNG ones. This offers us
dpage authored
805 AC_SUBST(png2c_LDADD)
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
806
7b2d03e @dpage Add a 'Favourites' query organiser to the Query Tool. Note; this adds…
dpage authored
807 #########################
808 # Setup libxml2 headers #
809 #########################
810 AC_DEFUN([SETUP_LIBXML2],
811 [
cecafec @dpage Search for libxml2 in /mingw
dpage authored
812 if test -n "${XML2_HOME}"
813 then
814 XML2_CFLAGS=`${XML2_CONFIG} --cflags`
815 XML2_LIBS=`${XML2_CONFIG} --libs`
816 AC_MSG_CHECKING(libxml2 in ${XML2_HOME})
817 if test "${XML2_CFLAGS}" = "" -o "${XML2_LIBS}" = ""
818 then
819 AC_MSG_RESULT(failed)
820 AC_MSG_ERROR([Your libxml2 installation does not appear to be complete])
821 else
822 AC_MSG_RESULT(ok)
823 CPPFLAGS="$CPPFLAGS $XML2_CFLAGS"
824 pgadmin3_LDADD="${pgadmin3_LDADD} $XML2_LIBS"
825 fi
826 fi
7b2d03e @dpage Add a 'Favourites' query organiser to the Query Tool. Note; this adds…
dpage authored
827 ])
828 AC_SUBST(XML2_CONFIG)
3145a4f @dpage Fixes for the debugger build integration on *nix
dpage authored
829 AC_SUBST(pgadmin3_LDADD)
55e2372 @dpage Generate reports in XML, then use XSLT to transform them as required.
dpage authored
830
831 #########################
832 # Setup libxslt headers #
833 #########################
834 AC_DEFUN([SETUP_LIBXSLT],
835 [
836 if test -n "${XSLT_HOME}"
837 then
838 XSLT_CFLAGS=`${XSLT_CONFIG} --cflags`
839 XSLT_LIBS=`${XSLT_CONFIG} --libs`
840 AC_MSG_CHECKING(libxslt in ${XSLT_HOME})
841 if test "${XSLT_CFLAGS}" = "" -o "${XSLT_LIBS}" = ""
842 then
843 AC_MSG_RESULT(failed)
844 AC_MSG_ERROR([Your libxslt installation does not appear to be complete])
845 else
846 AC_MSG_RESULT(ok)
847 CPPFLAGS="$CPPFLAGS $XSLT_CFLAGS"
848 pgadmin3_LDADD="${pgadmin3_LDADD} $XSLT_LIBS"
849 fi
850 fi
851 ])
852 AC_SUBST(XSLT_CONFIG)
3145a4f @dpage Fixes for the debugger build integration on *nix
dpage authored
853 AC_SUBST(pgadmin3_LDADD)
7b2d03e @dpage Add a 'Favourites' query organiser to the Query Tool. Note; this adds…
dpage authored
854
21049ce @akshay-joshi Add SSH tunneling support.
akshay-joshi authored
855 #################
856 # Setup libssh2 #
857 #################
858
859 sinclude(acinclude-ssh2.m4)
860
861
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
862 #########################
863 # Configuration summary #
864 #########################
865 AC_DEFUN([SUMMARY],
866 [
867 # Print a configuration summary
868 echo
cecafec @dpage Search for libxml2 in /mingw
dpage authored
869 echo "PostgreSQL directory: $PG_HOME"
870 echo "PostgreSQL pg_config binary: $PG_CONFIG"
871 echo "PostgreSQL version: $PG_VERSION"
02644e5 @gleu Better detection of PQconninfoParse function
gleu authored
872 echo
873 if test "$HAVE_CONNINFO_PARSE" = yes
874 then
875 echo "PostgreSQL PQconninfoParse support: Present"
876 else
877 echo "PostgreSQL PQconninfoParse support: Missing"
878 fi
5379014 @dpage Add a configure flag (--with-osxarch=[ppc|i386|x86_64]) to allow
dpage authored
879 if test "$PG_SSL" = yes
880 then
881 echo "PostgreSQL SSL support: Present"
882 else
883 echo "PostgreSQL SSL support: Missing"
884 fi
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
885 echo
cecafec @dpage Search for libxml2 in /mingw
dpage authored
886 echo "wxWidgets directory: $WX_HOME"
887 echo "wxWidgets wx-config binary: $WX_CONFIG"
888 echo "wxWidgets version: wxWidgets "`$WX_CONFIG --version --version=$WX_VERSION`
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
889 echo
b22d86c @dpage Check for *-config binaries in the path as well as normal locations, …
dpage authored
890 echo "libxml2 directory: $XML2_HOME"
891 echo "libxml2 xml2-config binary: $XML2_CONFIG"
892 echo "libxml2 version: libxml2 "`$XML2_CONFIG --version`
893 echo
894 echo "libxslt directory: $XSLT_HOME"
895 echo "libxslt xslt-config binary: $XSLT_CONFIG"
896 echo "libxslt version: libxslt "`$XSLT_CONFIG --version`
897 echo
926bd69 @gleu Database designer is now not compiled by default
gleu authored
898 if test "$HAVE_DATABASEDESIGNER" = yes
899 then
900 echo "Building Database Designer: Yes"
901 else
902 echo "Building Database Designer: No"
903 fi
904 echo
21049ce @akshay-joshi Add SSH tunneling support.
akshay-joshi authored
905 if test "$BUILD_SSH_TUNNEL" = yes
906 then
907 echo "Building SSH Tunnel: Yes"
908 if test "$ac_cv_libssl" = yes
909 then
910 echo "Crypto library: OpenSSL"
911 else test "$ac_cv_libgcrypt" = yes
912 echo "Crypto library: libgcrypt"
913 fi
914 if test "$ac_cv_libz" = yes
915 then
916 echo "libz compression: yes"
917 else
918 echo "libz compression: no"
919 fi
920 else
921 echo "Building SSH Tunnel: No"
922 fi
923 echo
9c386ea @dpage Fix some portability issues in the configure code [Max Khon]
dpage authored
924 if test "$BUILD_DEBUG" = yes
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
925 then
cecafec @dpage Search for libxml2 in /mingw
dpage authored
926 echo "Building a debug version of pgAdmin: Yes"
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
927 else
cecafec @dpage Search for libxml2 in /mingw
dpage authored
928 echo "Building a debug version of pgAdmin: No"
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
929 fi
9c386ea @dpage Fix some portability issues in the configure code [Max Khon]
dpage authored
930 if test "$BUILD_STATIC" = yes
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
931 then
cecafec @dpage Search for libxml2 in /mingw
dpage authored
932 echo "Statically linking pgAdmin: Yes"
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
933 else
cecafec @dpage Search for libxml2 in /mingw
dpage authored
934 echo "Statically linking pgAdmin: No"
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
935 fi
9c386ea @dpage Fix some portability issues in the configure code [Max Khon]
dpage authored
936 if test "$BUILD_APPBUNDLE" = yes
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
937 then
139f042 @dpage Don't force a static link with an appbundle build now that Florian ha…
dpage authored
938 echo "Building a Mac OS X appbundle: Yes"
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
939 else
cecafec @dpage Search for libxml2 in /mingw
dpage authored
940 echo "Building a Mac OS X appbundle: No"
b2461ad @dpage Overhaul autoconf macros. Use wx-config/pg_config to configure for wx…
dpage authored
941 fi
942 echo
2d85533 @gleu Use sphinx documentation system
gleu authored
943 if test "$SPHINX_BUILD" = ""
944 then
945 echo "sphinx-build executable: <not found>"
946 else
947 echo "sphinx-build executable: ${SPHINX_BUILD}"
948 fi
949 echo
1e5fd07 @dpage Move config summary to the end of the process so it doesn't get hidde…
dpage authored
950 echo "pgAdmin configuration is now complete. You can now compile and"
951 echo "install pgAdmin using 'make; make install'."
cecafec @dpage Search for libxml2 in /mingw
dpage authored
952 echo
b786f7b @dpage Don't forget to set WX_CONFIG and PG_CONFIG if --with-wx or --with-pg…
dpage authored
953 ])
Something went wrong with that request. Please try again.