]>
Commit | Line | Data |
---|---|---|
bcf1fa6b RR |
1 | dnl //////////////////////////////////////////////////////////////////////// |
2 | dnl | |
3 | dnl Top-level configure.in for wxWindows by Robert Roebling, Wolfram Gloger | |
4 | dnl and Martin Sperl. | |
5 | dnl | |
6 | dnl This script is under the wxWindows licence. | |
2904eefd | 7 | dnl $Id$ |
bcf1fa6b RR |
8 | dnl //////////////////////////////////////////////////////////////////////// |
9 | ||
10 | dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) | |
11 | dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS | |
12 | dnl | |
13 | AC_DEFUN(AM_PATH_GTK, | |
14 | [dnl | |
15 | dnl Get the cflags and libraries from the gtk-config script | |
16 | dnl | |
f3cb6592 | 17 | AC_ARG_WITH(gtk-prefix,[**--with-gtk-prefix=PFX Prefix where GTK is installed], |
bcf1fa6b | 18 | gtk_config_prefix="$withval", gtk_config_prefix="") |
f3cb6592 | 19 | AC_ARG_WITH(gtk-exec-prefix,[**--with-gtk-exec-prefix=PFX Exec prefix where GTK is installed], |
bcf1fa6b RR |
20 | gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") |
21 | ||
22 | if test x$gtk_config_exec_prefix != x ; then | |
23 | gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" | |
24 | if test x${GTK_CONFIG+set} != xset ; then | |
25 | GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config | |
26 | fi | |
27 | fi | |
28 | if test x$gtk_config_prefix != x ; then | |
29 | gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" | |
30 | if test x${GTK_CONFIG+set} != xset ; then | |
31 | GTK_CONFIG=$gtk_config_prefix/bin/gtk-config | |
32 | fi | |
33 | fi | |
34 | ||
35 | AC_PATH_PROG(GTK_CONFIG, gtk-config, no) | |
36 | min_gtk_version=ifelse([$1], ,0.99.7,$1) | |
37 | AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) | |
38 | no_gtk="" | |
39 | if test "$GTK_CONFIG" != "no" ; then | |
40 | GTK_CFLAGS=`$GTK_CONFIG --cflags` | |
41 | GTK_LIBS=`$GTK_CONFIG --libs` | |
42 | ac_save_CFLAGS="$CFLAGS" | |
43 | ac_save_LIBS="$LIBS" | |
44 | CFLAGS="$CFLAGS $GTK_CFLAGS" | |
45 | LIBS="$LIBS $GTK_LIBS" | |
46 | dnl | |
47 | dnl Now check if the installed GTK is sufficiently new. (Also sanity | |
48 | dnl checks the results of gtk-config to some extent | |
49 | dnl | |
50 | AC_TRY_RUN([ | |
51 | #include <gtk/gtk.h> | |
52 | #include <stdio.h> | |
53 | ||
54 | int | |
55 | main () | |
56 | { | |
57 | int major, minor, micro; | |
58 | ||
59 | if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) { | |
60 | printf("%s, bad version string\n", "$min_gtk_version"); | |
61 | exit(1); | |
62 | } | |
63 | ||
f3855ef0 RR |
64 | if (gtk_minor_version > 0) return FALSE; |
65 | ||
bcf1fa6b RR |
66 | return !((gtk_major_version > major) || |
67 | ((gtk_major_version == major) && (gtk_minor_version > minor)) || | |
68 | ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))); | |
69 | } | |
70 | ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) | |
71 | CFLAGS="$ac_save_CFLAGS" | |
72 | LIBS="$ac_save_LIBS" | |
73 | else | |
74 | no_gtk=yes | |
75 | fi | |
76 | if test "x$no_gtk" = x ; then | |
77 | AC_MSG_RESULT(yes) | |
78 | ifelse([$2], , :, [$2]) | |
79 | else | |
80 | AC_MSG_RESULT(no) | |
81 | GTK_CFLAGS="" | |
82 | GTK_LIBS="" | |
83 | ifelse([$3], , :, [$3]) | |
84 | fi | |
85 | AC_SUBST(GTK_CFLAGS) | |
86 | AC_SUBST(GTK_LIBS) | |
87 | ]) | |
88 | ||
89 | dnl ------------------------------------------------------------------------ | |
90 | dnl custom macros | |
91 | dnl ------------------------------------------------------------------------ | |
92 | ||
93 | AC_DEFUN(AC_OVERRIDES_PREPARE, | |
94 | [ | |
95 | rm -f ${OSTYPE}.system.cache.tmp | |
96 | touch ${OSTYPE}.system.cache.tmp | |
97 | touch ${OSTYPE}.system.cache | |
98 | ]) | |
99 | ||
100 | AC_DEFUN(AC_OVERRIDES_DONE, | |
101 | [ | |
102 | mv ${OSTYPE}.system.cache.tmp ${OSTYPE}.system.cache | |
103 | ]) | |
104 | ||
105 | dnl package,message,helpmessage,variable | |
106 | AC_DEFUN(AC_OVERRIDES, | |
107 | [ | |
108 | AC_MSG_CHECKING("for $2") | |
109 | AC_ARG_WITH($1,$3, | |
110 | [if test "x$with_$1" = xyes; then | |
111 | ac_cv_use_$1='$4="1"' | |
112 | else | |
113 | ac_cv_use_$1='$4="0"' | |
114 | fi], | |
115 | [ | |
116 | LINE=`grep "$4" ${OSTYPE}.system.cache` | |
117 | if test "x$LINE" != x ; then | |
118 | eval "DEFAULT_$LINE" | |
119 | fi | |
120 | ac_cv_use_$1='$4='$DEFAULT_$4 | |
121 | ]) | |
122 | eval "$ac_cv_use_$1" | |
123 | echo $ac_cv_use_$1 >> ${OSTYPE}.system.cache.tmp | |
124 | if test "$$4" = 1; then | |
125 | AC_MSG_RESULT(yes) | |
126 | else | |
127 | AC_MSG_RESULT(no) | |
128 | fi | |
129 | ]) | |
130 | ||
131 | dnl package,message,helpmessage,variable | |
132 | AC_DEFUN(AC_OVERRIDES_OLD, | |
133 | [ | |
134 | AC_MSG_CHECKING("for $2") | |
135 | AC_CACHE_VAL(ac_cv_use_$1, | |
136 | [ | |
137 | AC_ARG_WITH($1,$3, | |
138 | [if test "x$with_$1" = xyes; then | |
139 | ac_cv_use_$1='$4="1"' | |
140 | else | |
141 | ac_cv_use_$1='$4="0"' | |
142 | fi],[ac_cv_use_$1='$4=$DEFAULT_$4']) | |
143 | ]) | |
144 | eval "$ac_cv_use_$1" | |
145 | ||
146 | if test "$$4" = 1; then | |
147 | AC_MSG_RESULT(yes) | |
148 | else | |
149 | AC_MSG_RESULT(no) | |
150 | fi | |
151 | ]) | |
152 | ||
153 | AC_DEFUN(AC_PATH_FIND_INCLUDES, | |
154 | [ | |
155 | ac_find_includes= | |
156 | for ac_dir in $1; | |
157 | do | |
158 | if test -f "$ac_dir/$2"; then | |
159 | ac_find_includes=$ac_dir | |
160 | break | |
161 | fi | |
162 | done | |
163 | ]) | |
164 | ||
165 | AC_DEFUN(AC_PATH_FIND_LIBRARIES, | |
166 | [ | |
167 | ac_find_libraries= | |
168 | for ac_dir in $1; | |
169 | do | |
170 | for ac_extension in a so sl; do | |
171 | if test -f "$ac_dir/lib$2.$ac_extension"; then | |
172 | ac_find_libraries=$ac_dir | |
173 | break 2 | |
174 | fi | |
175 | done | |
176 | done | |
177 | ]) | |
178 | ||
179 | dnl Path to include, allready defined | |
180 | AC_DEFUN(AC_INCLUDE_PATH_EXIST, | |
181 | [ | |
182 | ac_path_to_include=$1 | |
183 | echo "$2" | grep "\-I$1" > /dev/null | |
184 | result=$? | |
185 | if test $result = 0; then | |
186 | ac_path_to_include="" | |
187 | else | |
188 | ac_path_to_include="-I$1" | |
189 | fi | |
190 | ]) | |
191 | ||
192 | dnl Path to link, allready defined | |
193 | AC_DEFUN(AC_LINK_PATH_EXIST, | |
194 | [ | |
195 | echo "$2" | grep "\-L$1" > /dev/null | |
196 | result=$? | |
197 | if test $result = 0; then | |
198 | ac_path_to_link="" | |
199 | else | |
200 | ac_path_to_link="-L$1" | |
201 | fi | |
202 | ]) | |
203 | ||
204 | dnl ------------------------------------------------------------------------ | |
205 | dnl Process this file with autoconf to produce a configure script. | |
206 | dnl ------------------------------------------------------------------------ | |
207 | ||
208 | AC_INIT(configure.in) | |
209 | ||
210 | dnl ------------------------------------------------------------------------ | |
211 | dnl Check platform | |
212 | dnl ------------------------------------------------------------------------ | |
213 | ||
214 | OS="${OSTYPE}" | |
215 | ||
216 | if test "x$OS" = "x"; then | |
217 | UNAME=`uname` | |
218 | AC_MSG_ERROR("The system variable OS has not been set" | |
219 | "please set is everytime befor compiling on this system" | |
220 | "A good example for this system would be:" | |
221 | "setenv OSTYPE $UNAME for csh as a SHELL" | |
222 | "EXPORT OSTYPE=$UNAME for sh as SHELL" | |
223 | "please set this and restart again." | |
224 | ) | |
225 | fi | |
226 | ||
227 | dnl ------------------------------------------------------------------------ | |
228 | dnl Set base directory | |
229 | dnl ------------------------------------------------------------------------ | |
230 | ||
231 | WXBASEDIR=`pwd` | |
232 | AC_SUBST(WXBASEDIR) | |
233 | ||
234 | dnl ------------------------------------------------------------------------ | |
235 | dnl search path for includes and libraries | |
236 | dnl ------------------------------------------------------------------------ | |
237 | ||
238 | SEARCH_INCLUDE="\ | |
239 | /usr/Motif1.2/include \ | |
240 | \ | |
241 | /usr/X11R6/include \ | |
242 | /usr/X11R5/include \ | |
243 | /usr/X11R4/include \ | |
244 | \ | |
76153302 RR |
245 | /usr/X11R6/lib \ |
246 | /usr/X11R5/lib \ | |
247 | /usr/X11R4/lib \ | |
248 | \ | |
bcf1fa6b RR |
249 | /usr/include/X11R6 \ |
250 | /usr/include/X11R5 \ | |
251 | /usr/include/X11R4 \ | |
252 | \ | |
253 | /usr/local/X11R6/include \ | |
254 | /usr/local/X11R5/include \ | |
255 | /usr/local/X11R4/include \ | |
256 | \ | |
257 | /usr/local/include/X11R6 \ | |
258 | /usr/local/include/X11R5 \ | |
259 | /usr/local/include/X11R4 \ | |
260 | \ | |
261 | /usr/X11/include \ | |
262 | /usr/include/X11 \ | |
263 | /usr/local/X11/include \ | |
264 | /usr/local/include/X11 \ | |
265 | \ | |
266 | /usr/X386/include \ | |
267 | /usr/x386/include \ | |
268 | /usr/XFree86/include/X11 \ | |
269 | \ | |
270 | /usr/include \ | |
f3855ef0 RR |
271 | /usr/include/gtk \ |
272 | /usr/include/gdk \ | |
273 | /usr/include/glib \ | |
bcf1fa6b RR |
274 | /usr/local/include \ |
275 | /usr/unsupported/include \ | |
276 | /usr/athena/include \ | |
277 | /usr/local/x11r5/include \ | |
278 | /usr/lpp/Xamples/include \ | |
279 | \ | |
280 | /usr/local/include/gtk \ | |
d18ed59a RR |
281 | /usr/local/include/Xm \ |
282 | /usr/local/include/qt \ | |
bcf1fa6b RR |
283 | /usr/X11R6/include/Xm \ |
284 | /usr/X11/include/Xm \ | |
285 | /usr/include/qt \ | |
286 | \ | |
287 | /usr/openwin/include \ | |
288 | /usr/openwin/share/include \ | |
289 | " | |
290 | ||
291 | SEARCH_LIB="`echo "$SEARCH_INCLUDE" | sed s/include/lib/g` \ | |
292 | " | |
293 | ||
294 | dnl ------------------------------------------------------------------------ | |
295 | dnl standard checks | |
296 | dnl ------------------------------------------------------------------------ | |
297 | ||
298 | dnl ################### | |
299 | dnl # checks programs # | |
300 | dnl ################### | |
301 | ||
302 | dnl C-compiler checks | |
303 | dnl ================= | |
304 | dnl use what compiler | |
305 | AC_PROG_CC | |
306 | dnl defines CC with the compiler to use | |
307 | dnl defines GCC with yes if using gcc | |
308 | dnl defines GCC empty if not using gcc | |
309 | dnl defines CFLAGS | |
310 | ||
311 | CFLAGS=`echo "$CFLAGS" | sed 's/-g//g'` | |
312 | ||
313 | dnl does compiler support -c and -o simultaniously | |
314 | AC_PROG_CC_C_O | |
315 | dnl defines NO_MINUS_C_MINUS_O if compiler does not accept | |
316 | dnl both switches simultaniously | |
317 | dnl what is the c-preprocessor | |
318 | AC_PROG_CPP | |
319 | dnl defines CPP with the c-preprocessor | |
320 | dnl is -traditional needed for correct compilations | |
321 | AC_PROG_GCC_TRADITIONAL | |
322 | dnl adds -traditional for gcc if needed | |
323 | ||
324 | AC_LANG_SAVE | |
325 | ||
326 | dnl C++-compiler checks | |
327 | dnl =================== | |
328 | dnl use what compiler | |
329 | AC_PROG_CXX | |
330 | dnl defines CXX with the compiler to use | |
331 | dnl defines GXX with yes if using gxx | |
332 | dnl defines GXX empty if not using gxx | |
333 | dnl defines CXXFLAGS | |
334 | dnl what is the C++-preprocessor | |
335 | AC_PROG_CXXCPP | |
336 | dnl defines CXXCPP with the C++-preprocessor | |
337 | ||
338 | CXXFLAGS=`echo "$CXXFLAGS" | sed 's/-g//g'` | |
339 | ||
340 | AC_LANG_RESTORE | |
341 | ||
342 | dnl ranlib command | |
343 | dnl ============== | |
344 | AC_PROG_RANLIB | |
345 | dnl defines RANLIB with the appropriate command | |
346 | ||
347 | dnl ar command | |
348 | dnl ========== | |
349 | AC_CHECK_PROG(AR, ar, ar, ar) | |
350 | dnl defines AR with the appropriate command | |
351 | ||
352 | dnl install checks | |
353 | dnl ============== | |
354 | AC_PROG_INSTALL | |
355 | dnl defines INSTALL with the appropriate command | |
356 | ||
357 | dnl does ln -s works | |
358 | dnl ================ | |
359 | AC_PROG_LN_S | |
360 | dnl defines LN_S with the appropriate command | |
361 | ||
362 | dnl awk command | |
363 | dnl =========== | |
364 | AC_PROG_AWK | |
365 | dnl defines AWK with the appropriate command | |
366 | ||
367 | dnl ############### | |
368 | dnl # make checks # | |
369 | dnl ############### | |
370 | dnl check if VPATH works | |
371 | AC_MSG_CHECKING("make for VPATH support") | |
372 | dnl create Makefile | |
373 | cat - << EOF > confMake | |
374 | check : file | |
375 | cp \$? \$@ | |
376 | cp \$? final_file | |
377 | EOF | |
378 | ||
379 | if test ! -d sub ; then | |
380 | mkdir sub | |
381 | fi | |
382 | echo dummy > sub/file | |
383 | ${MAKE-make} -f confMake VPATH=sub 2> config.log > /dev/null | |
384 | RESULT=$? | |
851b9459 | 385 | rm -f sub/file check final_file confMake |
bcf1fa6b RR |
386 | rmdir sub |
387 | if test "$RESULT" = 0; then | |
388 | AC_MSG_RESULT(yes) | |
389 | else | |
390 | AC_MSG_RESULT(no) | |
391 | AC_MSG_ERROR( | |
392 | You need a make-utility that is able to use the variable | |
393 | VPATH correctly. | |
394 | If your version of make does not support VPATH correctly, | |
395 | please install GNU-make (possibly as gmake), and start | |
396 | configure with the following command: | |
397 | export MAKE=gmake; ./configure for sh-type shells | |
398 | setenv MAKE gmake; ./configure for csh-type shells | |
399 | Also please do remember to use gmake in this case every time | |
400 | you are trying to compile. | |
401 | ) | |
402 | fi | |
403 | ||
404 | dnl #################### | |
405 | dnl # checks libraries # | |
406 | dnl #################### | |
407 | ||
408 | dnl find the X11 include and library files | |
409 | AC_PATH_XTRA | |
410 | dnl defines x_includes and x_libraries | |
411 | ||
412 | dnl ####################### | |
413 | dnl # checks header files # | |
414 | dnl ####################### | |
415 | AC_HEADER_DIRENT | |
416 | dnl defines DIR | |
417 | dnl defines MACRO HAVE_DIRENT_H if dirent.h exists | |
418 | dnl defines MACRO HAVE_SYS_NDIR_H if sys/ndir.h exists | |
419 | dnl defines MACRO HAVE_SYS_DIR_H if sys/dir.h exists | |
420 | dnl defines MACRO HAVE_NDIR_H if ndir.h exists | |
421 | AC_HEADER_STDC | |
422 | dnl defines STDC_HEADERS if ANSI-C header | |
423 | AC_HEADER_SYS_WAIT | |
424 | dnl defines HAVE_SYS_WAIT_H if sys/wait.h exist and is POSIX.1 | |
a4876ea4 | 425 | AC_CHECK_HEADERS(fcntl.h) |
bcf1fa6b | 426 | dnl defines HAVE_FCNTL_H |
a4876ea4 | 427 | AC_CHECK_HEADERS(limits.h) |
bcf1fa6b | 428 | dnl defines HAVE_LIMITS_h |
a4876ea4 | 429 | AC_CHECK_HEADERS(sys/file.h) |
bcf1fa6b | 430 | dnl defines HAVE_SYS_FILE_H |
a4876ea4 | 431 | AC_CHECK_HEADERS(sys/time.h) |
bcf1fa6b | 432 | dnl defines HAVE_SYS_TIME_H |
a4876ea4 | 433 | AC_CHECK_HEADERS(unistd.h) |
bcf1fa6b | 434 | dnl defines HAVE_UNISTD_H |
a4876ea4 KB |
435 | AC_CHECK_HEADERS(fnmatch.h) |
436 | dnl defines HAVE_FNMATCH_H | |
bcf1fa6b | 437 | dnl As it needs Linux 2.1.x for the moment: check whether the file exists (GL). |
a4876ea4 | 438 | AC_CHECK_HEADERS(linux/joystick.h) |
bcf1fa6b RR |
439 | GTK_JOYSTICK="" |
440 | if test "$ac_cv_header_linux_joystick_h" = "yes"; then | |
441 | GTK_JOYSTICK="gtk/joystick.cpp" | |
442 | fi | |
443 | AC_SUBST(GTK_JOYSTICK) | |
444 | ||
35c9d958 KB |
445 | dnl check for vprintf/vsprintf() which are GNU extensions |
446 | AC_FUNC_VPRINTF | |
447 | dnl check for vsnprintf() which is another GNU extension | |
448 | AC_CHECK_FUNC(vsnprintf) | |
449 | ||
32cbeff4 KB |
450 | AC_LANG_SAVE |
451 | AC_LANG_CPLUSPLUS | |
452 | AC_CHECK_HEADERS(iostream) | |
453 | if test "x$HAVE_IOSTREAM" = "x" ; then | |
454 | AC_DEFINE(wxUSE_IOSTREAMH) | |
455 | fi | |
456 | AC_LANG_RESTORE | |
457 | ||
458 | dnl defines HAVE_IOSTREAM | |
bcf1fa6b RR |
459 | dnl ################### |
460 | dnl # checks typedefs # | |
461 | dnl ################### | |
462 | AC_TYPE_GETGROUPS | |
463 | dnl defines GETGROUPS_T | |
464 | AC_TYPE_MODE_T | |
465 | dnl defines mode_t if not already defined | |
466 | AC_TYPE_OFF_T | |
467 | dnl defines off_t if not already defined | |
468 | AC_TYPE_PID_T | |
469 | dnl defines pid_t if not already defined | |
470 | AC_TYPE_SIGNAL | |
471 | dnl defines RETSIGTYPE for the correct return type of signal | |
472 | AC_TYPE_SIZE_T | |
473 | dnl defines size_t if not already defined | |
474 | AC_TYPE_UID_T | |
475 | dnl defines uid_t and gid_t if not already defined | |
476 | ||
477 | dnl ##################### | |
478 | dnl # checks structures # | |
479 | dnl ##################### | |
480 | ||
481 | AC_HEADER_STAT | |
482 | dnl defines STAT_MACROS_BROKEN if S_ISDIR and S_ISREG | |
483 | dnl do not work properly | |
484 | AC_HEADER_TIME | |
485 | dnl defines TIME_WITH_SYS_TIME if time.h and sys/time.h can | |
486 | dnl both be included | |
487 | AC_STRUCT_ST_BLKSIZE | |
488 | dnl defines HAVE_ST_BLKSIZE if struct stat contains st_blksize | |
489 | AC_STRUCT_ST_BLOCKS | |
490 | dnl defines HAVE_ST_BLOCKS if struct stat contains st_blocks | |
491 | AC_STRUCT_ST_RDEV | |
492 | dnl defines HAVE_ST_RDEV if struct stat contains st_rdev | |
493 | AC_STRUCT_TM | |
494 | dnl defines TM_IN_SYS_TIME if struct tm is not in time.h | |
495 | AC_STRUCT_TIMEZONE | |
496 | dnl defines HAVE_ST_BLKSIZE if struct tm contains tm_zone | |
497 | dnl otherwise | |
498 | dnl defines HAVE_TZNAME if external array tzname is found | |
499 | ||
500 | dnl ################################### | |
501 | dnl # checks compiler characteristics # | |
502 | dnl ################################### | |
503 | dnl AC_C_CROSS | |
504 | ||
505 | AC_C_CONST | |
506 | dnl defines const to be empty if c-compiler does not support const fully | |
507 | AC_C_INLINE | |
508 | dnl defines inline to a sensible value for the c-compiler | |
509 | AC_C_CHAR_UNSIGNED | |
510 | dnl defines __CHAR_UNSIGNED__ if char is unsigned | |
511 | AC_C_LONG_DOUBLE | |
512 | dnl defines HAVE_LONGDOUBLE if compiler supports long double | |
513 | ||
514 | AC_C_BIGENDIAN | |
515 | dnl defines WORDS_BIGENDIAN if system is big endian | |
516 | ||
517 | AC_CHECK_SIZEOF(int *) | |
518 | AC_CHECK_SIZEOF(int) | |
519 | AC_CHECK_SIZEOF(long) | |
520 | dnl defines the size of certain types of variables in SIZEOF_??? | |
521 | ||
522 | dnl ############################ | |
523 | dnl # checks library functions # | |
524 | dnl ############################ | |
525 | ||
526 | dnl ########################## | |
527 | dnl # checks system services # | |
528 | dnl ########################## | |
529 | ||
530 | ||
531 | AC_SYS_LONG_FILE_NAMES | |
532 | dnl defines HAVE_LONG_FILENAMES if filenames longer then | |
533 | dnl 14 chars are supported | |
534 | ||
535 | dnl AC_SYS_RESTARTABLE_SYSCALLS | |
536 | dnl defines HAVE_RESTARTABLE_SYSCALLS if the system restarts a | |
537 | dnl system call that is interrupted | |
538 | dnl by a signal | |
539 | ||
540 | dnl ################# | |
541 | dnl # checks PARSER # | |
542 | dnl ################# | |
543 | ||
544 | dnl YACC checks | |
545 | dnl =========== | |
546 | AC_PROG_YACC | |
547 | dnl defines YACC with the appropriate command | |
548 | ||
549 | dnl LEX checks | |
550 | dnl ========== | |
551 | AC_PROG_LEX | |
552 | dnl defines LEX with the appropriate command | |
553 | dnl defines LEXLIB with the appropriate library | |
554 | dnl what type is yytext | |
555 | AC_DECL_YYTEXT | |
556 | dnl defines YYTEXT_POINTER if yytext is char* | |
557 | dnl defines LEX_OUTPUT_ROOT as to the base of the | |
558 | dnl filename output by the lexer | |
559 | ||
560 | dnl ------------------------------------------------------------------------ | |
561 | dnl main includes | |
562 | dnl ------------------------------------------------------------------------ | |
563 | ||
564 | CHECK_INCLUDE="-I/usr/include $X_CFLAGS" | |
565 | CHECK_LIB="-L/lib -L/usr/lib $X_LIBS" | |
566 | ||
567 | dnl ------------------------------------------------------------------------ | |
568 | dnl host system | |
569 | dnl ------------------------------------------------------------------------ | |
570 | ||
571 | AC_CANONICAL_HOST | |
572 | canonical=$host | |
573 | configuration=$host_alias | |
574 | ||
575 | dnl ------------------------------------------------------------------------ | |
576 | dnl system settings | |
577 | dnl ------------------------------------------------------------------------ | |
578 | ||
579 | USE_UNIX=1 | |
580 | ||
581 | ||
582 | USE_LINUX= | |
583 | USE_SGI= | |
584 | USE_HPUX= | |
585 | USE_SYSV= | |
586 | USE_SVR4= | |
587 | USE_AIX= | |
588 | USE_SUN= | |
589 | USE_SOLARIS= | |
590 | USE_SUNOS= | |
591 | USE_ALPHA= | |
592 | USE_OSF= | |
593 | USE_BSD= | |
594 | USE_FREEBSD= | |
595 | USE_VMS= | |
596 | USE_ULTRIX= | |
597 | USE_DATA_GENERAL= | |
598 | ||
f780dc86 | 599 | AC_DEFINE(__UNIX__) |
bcf1fa6b RR |
600 | case "${canonical}" in |
601 | *-hp-hpux* ) | |
602 | USE_HPUX=1 | |
603 | AC_DEFINE(__HPUX__) | |
604 | ;; | |
605 | *-*-linux* ) | |
606 | USE_LINUX=1 | |
607 | AC_DEFINE(__LINUX__) | |
e0e680d2 KB |
608 | TMP=`uname -m` |
609 | if test "x$TMP" = "xalpha" | |
610 | then | |
611 | USE_ALPHA=1 | |
612 | AC_DEFINE(__ALPHA__) | |
613 | fi | |
bcf1fa6b RR |
614 | ;; |
615 | *-*-irix5* | *-*-irix6* ) | |
616 | USE_SGI=1 | |
617 | USE_SVR4=1 | |
618 | AC_DEFINE(__SGI__) | |
619 | AC_DEFINE(__SVR4__) | |
620 | ;; | |
621 | *-*-solaris2* ) | |
622 | USE_SUN=1 | |
623 | USE_SOLARIS=1 | |
624 | USE_SVR4=1 | |
625 | AC_DEFINE(__SUN__) | |
626 | AC_DEFINE(__SOLARIS__) | |
627 | AC_DEFINE(__SVR4__) | |
628 | ;; | |
629 | *-*-sunos4* ) | |
630 | USE_SUN=1 | |
631 | USE_SUNOS=1 | |
632 | USE_BSD=1 | |
633 | AC_DEFINE(__SUN__) | |
634 | AC_DEFINE(__SUNOS__) | |
635 | AC_DEFINE(__BSD__) | |
636 | ;; | |
637 | *-*-freebsd* | *-*-netbsd*) | |
638 | USE_BSD=1 | |
639 | USE_FREEBSD=1 | |
640 | AC_DEFINE(__FREEBSD__) | |
641 | AC_DEFINE(__BSD__) | |
642 | ;; | |
643 | *-*-osf* ) | |
644 | USE_ALPHA=1 | |
645 | USE_OSF=1 | |
646 | AC_DEFINE(__ALPHA__) | |
647 | AC_DEFINE(__OSF__) | |
648 | ;; | |
649 | *-*-dgux5* ) | |
650 | USE_ALPHA=1 | |
651 | USE_SVR4=1 | |
652 | AC_DEFINE(__ALPHA__) | |
653 | AC_DEFINE(__SVR4__) | |
654 | ;; | |
655 | *-*-sysv5* ) | |
656 | USE_SYSV=1 | |
657 | USE_SVR4=1 | |
658 | AC_DEFINE(__SYSV__) | |
659 | AC_DEFINE(__SVR4__) | |
660 | ;; | |
661 | *-*-aix* ) | |
662 | USE_AIX=1 | |
663 | USE_SYSV=1 | |
664 | USE_SVR4=1 | |
665 | AC_DEFINE(__AIX__) | |
666 | AC_DEFINE(__SYSV__) | |
667 | AC_DEFINE(__SVR4__) | |
668 | ;; | |
669 | *) | |
670 | AC_MSG_ERROR(I don't know your system type.) | |
671 | esac | |
672 | ||
673 | dnl ------------------------------------------------------------------------ | |
674 | dnl defaults for command options | |
675 | dnl ------------------------------------------------------------------------ | |
676 | ||
677 | AC_OVERRIDES_PREPARE | |
678 | ||
6fbf0513 | 679 | DEFAULT_wxUSE_GTK=1 |
8248314d VZ |
680 | DEFAULT_wxUSE_QT=0 |
681 | DEFAULT_wxUSE_MOTIF=0 | |
bcf1fa6b | 682 | |
27fc802d | 683 | DEFAULT_wxUSE_THREADS=1 |
cb43b372 | 684 | |
8248314d VZ |
685 | DEFAULT_wxUSE_SHARED=1 |
686 | DEFAULT_wxUSE_OPTIMISE=1 | |
687 | DEFAULT_wxUSE_PROFILE=0 | |
688 | DEFAULT_wxUSE_DEBUG_FLAG=0 | |
689 | DEFAULT_wxUSE_DEBUG_INFO=0 | |
690 | DEFAULT_wxUSE_MEM_TRACING=0 | |
691 | DEFAULT_wxUSE_DMALLOC=0 | |
692 | DEFAULT_wxUSE_APPLE_IEEE=1 | |
693 | DEFAULT_wxUSE_IOSTREAMH=1 | |
694 | ||
695 | DEFAULT_wxUSE_ZLIB=1 | |
8248314d | 696 | DEFAULT_wxUSE_LIBPNG=1 |
a65f3e54 | 697 | DEFAULT_wxUSE_ODBC=0 |
8248314d VZ |
698 | |
699 | DEFAULT_wxUSE_COMBOBOX=1 | |
700 | DEFAULT_wxUSE_GAUGE=1 | |
701 | DEFAULT_wxUSE_SCROLLBAR=1 | |
702 | DEFAULT_wxUSE_LISTCTRL=1 | |
703 | DEFAULT_wxUSE_TREECTRL=1 | |
704 | DEFAULT_wxUSE_GRID=1 | |
705 | DEFAULT_wxUSE_TAB_DIALOG=1 | |
706 | DEFAULT_wxUSE_NOTEBOOK=1 | |
707 | ||
708 | DEFAULT_wxUSE_TIMEDATE=1 | |
709 | DEFAULT_wxUSE_FRACTION=1 | |
710 | DEFAULT_wxUSE_LOG=1 | |
711 | DEFAULT_wxUSE_INTL=1 | |
712 | DEFAULT_wxUSE_CONFIG=1 | |
713 | DEFAULT_wxUSE_STREAMS=1 | |
714 | DEFAULT_wxUSE_SERIAL=1 | |
715 | DEFAULT_wxUSE_FILE=1 | |
716 | DEFAULT_wxUSE_TEXTFILE=1 | |
717 | ||
718 | DEFAULT_wxUSE_AFM_FOR_POSTSCRIPT=1 | |
bcf1fa6b | 719 | DEFAULT_WX_NORMALIZED_PS_FONTS=1 |
8248314d | 720 | DEFAULT_wxUSE_POSTSCRIPT=1 |
bcf1fa6b | 721 | |
8248314d VZ |
722 | DEFAULT_wxUSE_IPC=1 |
723 | DEFAULT_wxUSE_RESOURCES=1 | |
724 | DEFAULT_wxUSE_CONSTRAINTS=1 | |
8b53e5a2 | 725 | DEFAULT_wxUSE_CLIPBOARD=1 |
8248314d | 726 | DEFAULT_wxUSE_DND=1 |
bcf1fa6b | 727 | |
8248314d VZ |
728 | DEFAULT_wxUSE_MDI_ARCHITECTURE=1 |
729 | DEFAULT_wxUSE_DOC_VIEW_ARCHITECTURE=1 | |
730 | DEFAULT_wxUSE_PRINTING_ARCHITECTURE=1 | |
bcf1fa6b | 731 | |
8248314d VZ |
732 | DEFAULT_wxUSE_PROLOGIO=1 |
733 | DEFAULT_wxUSE_WX_RESOURCES=1 | |
734 | DEFAULT_wxUSE_RPC=0 | |
bcf1fa6b | 735 | |
8248314d VZ |
736 | DEFAULT_wxUSE_OPENGL=0 |
737 | DEFAULT_wxUSE_METAFILE=0 | |
738 | DEFAULT_wxUSE_WXGRAPH=0 | |
739 | DEFAULT_wxUSE_WXTREE=0 | |
e9aad10a | 740 | DEFAULT_wxUSE_HELP=1 |
bcf1fa6b | 741 | |
fb4e5803 VZ |
742 | DEFAULT_wxUSE_UNICODE=1 |
743 | DEFAULT_wxUSE_WCSRTOMBS=0 | |
744 | ||
bcf1fa6b RR |
745 | dnl ---------------------------------------------------------------- |
746 | dnl toolkit options | |
747 | dnl ---------------------------------------------------------------- | |
748 | ||
749 | AC_OVERRIDES(gtk,gtk, | |
750 | **--with-gtk use GTK, | |
8248314d | 751 | wxUSE_GTK) |
bcf1fa6b RR |
752 | |
753 | AC_OVERRIDES(qt,qt, | |
754 | **--with-qt use Qt, | |
8248314d | 755 | wxUSE_QT) |
bcf1fa6b RR |
756 | |
757 | AC_OVERRIDES(motif,motif, | |
758 | **--with-motif use Motif/Lesstif, | |
8248314d | 759 | wxUSE_MOTIF) |
bcf1fa6b RR |
760 | |
761 | dnl ---------------------------------------------------------------- | |
762 | dnl compile options | |
763 | dnl ---------------------------------------------------------------- | |
764 | ||
765 | AC_OVERRIDES(shared,shared, | |
766 | **--with-shared create shared libraries, | |
8248314d | 767 | wxUSE_SHARED) |
bcf1fa6b RR |
768 | |
769 | AC_OVERRIDES(optimise,optimise, | |
770 | **--with-optimise create optimised code, | |
8248314d | 771 | wxUSE_OPTIMISE) |
bcf1fa6b RR |
772 | |
773 | AC_OVERRIDES(debug_flag,debug_flag, | |
774 | **--with-debug_flag create code with WXDEBUG define set to 1, | |
8248314d | 775 | wxUSE_DEBUG_FLAG) |
bcf1fa6b RR |
776 | |
777 | AC_OVERRIDES(debug_info,debug_info, | |
778 | **--with-debug_info create code with debuging information, | |
8248314d | 779 | wxUSE_DEBUG_INFO) |
bcf1fa6b | 780 | |
2904eefd KB |
781 | AC_OVERRIDES(debug_gdb,debug_gdb, |
782 | **--with-debug_gdb create code with extra GDB debuging information, | |
783 | wxUSE_DEBUG_GDB) | |
784 | ||
bcf1fa6b RR |
785 | AC_OVERRIDES(mem_tracing,mem_tracing, |
786 | **--with-mem_traing create code with memory tracing, | |
8248314d | 787 | wxUSE_MEM_TRACING) |
bcf1fa6b RR |
788 | |
789 | AC_OVERRIDES(dmalloc,dmalloc, | |
790 | **--with-dmalloc use dmalloc memory debug library (www.letters.com/dmalloc/), | |
8248314d | 791 | wxUSE_DMALLOC) |
bcf1fa6b RR |
792 | |
793 | AC_OVERRIDES(profile,profile, | |
794 | **--with-profile create code with profiling information, | |
8248314d | 795 | wxUSE_PROFILE) |
bcf1fa6b RR |
796 | |
797 | AC_OVERRIDES(apple_ieee, apple_ieee, | |
798 | **--with_apple_ieee use the Apple IEEE codec, | |
8248314d | 799 | wxUSE_APPLE_IEEE) |
bcf1fa6b RR |
800 | |
801 | dnl ---------------------------------------------------------------- | |
802 | dnl user options for libraries | |
803 | dnl ---------------------------------------------------------------- | |
804 | ||
805 | AC_OVERRIDES(zlib,zlib, | |
806 | **--with-zlib use zlib for LZW comression, | |
8248314d | 807 | wxUSE_ZLIB) |
bcf1fa6b | 808 | |
bcf1fa6b RR |
809 | AC_OVERRIDES(libpng,libpng, |
810 | **--with-libpng use libpng (PNG image format), | |
8248314d | 811 | wxUSE_LIBPNG) |
bcf1fa6b RR |
812 | |
813 | AC_OVERRIDES(odbc,odbc, | |
814 | **--with-odbc use iODBC and wxODBC classes, | |
8248314d | 815 | wxUSE_ODBC) |
bcf1fa6b RR |
816 | |
817 | AC_OVERRIDES(opengl,opengl, | |
818 | **--with-opengl use OpenGL (or Mesa), | |
8248314d | 819 | wxUSE_OPENGL) |
bcf1fa6b RR |
820 | |
821 | dnl ---------------------------------------------------------------- | |
822 | dnl user options for GUI control classes | |
823 | dnl ---------------------------------------------------------------- | |
824 | ||
825 | AC_OVERRIDES(gauge,gauge, | |
826 | **--with-gauge use wxGauge class, | |
8248314d | 827 | wxUSE_GAUGE) |
bcf1fa6b | 828 | |
a60c99e6 RR |
829 | AC_OVERRIDES(combobox,combobox, |
830 | **--with-combobox use wxComboBox class, | |
8248314d | 831 | wxUSE_COMBOBOX) |
a60c99e6 | 832 | |
bcf1fa6b RR |
833 | AC_OVERRIDES(scrollbar,scrollbar, |
834 | **--with-scrollbar use wxScrollbar class, | |
8248314d | 835 | wxUSE_SCROLLBAR) |
bcf1fa6b RR |
836 | |
837 | AC_OVERRIDES(listctrl,listctrl, | |
838 | **--with-listctrl use wxListCtrl class, | |
8248314d | 839 | wxUSE_LISTCTRL) |
bcf1fa6b RR |
840 | |
841 | AC_OVERRIDES(treectrl,treectrl, | |
842 | **--with-treectrl use wxTreeCtrl class, | |
8248314d | 843 | wxUSE_TREECTRL) |
bcf1fa6b RR |
844 | |
845 | AC_OVERRIDES(grid,grid, | |
846 | **--with-grid use wxGrid class, | |
8248314d | 847 | wxUSE_GRID) |
bcf1fa6b RR |
848 | |
849 | AC_OVERRIDES(tab_dialog,tab_dialog, | |
850 | **--with-tab_dialog use wxTabDia class, | |
8248314d | 851 | wxUSE_TAB_DIALOG) |
bcf1fa6b RR |
852 | |
853 | AC_OVERRIDES(notebook,notebook, | |
854 | **--with-notebook use wxNotebook class, | |
8248314d | 855 | wxUSE_NOTEBOOK) |
bcf1fa6b RR |
856 | |
857 | dnl ---------------------------------------------------------------- | |
858 | dnl user options for non-GUI classes | |
859 | dnl ---------------------------------------------------------------- | |
860 | ||
861 | AC_OVERRIDES(timedate, timedate, | |
862 | **--with-timedate use wxTime and wxDate classes, | |
8248314d | 863 | wxUSE_TIMEDATE) |
bcf1fa6b RR |
864 | |
865 | AC_OVERRIDES(fraction,fraction, | |
866 | **--with-fraction use wxFraction class, | |
8248314d | 867 | wxUSE_FRACTION) |
bcf1fa6b RR |
868 | |
869 | AC_OVERRIDES(log,log, | |
870 | **--with-log use logging system, | |
8248314d | 871 | wxUSE_LOG) |
bcf1fa6b RR |
872 | |
873 | AC_OVERRIDES(intl,intl, | |
874 | **--with-intl use internationalization system, | |
8248314d | 875 | wxUSE_INTL) |
bcf1fa6b RR |
876 | |
877 | AC_OVERRIDES(config,config, | |
878 | **--with-config use wxConfig class, | |
8248314d | 879 | wxUSE_CONFIG) |
bcf1fa6b RR |
880 | |
881 | AC_OVERRIDES(streams,streams, | |
882 | **--with-streams use wxStream etc classes, | |
8248314d | 883 | wxUSE_STREAMS) |
bcf1fa6b RR |
884 | |
885 | AC_OVERRIDES(serial,serial, | |
886 | **--with-serial use class serialization, | |
8248314d | 887 | wxUSE_SERIAL) |
bcf1fa6b RR |
888 | |
889 | AC_OVERRIDES(file,file, | |
890 | **--with-file use wxFile class, | |
8248314d | 891 | wxUSE_FILE) |
bcf1fa6b RR |
892 | |
893 | AC_OVERRIDES(textfile,textfile, | |
894 | **--with-textfile use wxTextFile class, | |
8248314d | 895 | wxUSE_TEXTFILE) |
bcf1fa6b RR |
896 | |
897 | dnl ---------------------------------------------------------------- | |
898 | dnl user options for PostScript | |
899 | dnl ---------------------------------------------------------------- | |
900 | ||
901 | AC_OVERRIDES(afmfonts,afmfonts, | |
902 | **--with-afmfonts use Adobe Font Metric Font table, | |
8248314d | 903 | wxUSE_AFM_FOR_POSTSCRIPT) |
bcf1fa6b RR |
904 | |
905 | AC_OVERRIDES(normalized, normalized, | |
906 | **--with-PS-normalized use normalized PS fonts, | |
907 | WX_NORMALIZED_PS_FONTS) | |
908 | ||
909 | AC_OVERRIDES(postscript, postscript, | |
910 | **--with-postscript use wxPostscriptDC device context, | |
8248314d | 911 | wxUSE_POSTSCRIPT) |
bcf1fa6b | 912 | |
fb4e5803 VZ |
913 | dnl ---------------------------------------------------------------- |
914 | dnl user options for wxString and Unicode | |
915 | dnl ---------------------------------------------------------------- | |
916 | ||
917 | AC_OVERRIDES(unicode,unicode, | |
918 | **--with-unicode compile wxString with Unicode support, | |
919 | wxUSE_UNICODE) | |
920 | ||
921 | AC_OVERRIDES(wcsrtombs,wcsrtombs, | |
922 | **--with-wcsrtombs use wcsrtombs instead of (buggy in GNU libc5) wcstombs, | |
923 | wxUSE_WCSRTOMBS) | |
924 | ||
bcf1fa6b RR |
925 | dnl ---------------------------------------------------------------- |
926 | dnl user options for Prolog and Resources | |
927 | dnl ---------------------------------------------------------------- | |
928 | ||
929 | AC_OVERRIDES(wxresources,wxresources, | |
930 | **--with-wxresources use wxWindows's resources, | |
8248314d | 931 | wxUSE_WX_RESOURCES) |
bcf1fa6b RR |
932 | |
933 | AC_OVERRIDES(prologio,prologio, | |
934 | **--with-prologio use Prolog IO library, | |
8248314d | 935 | wxUSE_PROLOGIO) |
bcf1fa6b RR |
936 | |
937 | AC_OVERRIDES(rpc,RPC, | |
938 | **--with-rpc use Prolog's remote procedure calls, | |
8248314d | 939 | wxUSE_RPC) |
bcf1fa6b RR |
940 | |
941 | dnl ---------------------------------------------------------------- | |
942 | dnl user options for misc stuff | |
943 | dnl ---------------------------------------------------------------- | |
944 | ||
945 | AC_OVERRIDES(ipc,IPC, | |
946 | **--with-ipc use interprocess communication (wxSocket etc.), | |
8248314d | 947 | wxUSE_IPC) |
bcf1fa6b RR |
948 | |
949 | AC_OVERRIDES(resources,resources, | |
950 | **--with-resources use X resources for saving information, | |
8248314d | 951 | wxUSE_RESOURCES) |
bcf1fa6b RR |
952 | |
953 | AC_OVERRIDES(clipboard,clipboard, | |
954 | **--with-clipboard use wxClipboard classes, | |
8248314d | 955 | wxUSE_CLIPBOARD) |
bcf1fa6b RR |
956 | |
957 | AC_OVERRIDES(dnd,dnd, | |
958 | **--with-dnd use Drag'n'Drop classes, | |
8248314d | 959 | wxUSE_DND) |
bcf1fa6b RR |
960 | |
961 | AC_OVERRIDES(constraints,constrains, | |
962 | **--with-constraints use layout-constraints system, | |
8248314d | 963 | wxUSE_CONSTRAINTS) |
bcf1fa6b RR |
964 | |
965 | dnl ---------------------------------------------------------------- | |
966 | dnl user options for architectures | |
967 | dnl ---------------------------------------------------------------- | |
968 | ||
969 | AC_OVERRIDES(mdi,mdi, | |
970 | **--with-mdi use multiple document interface architecture, | |
8248314d | 971 | wxUSE_MDI_ARCHITECTURE) |
bcf1fa6b RR |
972 | |
973 | AC_OVERRIDES(docview,docview, | |
974 | **--with-docview use document view architecture, | |
8248314d | 975 | wxUSE_DOC_VIEW_ARCHITECTURE) |
bcf1fa6b RR |
976 | |
977 | AC_OVERRIDES(printarch,printarch, | |
978 | **--with-printarch use printing architecture, | |
8248314d | 979 | wxUSE_PRINTING_ARCHITECTURE) |
bcf1fa6b | 980 | |
e9aad10a KB |
981 | AC_OVERRIDES(help,help, |
982 | **--with-help use help (using external browser at present), | |
983 | wxUSE_HELP) | |
984 | ||
bcf1fa6b RR |
985 | dnl ---------------------------------------------------------------- |
986 | dnl user options with no effect yet | |
987 | dnl ---------------------------------------------------------------- | |
988 | dnl | |
989 | dnl AC_OVERRIDES(metafile, metafile, | |
990 | dnl **--with-metafile use metafile (no effect), | |
d18ed59a | 991 | dnl wxUSE_METAFILE) |
bcf1fa6b | 992 | dnl |
bcf1fa6b RR |
993 | dnl AC_OVERRIDES(wxgraph,wxgraph, |
994 | dnl **--with-wxgraph use wxgraph (no effect), | |
d18ed59a | 995 | dnl wxUSE_WXGRAPH) |
bcf1fa6b RR |
996 | dnl |
997 | dnl AC_OVERRIDES(wxtree,wxtree, | |
998 | dnl **--with-wxtree use wxtree (no effect), | |
d18ed59a | 999 | dnl wxUSE_WXTREE) |
bcf1fa6b RR |
1000 | dnl |
1001 | dnl AC_OVERRIDES(package,message,helpmessage,variable) | |
1002 | dnl | |
1003 | dnl ---------------------------------------------------------------- | |
1004 | dnl Unix, obviously | |
1005 | dnl ---------------------------------------------------------------- | |
1006 | ||
8248314d | 1007 | if test "$wxUSE_UNIX" = 1 ; then |
bcf1fa6b RR |
1008 | AC_DEFINE(__UNIX__) |
1009 | fi | |
1010 | ||
1011 | dnl ---------------------------------------------------------------- | |
1012 | dnl search for toolkit (widget sets) | |
1013 | dnl ---------------------------------------------------------------- | |
1014 | ||
1015 | TOOLKIT= | |
1016 | TOOLKIT_DEF= | |
1017 | ||
1018 | GUI_TK_INCLUDE= | |
1019 | GUI_TK_LIBRARY= | |
1020 | GUI_TK_LINK= | |
1021 | ||
76153302 RR |
1022 | WX_LINK= |
1023 | ||
bcf1fa6b RR |
1024 | MAKEINCLUDE= |
1025 | ||
8248314d | 1026 | if test "$wxUSE_GTK" = 1; then |
fee04295 | 1027 | AM_PATH_GTK(1.0.4, [ |
bcf1fa6b RR |
1028 | GUI_TK_INCLUDE="$GTK_CFLAGS" |
1029 | GUI_TK_LIBRARY="$GTK_LIBS" | |
f3855ef0 | 1030 | ], AC_MSG_ERROR(Is gtk-config in path and GTK+ is version 1.0.4 up-to 1.0.6?)) |
bcf1fa6b RR |
1031 | TOOLKIT=GTK |
1032 | TOOLKIT_DEF=__WXGTK__ | |
d669c241 | 1033 | WX_LINK=-lwx_gtk_1_0 |
bcf1fa6b RR |
1034 | MAKEINCLUDE=../gtk.inc |
1035 | fi | |
1036 | ||
8248314d | 1037 | if test "$wxUSE_QT" = 1; then |
bcf1fa6b RR |
1038 | AC_MSG_CHECKING(for Qt includes) |
1039 | AC_PATH_FIND_INCLUDES($SEARCH_INCLUDE,qapp.h) | |
1040 | if test "$ac_find_includes" != "" ; then | |
1041 | AC_MSG_RESULT(found $ac_find_includes) | |
1042 | AC_MSG_CHECKING(for Qt library) | |
1043 | AC_PATH_FIND_LIBRARIES($SEARCH_LIB,qt) | |
1044 | if test "$ac_find_libraries" != "" ; then | |
1045 | AC_INCLUDE_PATH_EXIST($ac_find_includes,$CHECK_INCLUDE) | |
1046 | AC_LINK_PATH_EXIST($ac_find_libraries,$CHECK_LIB) | |
1047 | CHECK_LINK="$CHECK_INCLUDE $ac_path_to_link" | |
1048 | CHECK_INCLUDE="$CHECK_INCLUDE $ac_path_to_include" | |
1049 | AC_MSG_RESULT(found Qt at $ac_find_libraries) | |
1050 | else | |
1051 | AC_MSG_ERROR(no) | |
1052 | fi | |
1053 | else | |
1054 | AC_MSG_ERROR(no) | |
1055 | fi | |
76153302 | 1056 | GUI_TK_LINK="-lX11 -lqt -lm" |
bcf1fa6b RR |
1057 | TOOLKIT=QT |
1058 | TOOLKIT_DEF=__WXQT__ | |
76153302 | 1059 | WX_LINK=-lwx_qt |
bcf1fa6b RR |
1060 | MAKEINCLUDE=../qt.inc |
1061 | fi | |
1062 | ||
8248314d | 1063 | if test "$wxUSE_MOTIF" = 1; then |
bcf1fa6b RR |
1064 | AC_MSG_CHECKING(for Motif/Lesstif includes) |
1065 | AC_PATH_FIND_INCLUDES($SEARCH_INCLUDE,Xm.h) | |
1066 | if test "$ac_find_includes" != "" ; then | |
1067 | AC_MSG_RESULT(found $ac_find_includes) | |
76153302 | 1068 | AC_MSG_CHECKING(for Motif/Lesstif library) |
bcf1fa6b RR |
1069 | AC_PATH_FIND_LIBRARIES($SEARCH_LIB,Xm) |
1070 | if test "$ac_find_libraries" != "" ; then | |
1071 | AC_INCLUDE_PATH_EXIST($ac_find_includes,$CHECK_INCLUDE) | |
1072 | AC_LINK_PATH_EXIST($ac_find_libraries,$CHECK_LIB) | |
76153302 | 1073 | CHECK_LINK="$CHECK_LIB $ac_path_to_link" |
bcf1fa6b RR |
1074 | CHECK_INCLUDE="$CHECK_INCLUDE $ac_path_to_include" |
1075 | AC_MSG_RESULT(found at $ac_find_libraries) | |
76153302 RR |
1076 | AC_MSG_CHECKING(for Xt library) |
1077 | AC_PATH_FIND_LIBRARIES($SEARCH_LIB,Xt) | |
1078 | if test "$ac_find_libraries" != "" ; then | |
1079 | AC_LINK_PATH_EXIST($ac_find_libraries,$CHECK_LIB) | |
1080 | CHECK_LINK="$CHECK_LIB $ac_path_to_link" | |
1081 | AC_MSG_RESULT(found at $ac_find_libraries) | |
892dbe99 RR |
1082 | AC_MSG_CHECKING(for Xpm library) |
1083 | AC_PATH_FIND_LIBRARIES($SEARCH_LIB,Xpm) | |
1084 | if test "$ac_find_libraries" != "" ; then | |
1085 | AC_LINK_PATH_EXIST($ac_find_libraries,$CHECK_LIB) | |
1086 | CHECK_LINK="$CHECK_LIB $ac_path_to_link" | |
1087 | AC_MSG_RESULT(found at $ac_find_libraries) | |
1088 | else | |
1089 | AC_MSG_ERROR(no) | |
1090 | fi | |
76153302 RR |
1091 | else |
1092 | AC_MSG_ERROR(no) | |
1093 | fi | |
bcf1fa6b RR |
1094 | else |
1095 | AC_MSG_ERROR(no) | |
1096 | fi | |
1097 | else | |
1098 | AC_MSG_ERROR(no) | |
1099 | fi | |
f6c6dd8c RR |
1100 | |
1101 | GUI_TK_LINK="-lXm -lXmu -lXt -lXpm -lX11 -lm" | |
76153302 | 1102 | GUI_TK_LINK="$CHECK_LINK $GUI_TK_LINK" |
bcf1fa6b | 1103 | TOOLKIT=MOTIF |
f6c6dd8c | 1104 | TOOLKIT_DEF="__WXMOTIF__ -D__LINUX__ -D__UNIX__" |
76153302 | 1105 | WX_LINK=-lwx_motif |
bcf1fa6b RR |
1106 | MAKEINCLUDE=../motif.inc |
1107 | fi | |
1108 | ||
1109 | if test "$TOOLKIT" = ""; then | |
1110 | AC_MSG_ERROR(You must specify a toolkit: --with-gtk --with-qt --with-motif) | |
1111 | fi | |
1112 | ||
1113 | AC_SUBST(GUI_TK_INCLUDE) | |
1114 | AC_SUBST(GUI_TK_LIBRARY) | |
1115 | AC_SUBST(GUI_TK_LINK) | |
1116 | ||
76153302 RR |
1117 | AC_SUBST(WX_LINK) |
1118 | ||
bcf1fa6b RR |
1119 | AC_SUBST(TOOLKIT) |
1120 | AC_SUBST(TOOLKIT_DEF) | |
1121 | ||
1122 | AC_SUBST(MAKEINCLUDE) | |
1123 | ||
1124 | dnl ---------------------------------------------------------------- | |
1125 | dnl Register compile options for makefiles and setup.h | |
1126 | dnl ---------------------------------------------------------------- | |
1127 | ||
1128 | WXDEBUG= | |
2904eefd KB |
1129 | if test "$wxUSE_DEBUG_GDB" = 1 ; then |
1130 | wxUSE_DEBUG_INFO=1 | |
f6c6dd8c RR |
1131 | WXDEBUG="-ggdb" |
1132 | wxUSE_OPTIMISE=0 | |
2904eefd KB |
1133 | else |
1134 | if test "$wxUSE_DEBUG_INFO" = 1 ; then | |
1135 | WXDEBUG="-g" | |
1136 | wxUSE_OPTIMISE=0 | |
f0bec3de | 1137 | fi |
bcf1fa6b RR |
1138 | fi |
1139 | AC_SUBST(WXDEBUG) | |
1140 | ||
8248314d VZ |
1141 | if test "$wxUSE_DEBUG_FLAG" = 1 ; then |
1142 | AC_DEFINE_UNQUOTED(WXDEBUG,$wxUSE_DEBUG_FLAG) | |
bcf1fa6b RR |
1143 | WXDEBUG_DEFINE="-D__WXDEBUG__" |
1144 | AC_SUBST(WXDEBUG_DEFINE) | |
f96aa4d9 RR |
1145 | else |
1146 | WXDEBUG_DEFINE="-DGTK_NO_CHECK_CASTS" | |
1147 | AC_SUBST(WXDEBUG_DEFINE) | |
bcf1fa6b RR |
1148 | fi |
1149 | ||
8248314d VZ |
1150 | if test "$wxUSE_MEM_TRACING" = 1 ; then |
1151 | AC_DEFINE_UNQUOTED(wxUSE_MEMORY_TRACING,$wxUSE_MEM_TRACING) | |
1152 | AC_DEFINE_UNQUOTED(wxUSE_GLOBAL_MEMORY_OPERATORS,$wxUSE_MEM_TRACING) | |
bcf1fa6b RR |
1153 | fi |
1154 | ||
1155 | EXTRA_LINK= | |
8248314d | 1156 | if test "$wxUSE_DMALLOC" = 1 ; then |
bcf1fa6b RR |
1157 | EXTRA_LINK="$EXTRA_LINK -ldmalloc" |
1158 | fi | |
1159 | AC_SUBST(EXTRA_LINK) | |
1160 | ||
1161 | PROFILE= | |
8248314d | 1162 | if test "$wxUSE_PROFILE" = 1 ; then |
bcf1fa6b RR |
1163 | PROFILE="-pg" |
1164 | fi | |
1165 | AC_SUBST(PROFILE) | |
1166 | ||
1167 | CXXFLAGS=`echo "${CXXFLAGS}" | sed "s/\-O.//g" ` | |
1168 | CFLAGS=`echo "${CFLAGS}" | sed "s/\-O.//g" ` | |
8248314d | 1169 | if test "$wxUSE_OPTIMISE" = 0 ; then |
bcf1fa6b RR |
1170 | OPTIMISE= |
1171 | else | |
1172 | if test "$GCC" = yes ; then | |
1173 | OPTIMISE="-O2" | |
1174 | case "${canonical}" in | |
1175 | i586-*-*|i686-*-* ) | |
1176 | OPTIMISE="${OPTIMISE} " | |
1177 | ;; | |
1178 | esac | |
1179 | else | |
1180 | OPTIMISE="-O" | |
1181 | fi | |
1182 | fi | |
1183 | AC_SUBST(OPTIMISE) | |
1184 | ||
1185 | APPLE_IEEE=NONE | |
8248314d | 1186 | if test "$wxUSE_APPLE_IEEE" = 1 ; then |
bcf1fa6b | 1187 | APPLE_IEEE="APPLE_IEEE" |
8248314d | 1188 | AC_DEFINE_UNQUOTED(wxUSE_APPLE_IEEE,$wxUSE_APPLE_IEEE) |
bcf1fa6b RR |
1189 | fi |
1190 | ||
8248314d VZ |
1191 | wxUSE_IOSTREAMH=$DEFAULT_wxUSE_IOSTREAMH |
1192 | AC_DEFINE_UNQUOTED(wxUSE_IOSTREAMH,$wxUSE_IOSTREAMH) | |
bcf1fa6b RR |
1193 | |
1194 | dnl ---------------------------------------------------------------- | |
1195 | dnl Register library options for makefiles and setup.h | |
1196 | dnl ---------------------------------------------------------------- | |
1197 | ||
8248314d VZ |
1198 | if test "$wxUSE_ZLIB" = 1 ; then |
1199 | AC_DEFINE_UNQUOTED(wxUSE_ZLIB,$wxUSE_ZLIB) | |
bcf1fa6b RR |
1200 | fi |
1201 | ||
8248314d VZ |
1202 | if test "$wxUSE_LIBPNG" = 1 ; then |
1203 | AC_DEFINE_UNQUOTED(wxUSE_LIBPNG,$wxUSE_LIBPNG) | |
bcf1fa6b RR |
1204 | fi |
1205 | ||
84b46c35 | 1206 | IODBC_C_SRC="" |
8248314d VZ |
1207 | if test "$wxUSE_ODBC" = 1 ; then |
1208 | AC_DEFINE_UNQUOTED(wxUSE_ODBC,$wxUSE_ODBC) | |
84b46c35 | 1209 | IODBC_C_SRC="\$(IODBC_C_SRC)" |
bcf1fa6b | 1210 | fi |
84b46c35 | 1211 | AC_SUBST(IODBC_C_SRC) |
bcf1fa6b RR |
1212 | |
1213 | dnl ---------------------------------------------------------------- | |
1214 | dnl Register GUI-control options for makefiles and setup.h | |
1215 | dnl ---------------------------------------------------------------- | |
1216 | ||
8248314d VZ |
1217 | if test "$wxUSE_GAUGE" = 1 ; then |
1218 | AC_DEFINE_UNQUOTED(wxUSE_GAUGE,$wxUSE_GAUGE) | |
bcf1fa6b RR |
1219 | fi |
1220 | ||
8248314d VZ |
1221 | if test "$wxUSE_COMBOBOX" = 1 ; then |
1222 | AC_DEFINE_UNQUOTED(wxUSE_COMBOBOX,$wxUSE_COMBOBOX) | |
a60c99e6 RR |
1223 | fi |
1224 | ||
8248314d VZ |
1225 | if test "$wxUSE_SCROLLBAR" = 1 ; then |
1226 | AC_DEFINE_UNQUOTED(wxUSE_SCROLLBAR,$wxUSE_SCROLLBAR) | |
bcf1fa6b RR |
1227 | fi |
1228 | ||
8248314d VZ |
1229 | if test "$wxUSE_LISTCTRL" = 1 ; then |
1230 | AC_DEFINE_UNQUOTED(wxUSE_LISTCTRL,$wxUSE_LISTCTRL) | |
bcf1fa6b RR |
1231 | fi |
1232 | ||
8248314d VZ |
1233 | if test "$wxUSE_TREECTRL" = 1 ; then |
1234 | AC_DEFINE_UNQUOTED(wxUSE_TREECTRL,$wxUSE_TREECTRL) | |
bcf1fa6b RR |
1235 | fi |
1236 | ||
8248314d VZ |
1237 | if test "$wxUSE_GRID" = 1 ; then |
1238 | AC_DEFINE_UNQUOTED(wxUSE_GRID,$wxUSE_GRID) | |
bcf1fa6b RR |
1239 | fi |
1240 | ||
8248314d VZ |
1241 | if test "$wxUSE_TAB_DIALOG" = 1 ; then |
1242 | AC_DEFINE_UNQUOTED(wxUSE_TAB_DIALOG,$wxUSE_TAB_DIALOG) | |
bcf1fa6b RR |
1243 | fi |
1244 | ||
8248314d VZ |
1245 | if test "$wxUSE_NOTEBOOK" = 1 ; then |
1246 | AC_DEFINE_UNQUOTED(wxUSE_NOTEBOOK,$wxUSE_NOTEBOOK) | |
bcf1fa6b RR |
1247 | fi |
1248 | ||
1249 | dnl ---------------------------------------------------------------- | |
1250 | dnl Register non-GUI class options for makefiles and setup.h | |
1251 | dnl ---------------------------------------------------------------- | |
1252 | ||
8248314d VZ |
1253 | if test "$wxUSE_CONFIG" = 1 ; then |
1254 | AC_DEFINE_UNQUOTED(wxUSE_CONFIG,$wxUSE_CONFIG) | |
bcf1fa6b RR |
1255 | fi |
1256 | ||
8248314d VZ |
1257 | if test "$wxUSE_TIMEDATE" = 1 ; then |
1258 | AC_DEFINE_UNQUOTED(wxUSE_TIMEDATE,$wxUSE_TIMEDATE) | |
bcf1fa6b RR |
1259 | fi |
1260 | ||
8248314d VZ |
1261 | if test "$wxUSE_FRACTION" = 1 ; then |
1262 | AC_DEFINE_UNQUOTED(wxUSE_FRACTION,$wxUSE_FRACTION) | |
bcf1fa6b RR |
1263 | fi |
1264 | ||
8248314d VZ |
1265 | if test "$wxUSE_LOG" = 1 ; then |
1266 | AC_DEFINE_UNQUOTED(wxUSE_LOG,$wxUSE_LOG) | |
bcf1fa6b RR |
1267 | fi |
1268 | ||
8248314d VZ |
1269 | if test "$wxUSE_INTL" = 1 ; then |
1270 | AC_DEFINE_UNQUOTED(wxUSE_INTL,$wxUSE_INTL) | |
bcf1fa6b RR |
1271 | fi |
1272 | ||
8248314d VZ |
1273 | if test "$wxUSE_STREAMS" = 1 ; then |
1274 | AC_DEFINE_UNQUOTED(wxUSE_STREAMS,$wxUSE_STREAMS) | |
bcf1fa6b RR |
1275 | fi |
1276 | ||
8248314d VZ |
1277 | if test "$wxUSE_SERIAL" = 1 ; then |
1278 | AC_DEFINE_UNQUOTED(wxUSE_SERIAL,$wxUSE_SERIAL) | |
bcf1fa6b RR |
1279 | fi |
1280 | ||
8248314d VZ |
1281 | if test "$wxUSE_FILE" = 1 ; then |
1282 | AC_DEFINE_UNQUOTED(wxUSE_FILE,$wxUSE_FILE) | |
bcf1fa6b RR |
1283 | fi |
1284 | ||
8248314d VZ |
1285 | if test "$wxUSE_TEXTFILE" = 1 ; then |
1286 | AC_DEFINE_UNQUOTED(wxUSE_TEXTFILE,$wxUSE_TEXTFILE) | |
bcf1fa6b RR |
1287 | fi |
1288 | ||
1289 | dnl ---------------------------------------------------------------- | |
1290 | dnl Register Prolog and Resources options for makefiles and setup.h | |
1291 | dnl ---------------------------------------------------------------- | |
1292 | ||
8248314d VZ |
1293 | if test "$wxUSE_RPC" = 1 ; then |
1294 | AC_DEFINE_UNQUOTED(wxUSE_RPC,$wxUSE_RPC) | |
bcf1fa6b RR |
1295 | fi |
1296 | ||
8248314d VZ |
1297 | if test "$wxUSE_WX_RESOURCES" = 1 ; then |
1298 | AC_DEFINE_UNQUOTED(wxUSE_WX_RESOURCES,$wxUSE_WX_RESOURCES) | |
bcf1fa6b RR |
1299 | fi |
1300 | ||
8248314d VZ |
1301 | if test "$wxUSE_PROLOGIO" = 1 ; then |
1302 | AC_DEFINE_UNQUOTED(wxUSE_PROLOGIO) | |
bcf1fa6b RR |
1303 | fi |
1304 | ||
1305 | dnl ---------------------------------------------------------------- | |
1306 | dnl Register PostScript options for makefiles and setup.h | |
1307 | dnl ---------------------------------------------------------------- | |
1308 | ||
8248314d VZ |
1309 | if test "$wxUSE_POSTSCRIPT" = 1 ; then |
1310 | AC_DEFINE_UNQUOTED(wxUSE_POSTSCRIPT) | |
bcf1fa6b RR |
1311 | fi |
1312 | ||
8248314d | 1313 | AC_DEFINE_UNQUOTED(wxUSE_AFM_FOR_POSTSCRIPT,$wxUSE_AFM_FOR_POSTSCRIPT) |
bcf1fa6b RR |
1314 | |
1315 | AC_DEFINE_UNQUOTED(WX_NORMALIZED_PS_FONTS,$WX_NORMALIZED_PS_FONTS) | |
1316 | ||
1317 | dnl ---------------------------------------------------------------- | |
1318 | dnl Register architecture options for makefiles and setup.h | |
1319 | dnl ---------------------------------------------------------------- | |
1320 | ||
8248314d VZ |
1321 | if test "$wxUSE_MDI_ARCHITECTURE" = 1 ; then |
1322 | AC_DEFINE_UNQUOTED(wxUSE_MDI_ARCHITECTURE,$wxUSE_MDI_ARCHITECTURE) | |
bcf1fa6b RR |
1323 | fi |
1324 | ||
8248314d VZ |
1325 | if test "$wxUSE_DOC_VIEW_ARCHITECTURE" = 1 ; then |
1326 | AC_DEFINE_UNQUOTED(wxUSE_DOC_VIEW_ARCHITECTURE,$wxUSE_DOC_VIEW_ARCHITECTURE) | |
bcf1fa6b RR |
1327 | fi |
1328 | ||
8248314d VZ |
1329 | if test "$wxUSE_PRINTING_ARCHITECTURE" = 1 ; then |
1330 | AC_DEFINE_UNQUOTED(wxUSE_PRINTING_ARCHITECTURE,$wxUSE_PRINTING_ARCHITECTURE) | |
bcf1fa6b RR |
1331 | fi |
1332 | ||
fb4e5803 VZ |
1333 | dnl ---------------------------------------------------------------- |
1334 | dnl Register wxString options for makefiles and setup.h | |
1335 | dnl ---------------------------------------------------------------- | |
1336 | ||
1337 | if test "$wxUSE_UNICODE" = 1 ; then | |
1338 | AC_DEFINE_UNQUOTED(wxUSE_UNICODE) | |
1339 | fi | |
1340 | ||
1341 | if test "$wxUSE_WCSRTOMBS" = 1 ; then | |
1342 | AC_DEFINE_UNQUOTED(wxUSE_WCSRTOMBS) | |
1343 | fi | |
1344 | ||
bcf1fa6b RR |
1345 | dnl ---------------------------------------------------------------- |
1346 | dnl Register misc options for makefiles and setup.h | |
1347 | dnl ---------------------------------------------------------------- | |
1348 | ||
8248314d VZ |
1349 | if test "$wxUSE_IPC" = 1 ; then |
1350 | AC_DEFINE_UNQUOTED(wxUSE_IPC) | |
bcf1fa6b RR |
1351 | fi |
1352 | ||
8248314d VZ |
1353 | if test "$wxUSE_RESOURCES" = 1 ; then |
1354 | AC_DEFINE_UNQUOTED(wxUSE_RESOURCES,$wxUSE_RESOURCES) | |
bcf1fa6b RR |
1355 | fi |
1356 | ||
8248314d VZ |
1357 | if test "$wxUSE_CLIPBOARD" = 1 ; then |
1358 | AC_DEFINE_UNQUOTED(wxUSE_CLIPBOARD,$wxUSE_CLIPBOARD) | |
bcf1fa6b RR |
1359 | fi |
1360 | ||
8248314d VZ |
1361 | if test "$wxUSE_DND" = 1 ; then |
1362 | AC_DEFINE_UNQUOTED(wxUSE_DND,$wxUSE_DND) | |
bcf1fa6b RR |
1363 | fi |
1364 | ||
8248314d VZ |
1365 | if test "$wxUSE_CONSTRAINTS" = 1 ; then |
1366 | AC_DEFINE_UNQUOTED(wxUSE_CONSTRAINTS,$wxUSE_CONSTRAINTS) | |
bcf1fa6b RR |
1367 | fi |
1368 | ||
1369 | dnl ---------------------------------------------------------------- | |
1370 | dnl No effect | |
1371 | dnl ---------------------------------------------------------------- | |
1372 | ||
1373 | METAFILE=NONE | |
8248314d | 1374 | if test "$wxUSE_METAFILE" = 1 ; then |
bcf1fa6b | 1375 | METAFILE="METAFILE" |
8248314d | 1376 | AC_DEFINE_UNQUOTED(wxUSE_METAFILE,$wxUSE_METAFILE) |
bcf1fa6b RR |
1377 | fi |
1378 | AC_SUBST(METAFILE) | |
1379 | ||
1380 | HELP=NONE | |
8248314d | 1381 | if test "$wxUSE_HELP" = 1 ; then |
bcf1fa6b | 1382 | HELP="HELP" |
8248314d | 1383 | AC_DEFINE_UNQUOTED(wxUSE_HELP,$wxUSE_HELP) |
bcf1fa6b RR |
1384 | fi |
1385 | AC_SUBST(HELP) | |
1386 | ||
1387 | WXGRAPH=NONE | |
8248314d | 1388 | if test "$wxUSE_WXGRAPH" = 1 ; then |
bcf1fa6b | 1389 | WXGRAPH="WXGRAPH" |
8248314d | 1390 | AC_DEFINE_UNQUOTED(wxUSE_WXGRAPH,$wxUSE_WXGRAPH) |
bcf1fa6b RR |
1391 | fi |
1392 | AC_SUBST(WXGRAPH) | |
1393 | ||
1394 | WXTREE=NONE | |
8248314d | 1395 | if test "$wxUSE_WXTREE" = 1 ; then |
bcf1fa6b | 1396 | WXTREE="WXTREE" |
8248314d | 1397 | AC_DEFINE_UNQUOTED(wxUSE_WXTREE,$wxUSE_WXTREE) |
bcf1fa6b RR |
1398 | fi |
1399 | AC_SUBST(WXTREE) | |
1400 | ||
1401 | GLCANVAS=NONE | |
8248314d | 1402 | if test "$wxUSE_OPENGL" = 1 ; then |
bcf1fa6b RR |
1403 | GLCANVAS="GLCANVAS" |
1404 | fi | |
1405 | ||
1406 | dnl ---------------------------------------------------------------- | |
1407 | dnl select dynamic loader (used by iODBC to load drivers) | |
1408 | dnl ---------------------------------------------------------------- | |
1409 | ||
cb17fe41 | 1410 | AC_CHECK_LIB(dl,main,[DL_LIBRARY=-ldl],[DL_LIBRARY=]) |
bcf1fa6b RR |
1411 | AC_SUBST(DL_LIBRARY) |
1412 | ||
1413 | dnl ---------------------------------------------------------------- | |
1414 | dnl thread support | |
1415 | dnl ---------------------------------------------------------------- | |
1416 | ||
d18ed59a | 1417 | wxUSE_THREADS=1 |
bcf1fa6b | 1418 | THREADS_LINK="" |
cb43b372 RR |
1419 | UNIX_THREAD="gtk/threadno.cpp" |
1420 | ||
1421 | AC_OVERRIDES(threads,threads, | |
1422 | **--without-threads Force disabling threads, | |
d18ed59a | 1423 | wxUSE_THREADS) |
bcf1fa6b | 1424 | |
d18ed59a | 1425 | if test "$wxUSE_THREADS" = "1"; then |
bcf1fa6b | 1426 | |
926c550d GL |
1427 | case "$os" in |
1428 | solaris*) | |
bcf1fa6b | 1429 | |
926c550d GL |
1430 | AC_CHECK_LIB(thread, thr_create, [ |
1431 | UNIX_THREAD="gtk/threadsol.cpp" | |
1432 | THREADS_LINK="-lthread" | |
1433 | ]) | |
1434 | ;; | |
1435 | ||
1436 | *) | |
1437 | ||
1438 | UNIX_THREAD="gtk/threadno.cpp" | |
1439 | ||
1440 | dnl For glibc 2 users who have the old libc 5 too | |
bcf1fa6b | 1441 | |
926c550d GL |
1442 | AC_CHECK_LIB(pthread-0.7, pthread_create, [ |
1443 | UNIX_THREAD="gtk/threadpsx.cpp" | |
1444 | THREADS_LINK="-lpthread-0.7" | |
1445 | ],[ | |
1446 | AC_CHECK_HEADER(sys/prctl.h, [ | |
1447 | UNIX_THREAD="gtk/threadsgi.cpp" | |
1448 | ]) | |
1449 | ||
1450 | dnl pthread_create is always available in pthread but it seems not to be | |
1451 | dnl the case for pthread_setcanceltype. | |
bcf1fa6b | 1452 | |
926c550d | 1453 | AC_CHECK_LIB(pthread, pthread_setcanceltype, [ |
bcf1fa6b RR |
1454 | UNIX_THREAD="gtk/threadpsx.cpp" |
1455 | THREADS_LINK="-lpthread" | |
926c550d GL |
1456 | ]) |
1457 | ]) | |
f3855ef0 RR |
1458 | |
1459 | dnl -lposix4 seems to be required on Solaris | |
926c550d GL |
1460 | |
1461 | AC_CHECK_LIB(posix4, printf, [ | |
1462 | THREADS_LINK="$THREADS_LINK -lposix4" | |
1463 | ]);; | |
1464 | ||
1465 | esac | |
bcf1fa6b RR |
1466 | fi |
1467 | ||
d18ed59a RR |
1468 | if test "$wxUSE_MOTIF" = "1"; then |
1469 | UNIX_THREAD="motif/thread.cpp" | |
1470 | fi | |
1471 | ||
bcf1fa6b | 1472 | if test -z "$UNIX_THREAD"; then |
d18ed59a | 1473 | wxUSE_THREADS=0 |
bcf1fa6b RR |
1474 | fi |
1475 | ||
1476 | AC_SUBST(UNIX_THREAD) | |
1477 | AC_SUBST(THREADS_LINK) | |
d18ed59a | 1478 | AC_DEFINE(wxUSE_THREADS) |
bcf1fa6b RR |
1479 | |
1480 | dnl defines UNIX_THREAD it contains the source file to use for threads. (GL) | |
1481 | dnl defines THREADS_LINK it contains the thread library to link with. (GL) | |
d18ed59a | 1482 | dnl defines wxUSE_THREADS if thread support is activated. (GL) |
bcf1fa6b RR |
1483 | |
1484 | dnl ---------------------------------------------------------------- | |
1485 | dnl search for opengl | |
1486 | dnl ---------------------------------------------------------------- | |
1487 | ||
1488 | OPENGL_INCLUDE= | |
1489 | OPENGL_LIBRARY= | |
1490 | OPENGL_LINK= | |
1491 | ||
8248314d | 1492 | if test "$wxUSE_OPENGL" = 1; then |
bcf1fa6b RR |
1493 | dnl checking OPENGL includes |
1494 | AC_MSG_CHECKING(for OpenGL includes) | |
1495 | AC_PATH_FIND_INCLUDES($SEARCH_INCLUDE,GL/gl.h) | |
1496 | if test "$ac_find_includes" != "" ; then | |
1497 | OPENGL_INCLUDE="-I$ac_find_includes" | |
1498 | AC_MSG_RESULT(found $ac_find_includes) | |
1499 | dnl checking OPENGL libraries | |
1500 | AC_MSG_CHECKING(for OpenGL library) | |
1501 | AC_PATH_FIND_LIBRARIES($SEARCH_LIB,GL) | |
1502 | if test "$ac_find_libraries" != "" ; then | |
1503 | AC_INCLUDE_PATH_EXIST($ac_find_includes,$CHECK_INCLUDE) | |
1504 | AC_LINK_PATH_EXIST($ac_find_libraries,$CHECK_LIB) | |
1505 | CHECK_LINK="$CHECK_INCLUDE $ac_path_to_link" | |
1506 | CHECK_INCLUDE="$CHECK_INCLUDE $ac_path_to_include" | |
1507 | OPENGL_LIBRARY="$ac_path_to_link" | |
1508 | OPENGL_INCLUDE="$ac_path_to_include" | |
1509 | OPENGL_LINK="-lGL" | |
1510 | AC_MSG_RESULT(found OpenGL at $ac_find_libraries) | |
1511 | else | |
1512 | AC_PATH_FIND_LIBRARIES($SEARCH_LIB,MesaGL) | |
1513 | if test "$ac_find_libraries" != "" ; then | |
1514 | AC_INCLUDE_PATH_EXIST($ac_find_includes,$CHECK_INCLUDE) | |
1515 | AC_LINK_PATH_EXIST($ac_find_libraries,$CHECK_LIB) | |
1516 | CHECK_LINK="$CHECK_INCLUDE $ac_path_to_link" | |
1517 | CHECK_INCLUDE="$CHECK_INCLUDE $ac_path_to_include" | |
1518 | OPENGL_LIBRARY="$ac_path_to_link" | |
1519 | OPENGL_INCLUDE="$ac_path_to_include" | |
1520 | OPENGL_LINK="-lMesaGL" | |
1521 | AC_MSG_RESULT(found MESA at $ac_find_libraries) | |
1522 | else | |
1523 | AC_MSG_ERROR(no) | |
1524 | fi | |
1525 | fi | |
1526 | else | |
1527 | AC_MSG_ERROR(no) | |
1528 | fi | |
1529 | fi | |
1530 | ||
1531 | dnl ---------------------------------------------------------------- | |
1532 | dnl left-over | |
1533 | dnl ---------------------------------------------------------------- | |
1534 | ||
8248314d VZ |
1535 | wxUSE_GLX=$wxUSE_OPENGL |
1536 | if test "$wxUSE_OPENGL" != 1; then | |
bcf1fa6b RR |
1537 | OPENGL_LIBRARIES= |
1538 | OPENGL_INCLUDE= | |
1539 | OPENGL_LINK= | |
1540 | GLCANVAS=NONE | |
1541 | fi | |
1542 | ||
8248314d | 1543 | AC_DEFINE_UNQUOTED(wxUSE_GLX,$wxUSE_GLX) |
bcf1fa6b RR |
1544 | AC_SUBST(OPENGL_INCLUDE) |
1545 | AC_SUBST(OPENGL_LIBRARY) | |
1546 | AC_SUBST(OPENGL_LINK) | |
1547 | AC_SUBST(GLCANVAS) | |
1548 | ||
1549 | dnl ------------------------------------------------------------------------ | |
1550 | dnl compiler options for shared libs | |
1551 | dnl ------------------------------------------------------------------------ | |
1552 | ||
1553 | PICFLAGS= | |
1554 | CREATE_SHARED= | |
1555 | case "${canonical}" in | |
1556 | ||
1557 | *-hp-hpux* ) | |
7cacdad3 | 1558 | if test "$GCC" != "yes" ; then |
bcf1fa6b RR |
1559 | CXXFLAGS="${CXXFLAGS} +a1 -z -Aa -D_HPUX_SOURCE" |
1560 | CFLAGS="${CFLAGS} -z -D_HPUX_SOURCE" | |
1561 | PICFLAGS="+z" | |
1562 | else | |
1563 | PICFLAGS="-fPIC" | |
1564 | fi | |
1565 | LDFLAGS="-Wl,+s" | |
1566 | CREATE_SHARED=sharedHpux | |
1567 | ;; | |
1568 | ||
1569 | *-*-linux* ) | |
1570 | PICFLAGS=-fPIC | |
1571 | CREATE_SHARED=sharedLinux | |
1572 | ;; | |
1573 | ||
1574 | *-*-irix5* | *-*-irix6* ) | |
1575 | # PICFLAGS can remain empty, as pic is the default | |
1576 | LDFLAGS="-Wl,+s" | |
1577 | CREATE_SHARED=sharedIrix | |
1578 | AC_DEFINE(SVR4) | |
1579 | ;; | |
1580 | ||
1581 | *-*-solaris2* ) | |
7cacdad3 | 1582 | if test "$GCC" != "yes" ; then |
bcf1fa6b RR |
1583 | PICFLAGS="-KPIC" |
1584 | else | |
1585 | PICFLAGS="-fPIC" | |
1586 | fi | |
1587 | CREATE_SHARED=sharedSolaris2 | |
1588 | AC_DEFINE(SVR4) | |
1589 | ;; | |
1590 | ||
1591 | *-*-sunos4* ) | |
7cacdad3 | 1592 | if test "$GCC" != "yes" ; then |
bcf1fa6b RR |
1593 | PICFLAGS="-PIC" |
1594 | else | |
1595 | PICFLAGS="-fPIC" | |
1596 | fi | |
1597 | LDFLAGS="-Wl,+s" | |
1598 | CREATE_SHARED=sharedSunos4 | |
1599 | AC_DEFINE(BSD) | |
1600 | ;; | |
1601 | ||
1602 | *-*-freebsd* | *-*-netbsd*) | |
1603 | PICFLAGS=-fPIC | |
1604 | CREATE_SHARED=sharedBsd | |
1605 | AC_DEFINE(BSD) | |
1606 | ;; | |
1607 | ||
1608 | *-*-osf* ) | |
1609 | PICFLAGS="-fPIC" | |
1610 | CREATE_SHARED=sharedOSF | |
1611 | ;; | |
1612 | ||
1613 | *-*-dgux5* ) | |
7cacdad3 | 1614 | if test "$GCC" != "yes" ; then |
bcf1fa6b RR |
1615 | PICFLAGS="-K PIC" |
1616 | else | |
1617 | PICFLAGS="-fPIC" | |
1618 | fi | |
1619 | CREATE_SHARED=sharedDgux | |
1620 | AC_DEFINE(SVR4) | |
1621 | ;; | |
1622 | ||
1623 | *-*-sysv5* ) | |
7cacdad3 | 1624 | if test "$GCC" != "yes" ; then |
bcf1fa6b RR |
1625 | PICFLAGS="-K PIC" |
1626 | else | |
1627 | PICFLAGS="-fPIC" | |
1628 | fi | |
1629 | CREATE_SHARED=sharedSysV | |
1630 | AC_DEFINE(SVR4) | |
1631 | ;; | |
1632 | ||
1633 | *-*-aix* ) | |
7cacdad3 | 1634 | if test "$GCC" != "yes" ; then |
bcf1fa6b RR |
1635 | PICFLAGS="-bM\:SRE" |
1636 | else | |
1637 | PICFLAGS="-fPIC" | |
1638 | fi | |
1639 | CREATE_SHARED=sharedAIX | |
1640 | AC_DEFINE(SYSV) | |
1641 | ;; | |
1642 | ||
1643 | *) | |
1644 | CREATE_SHARED= | |
1645 | PICFLAGS= | |
1646 | esac | |
1647 | ||
1648 | if test "x$GCC" = xyes; then | |
1649 | CFLAGS="${CFLAGS} -Wall" | |
1650 | fi | |
1651 | ||
1652 | if test "x$GXX" = xyes; then | |
f6c6dd8c RR |
1653 | if test "$wxUSE_MOTIF" = 1; then |
1654 | CXXFLAGS="${CXXFLAGS} -Wall -Wno-unused" | |
1655 | else | |
1656 | CXXFLAGS="${CXXFLAGS} -Wall" | |
1657 | fi | |
bcf1fa6b RR |
1658 | fi |
1659 | ||
8248314d | 1660 | if test "$wxUSE_SHARED" != 1; then |
bcf1fa6b RR |
1661 | CREATE_SHARED= |
1662 | PICFLAGS= | |
1663 | fi | |
1664 | ||
1665 | AC_SUBST(OS) | |
1666 | AC_SUBST(PICFLAGS) | |
1667 | AC_SUBST(CREATE_SHARED) | |
1668 | ||
1669 | dnl ------------------------------------------------------------------------ | |
1670 | dnl finish and clean-up | |
1671 | dnl ------------------------------------------------------------------------ | |
1672 | ||
1673 | dnl add OS to list of configured | |
1674 | echo $OS >> system.list | |
1675 | ||
c98f0421 | 1676 | AC_CONFIG_HEADER(./include/wx/gtk/setup.h:./setup/setup.hin) |
f3cb6592 | 1677 | AC_OUTPUT(./setup/substit ./wx-config:./wx-config.in,./setup/general/createall) |
bcf1fa6b RR |
1678 | |
1679 | AC_OVERRIDES_DONE |