fix remapping behavior. Remapping is only necessary if we are rendering on the workbe...
[AROS-Contrib.git] / gfx / XaoS / configure.in
blobcc2c8057994a10c52eaada505a6dbc6a78666033
1 AC_INIT(src/engine/zoom.c)
2 AC_CONFIG_HEADER(src/include/aconfig.h)
3 AC_CANONICAL_SYSTEM
4 CCOPTS="$CFLAGS"
5 CCOPTS1="$CFLAGS1"
6 AC_PROG_CC
7 AC_PROG_GCC_TRADITIONAL
9 dnl
10 dnl drivers to test (if available)
11 dnl
13 x_driver_test=yes
14 curses_driver_test=yes
15 aa_driver_test=yes
16 vga_driver_test=yes
17 long_double=test
18 pthread=no
20 dnl
21 dnl Long double is a way to archieve deeper zooms. It is very fast
22 dnl at intel processors familly but seems to be very slow at almost
23 dnl all other platforms. This switch tries to determine whether long_double
24 dnl is optimal
25 dnl
26 AC_ARG_WITH(long-double,
27         [  --with-long-double=yes/no    Used to enable/disable usage of long double],[
28         if test x$withval = xyes; then
29           long_double=yes
30         fi
31         if test x$withval = xno; then
32           long_double=no
33         fi
35 AC_ARG_WITH(pthread,
36         [  --with-pthread=yes          Used to enable SMP support (experimental)],[
37         if test x$withval = xyes; then
38           pthread=test
39         fi
40         if test x$withval = xno; then
41           pthread=no
42         fi
45 AC_DEFUN(AC_PROG_CC_M,
46 [AC_CACHE_CHECK(whether ${CC-cc} accepts -m$1, ac_cv_prog_cc_m$1,
47 [echo 'void f(){}' > conftest.c
48 if test -z "`${CC-cc} -m$1 -c conftest.c 2>&1`"; then
49     ac_cv_prog_cc_m$1=yes
50     else
51         ac_cv_prog_cc_m$1=no
52     fi
53         rm -f conftest*
54 ])])
55 AC_DEFUN(PROG_CC_SWITCH1,
56 [AC_CACHE_CHECK(whether ${CC-cc} accepts -$1, ac_$2,
57 [echo 'void f(){}' > conftest.c
58 if test -z "`${CC-cc} -$1 -c conftest.c 2>&1`"; then
59     eval "ac_$2=yes"
60     CCOPTS1="$CCOPTS1 -$1"
61     else
62         eval "ac_$2=no"
63     fi
64         rm -f conftest*
65 ])])
66 AC_DEFUN(PROG_CC_SWITCH,
67 [AC_CACHE_CHECK(whether ${CC-cc} accepts -$1, ac_$2,
68 [echo 'void f(){}' > conftest.c
69 if test -z "`${CC-cc} -$1 -c conftest.c 2>&1`"; then
70     eval "ac_$2=yes"
71     CCOPTS="$CCOPTS -$1"
72     else
73         eval "ac_$2=no"
74     fi
75         rm -f conftest*
76 ])])
77 AC_DEFUN(PROG_GCC_Os,
78 [AC_CACHE_CHECK(whether ${CC-cc} accepts -Os, ac_Os,
79 [echo 'void f(){}' > conftest.c
80 if test -z "`${CC-cc} -Os -c conftest.c 2>&1`"; then
81     ac_Os=yes
82     CCOPTS="$CCOPTS -$1"
83     else
84         ac_Os=no
85     fi
86         rm -f conftest*
87 ])])
91 if test x$long_double = xtest; then
92 case $target_cpu in
93 i?86*) long_double=yes
94            mflag=486
95            case $target_cpu in
96            i386*)
97             mmflag=-m386
98             ;;
99            i486*)
100             mmflag=-m486
101             ;;
102            i586*)
103             AC_PROG_CC_M(pentium)
104             if test $ac_cv_prog_cc_mpentium = yes; then
105               mmflag=-mpentium
106             else
107             AC_PROG_CC_M(586)
108             if test $ac_cv_prog_cc_m586 = yes; then
109               mmflag=-m586
110             else
111             mmflag=-m486
112             fi
113             fi
114             ;;
115            i?86*)
116             AC_PROG_CC_M(pentiumpro)
117             if test $ac_cv_prog_cc_mpentiumpro = yes; then
118               mmflag=-mpentiumpro
119             else
120             AC_PROG_CC_M(686)
121             if test $ac_cv_prog_cc_m686 = yes; then
122               mmflag=-m686
123             else
124             mmflag=-m486
125             fi
126             fi
127            ;;
128            esac
129            #PROG_CC_SWITCH(mno-ieee-fp,ieefp)
130            ;;
131 unknown)
132            long_double=yes
133            ;;
134 esac
137 AC_PROG_MAKE_SET
138 AC_PROG_RANLIB
140 dnl CFLAGS="-O"
141 dnl Checks for programs.
143 STICKY=''
145 use_cc_g_flag=no
146 DRIVERDIRS=""
147 DRIVERLIBS=""
148 CFLAGS="$CCOPTS"
149 AC_PROG_INSTALL
150 dnl AC_HEADER_STDC
152 AC_ARG_WITH(x11-driver,
153         [  --with-x11-driver=no    Used to disable x11 driver],[
154         if test x$withval = xno; then
155           x_driver_test=no
156         fi
158 AC_ARG_WITH(svga-driver,
159         [  --with-svga-driver=no   Used to disable svga driver],[
160         if test x$withval = xno; then
161           vga_driver_test=no
162         fi
164 AC_ARG_WITH(curses-driver,
165         [  --with-curses-driver=no Used to disable curses driver],[
166         if test x$withval = xno; then
167           curses_driver_test=no
168         fi
170 AC_ARG_WITH(aa-driver,
171         [  --with-aa-driver=no     Used to disable aa-lib driver],[
172         if test x$withval = xno; then
173           aa_driver_test=no
174         fi
177 if test  "$x_driver_test" = yes -o "$aa_driver_test" = yes; then
178 AC_PATH_XTRA
182 dnl This part supplies reasonable defaults for CFLAGS, if they weren't
183 dnl specified by ''CFLAGS=flags ./configure''
185 cc_uses_g=yes
186 if test x$GCC = xyes; then
187     if test x$ac_cv_prog_gcc_g = xyes; then
188         :
189     else
190         cc_uses_g=no
191     fi
194 if test "x$CCOPTS" = x; then
195     if test x$GCC = xyes; then
196         PROG_GCC_Os
197         if test x$mflag = x486; then
198             CCOPTS="-Wall $mmflag -fstrength-reduce -ffast-math -fomit-frame-pointer -pipe "
199             PROG_CC_SWITCH(fno-exceptions,exceptions)
200             CCOPTS1="$CCOPTS -O6 -funroll-loops"
201             if test x$use_cc_g_flag = xyes; then
202                 if test $cc_uses_g = yes; then
203                     CCOPTS='-m486 -g -O'
204                 fi
205             fi
206         else
207             CCOPTS='-Wall -fstrength-reduce -ffast-math -pipe'
208             PROG_CC_SWITCH(fno-exceptions,exceptions)
209             CCOPTS1='-O6 -Wall -fstrength-reduce -ffast-math -fforce-mem -fforce-addr -funroll-loops -pipe'
210             if test x$use_cc_g_flag = xyes; then
211                 if test $cc_uses_g = yes; then
212                     CCOPTS='-g -O'
213                 fi
214             fi
215         fi
216         if test x$ac_Os = xyes; then
217             CCOPTS="$CCOPTS -Os"
218         else
219             CCOPTS="$CCOPTS -O2"
220         fi
221         PROG_CC_SWITCH1(fmove-all-movables,movables)
222         PROG_CC_SWITCH1(frerun-loop-opt,loopopt)
223     else
224         if test x$use_cc_g_flag = xyes; then
225             CCOPTS="$CFLAGS"
226         else
227             CCOPTS=
228             case $target in
229             m68k-hp-hpux8.00)
230              CCOPTS="-Aa -D_INCLUDE_POSIX_SOURCE -D_INCLUDE_HPUX_SOURCE -D_INCLUDE_XOPEN_SOURCE +O3"
231              ;;
232             *) 
233              PROG_CC_SWITCH(O,optimizations)
234              ;;
235             esac
236         fi
237     fi
240 CFLAGS="$CCOPTS"
241 if test "$CCOPTS1" = "" ; then
242   CCOPTS1="$CCOPTS"
244 CFLAGS1="$CCOPTS1"
248 search_ncurses=true
250 CFLAGS=${CFLAGS--O}
251 CFLAGS1=${CFLAGS1--O}
252 LDFLAGS=${LDFLAGS--O}
254 if test x$pthread = xtest; then
255   AC_CHECK_FUNCS(pthread_create)
256   if test "x$ac_cv_func_pthread_create" = xyes; then
257     AC_DEFINE(USE_PTHREAD)
258     CFLAGS="$CFLAGS -D_REENTRANT"
259     CFLAGS1="$CFLAGS1 -D_REENTRANT"
260     AC_CHECK_FUNCS(pthread_sighandler)
261   else
262   AC_CHECK_LIB(pthread,pthread_create)
263   if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then
264     AC_DEFINE(USE_PTHREAD)
265     CFLAGS="$CFLAGS -D_REENTRANT"
266     CFLAGS1="$CFLAGS1 -D_REENTRANT"
267     AC_CHECK_FUNCS(pthread_sighandler)
268   else
269     echo "No pthread library available! Can not compile threaded version"
270     exit
271   fi
272   fi
275 AC_DEFUN(AC_USE_SUNOS_CURSES, [
276         search_ncurses=false
277         curses_driver=true
278         screen_manager="SunOS 4.x /usr/5include curses"
279         AC_MSG_RESULT(Using SunOS 4.x /usr/5include curses)
280         AC_DEFINE(SUNOS_CURSES)
281         AC_DEFINE(NO_COLOR_SUPPORT)
282         AC_DEFINE(USE_SYSV_CURSES)
283         CFLAGS="$CFLAGS -I/usr/5include"
284         AC_MSG_RESULT(Please note that some screen refreshs may fail)
285         AC_WARN(Reconsider using Slang)
288 AC_DEFUN(AC_AALIB, [
289     if $search_aalib
290     then
291         LIBS1="$LIBS"
292         LIBS="$LIBS $X_EXTRA_LIBS $X_LIBS -lX11"
293         if test -f $1/aalib.h
294         then
295             LIBS1="$LIBS"
296             LIBS="$LIBS $2"
297             unset ac_cv_lib_aa_aa_init
298             AC_CHECK_LIB(aa, aa_init)
299             if test "x$ac_cv_lib_aa_aa_init" = xyes; then
300               AC_MSG_RESULT(Found aalib on $1/aalib.h)
301               LIBS="$LIBS $2"
302               CFLAGS="$CFLAGS $3"
303               search_aalib=false
304               aa_driver=true
305             else
306              unset ac_cv_lib_aa_aa_init
307              LIBS="$LIBS1"
308             fi
309         fi
310     fi
313 AC_DEFUN(AC_USE_OSF1_CURSES, [
314        AC_CHECK_LIB(curses, initscr)
315        if test "x$ac_cv_lib_curses_initscr" = xyes; then 
316        AC_MSG_RESULT(Using OSF1 curses)
317        search_ncurses=false
318        curses_driver=true
319        screen_manager="OSF1 curses"
320        AC_DEFINE(NO_COLOR_SUPPORT)
321        AC_DEFINE(USE_SYSV_CURSES)
322        fi
325 AC_DEFUN(AC_USE_SYSV_CURSES, [
326         AC_CHECK_LIB(curses, initscr)
327         if test "x$ac_cv_lib_curses_initscr" = xyes; then 
328         AC_MSG_RESULT(Using SysV curses)
329         curses_driver=true
330         AC_DEFINE(USE_SYSV_CURSES)
331         search_ncurses=false
332         screen_manager="SysV/curses"
333         fi
336 AC_ARG_WITH(sunos-curses,
337         [  --with-sunos-curses     Used to force SunOS 4.x curses],[
338         if test x$withval = xyes; then
339                 AC_USE_SUNOS_CURSES
340         fi
343 AC_ARG_WITH(osf1-curses,
344         [  --with-osf1-curses     Used to force OSF/1 curses],[
345         if test x$withval = xyes; then
346                 AC_USE_OSF1_CURSES
347         fi
350 AC_ARG_WITH(vcurses,
351         [  --with-vcurses[=incdir] Used to force SysV curses],
352         if test x$withval = xyes; then
353                 CFLAGS="$CFLAGS"
354         else
355                 CFLAGS="$CFLAGS -I$withval"
356         fi
357         AC_USE_SYSV_CURSES
359                 
360 AC_ARG_WITH(ncurses,
361         [  --with-ncurses[=base-dir] Compile with ncurses/locate base dir],
362         if test x$withval = xyes
363         then
364                 search_ncurses=true
365         else
366                 LIBS="$LIBS -L$withval/lib -lncurses"
367                 CFLAGS="$CFLAGS -I$withval/include"
368                 search_ncurses=false
369                 curses_driver=true
370                 screen_manager="ncurses"
371                 AC_DEFINE(USE_NCURSES)
372         fi
377 dnl Parameters: directory filename LIBS_append CFLAGS_append nicename
379 AC_DEFUN(AC_NCURSES, [
380     if $search_ncurses
381     then
382         if test -f $1/$2
383         then
384             LIBS1="$LIBS"
385             LIBS="$LIBS $3"
386             AC_CHECK_LIB(ncurses, initscr)
387             if test "x$ac_cv_lib_ncurses_initscr" = xyes; then 
388               AC_MSG_RESULT(Found ncurses on $1/$2)
389               LIBS="$LIBS $3"
390               CFLAGS="$CFLAGS $4"
391               search_ncurses=false
392               curses_driver=true
393               screen_manager=$5
394               AC_DEFINE(USE_NCURSES)
395             else
396              unset ac_cv_lib_ncurses_initscr
397              LIBS="$LIBS1"
398             fi
399         fi
400     fi
404 dnl Parameters: directory filename LIBS_append CFLAGS_append nicename
406 AC_DEFUN(AC_CURSES, [
407     if $search_ncurses
408     then
409         if test -f $1/$2
410         then
411             LIBS1="$LIBS"
412             LIBS="$LIBS $3"
413             AC_CHECK_LIB(curses, initscr)
414             if test "x$ac_cv_lib_curses_initscr" = xyes; then 
415               AC_MSG_RESULT(Found generic curses on $1/$2)
416               CFLAGS="$CFLAGS $4"
417               search_ncurses=false
418               curses_driver=true
419               screen_manager=$5
420               AC_DEFINE(USE_CURSES)
421             else
422              unset ac_cv_lib_curses_initscr
423              LIBS="$LIBS1"
424             fi
425         fi
426     fi
429 if test "$aa_driver_test" = yes; then
430     AC_CHECKING("location of curses")
431     AC_CHECK_LIB(gpm, Gpm_Repeat)
432     dnl Replace `main' with a function in -lm:
433     AC_CHECK_LIB(slang, SLsmg_init_smg)
435     AC_NCURSES(/usr/include, ncurses.h, , -I/usr/include/ncurses , "ncurses on /usr/include")
436     AC_NCURSES(/usr/include/ncurses, ncurses.h, , -I/usr/include/ncurses, "ncurses on /usr/include/ncurses")
437     AC_NCURSES(/usr/local/include, ncurses.h, ,-L/usr/local/lib, -I/usr/local/include, "ncurses on /usr/local")
438     AC_NCURSES(/usr/local/include/ncurses, ncurses.h, -L/usr/local/lib -L/usr/local/lib/ncurses, -I/usr/local/include/ncurses, "ncurses on /usr/local/include/ncurses")
440     AC_NCURSES(/usr/local/include/ncurses, curses.h, -L/usr/local/lib, -I/usr/local/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/local/.../ncurses")
442     AC_NCURSES(/usr/include/ncurses, curses.h, , -I/usr/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/include/ncurses")
443     AC_CURSES(/usr/include, curses.h, , , "curses on /usr/include")
445     dnl
446     dnl We couldn't find ncurses, try SysV curses
447     dnl
448     if $search_ncurses 
449     then
450         AC_EGREP_HEADER(init_color, /usr/include/curses.h,
451             AC_USE_SYSV_CURSES)
452     fi
454     dnl
455     dnl Try SunOS 4.x /usr/5{lib,include} ncurses
456     dnl The flags SUNOS_CURSES, USE_BSD_CURSES and BUGGY_CURSES
457     dnl should be replaced by a more fine grained selection routine
458     dnl
459     if $search_ncurses
460     then
461         if test -f /usr/5include/curses.h
462         then
463             AC_USE_SUNOS_CURSES
464         fi
465     fi
467     search_aalib=true;
468     if test "x$no_x" = x; then
469        LIBS="$LIBS $X_EXTRA_LIBS $X_LIBS"
470        CFLAGS="$CFLAGS $X_CFLAGS"
471     fi
472     AC_AALIB(/usr/include, , )
473     AC_AALIB(/usr/local/include, -L/usr/local/lib, -I/usr/local/include)
474     for name in ../aalib-*.*
475     do
476       AC_AALIB($name,"-L$name","-I$name")
477     done
478     if $search_aalib
479     then
480       aa_driver=false
481     else
482       aa_driver=true
483       curses_driver_test=no
484     fi
487 if test  "$curses_driver_test" = yes; then
488 if $search_ncurses
489 then
490     AC_CHECKING("location of curses")
492     AC_NCURSES(/usr/include, ncurses.h, , -I/usr/include/ncurses , "ncurses on /usr/include")
493     AC_NCURSES(/usr/include/ncurses, ncurses.h, , -I/usr/include/ncurses, "ncurses on /usr/include/ncurses")
494     AC_NCURSES(/usr/local/include, ncurses.h, ,-L/usr/local/lib, -I/usr/local/include, "ncurses on /usr/local")
495     AC_NCURSES(/usr/local/include/ncurses, ncurses.h, -L/usr/local/lib -L/usr/local/lib/ncurses, -I/usr/local/include/ncurses, "ncurses on /usr/local/include/ncurses")
497     AC_NCURSES(/usr/local/include/ncurses, curses.h, -L/usr/local/lib, -I/usr/local/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/local/.../ncurses")
499     AC_NCURSES(/usr/include/ncurses, curses.h, , -I/usr/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/include/ncurses")
500     AC_CURSES(/usr/include, curses.h, , , "curses on /usr/include")
502     dnl
503     dnl We couldn't find ncurses, try SysV curses
504     dnl
505     if $search_ncurses 
506     then
507         AC_EGREP_HEADER(init_color, /usr/include/curses.h,
508             AC_USE_SYSV_CURSES)
509     fi
511     dnl
512     dnl Try SunOS 4.x /usr/5{lib,include} ncurses
513     dnl The flags SUNOS_CURSES, USE_BSD_CURSES and BUGGY_CURSES
514     dnl should be replaced by a more fine grained selection routine
515     dnl
516     if $search_ncurses
517     then
518         if test -f /usr/5include/curses.h
519         then
520             AC_USE_SUNOS_CURSES
521         fi
522     fi
524   AC_CHECK_FUNCS(mousemask termattrs wredrawln redrawwin)
527 if test  "$vga_driver_test" = yes; then
528 AC_CHECK_LIB(vga, vga_hasmode)
529 AC_CHECK_LIB(vgagl, gl_write)
533 dnl Checks for header files.
535 AC_CHECK_HEADERS(limits.h sys/time.h unistd.h)
537 dnl Checks for typedefs, structures, and compiler characteristics.
538 AC_C_CONST
539 AC_C_INLINE
540 if test "x$long_double" = xyes; then
541 AC_C_LONG_DOUBLE
542 else
543 echo Long double disabled, since it should be too slow at this CPU
545 AC_HEADER_TIME
546 AC_TYPE_SIGNAL
547 test "x$prefix" = xNONE && prefix=$ac_default_prefix
548 eval datadir2=$datadir
549 AC_DEFINE_UNQUOTED(DATAPATH,"${datadir2}/XaoS")
551 AC_CHECK_SIZEOF(short)
552 AC_CHECK_SIZEOF(int)
553 AC_CHECK_SIZEOF(long)
555 dnl Checks for library functions.
556 save_code=yes
557 AC_CHECK_LIB(m, pow)
558 AC_CHECK_LIB(z, inflate)
559 if test x"$ac_cv_lib_z_inflate" = xno; then
560  AC_CHECK_LIB(gz, inflate)
561  if test x"$ac_cv_lib_gz_inflate" = xno; then
562   save_code=no
563  fi
565 AC_CHECK_LIB(png, png_create_info_struct)
566 if test x"$ac_cv_lib_png_png_create_info_struct" = xno; then
567   save_code=no
569 if test "$save_code" = yes; then
570   AC_DEFINE(USE_PNG)
572 AC_FUNC_ALLOCA
573 AC_TYPE_SIGNAL
574 AC_CHECK_FUNCS(gettimeofday usleep select setitimer ftime finite)
576 if test  "$x_driver_test" = yes; then
577 dnl X checks
578 if test "x$no_x" = x; then 
579   AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc=yes)
580   AC_CHECK_HEADER(sys/shm.h, AC_DEFINE(HAVE_IPC_H), no_sys_shm=yes)
582   AC_MSG_CHECKING(X11/extensions/XShm.h)
583   if eval "test -f $x_includes/X11/extensions/XShm.h"; then
584     AC_MSG_RESULT(yes)
585     AC_DEFINE(HAVE_MITSHM_H)
586   else
587     AC_MSG_RESULT(no)
588     no_xshm=yes
589   fi
591   dnl AC_CHECK_LIB(Xext,XShmEventBase,LIBS="$LIBS -lXext", no_ext_lib=yes, $X_LIBS)
592   AC_CHECK_LIB(Xext,XShmAttach,LIBS="$LIBS -lXext", no_ext_lib=yes, $X_LIBS )
596 echo "------------------------------------------------------------"
597 echo "Avaiable drivers:"
598 drivers=no
599 if test "$aa_driver_test" = yes; then
600 if test "x$aa_driver" = xtrue; then
601   drivers=yes
602   AC_DEFINE(AA_DRIVER)
603   DRIVERDIRS="$DRIVERDIRS ui/ui-drv/aa"
604   DRIVERLIBS="$DRIVERLIBS lib/libuiaa.a"
605   echo "   aa-lib"
609 if test  "$curses_driver_test" = yes; then
610 if test "x$curses_driver" = xtrue; then
611 dnl if test "x$ac_cv_lib_ncurses_initscr" = xyes; then 
612   drivers=yes
613   AC_DEFINE(CURSES_DRIVER)
614   DRIVERDIRS="$DRIVERDIRS ui/ui-drv/curses"
615   DRIVERLIBS="$DRIVERLIBS lib/libuicurses.a"
616   if test "x$ac_cv_func_mousemask" = xyes; then 
617     echo "   ncurses   with additional mouse driver"
618   else
619     echo "   (n)curses"
620   fi
621 dnl fi
622 dnl if test "x$ac_cv_lib_curses_initscr" = xyes; then 
623 dnl   drivers=yes
624 dnl   echo "   curses"
625 dnl   AC_DEFINE(CURSES_DRIVER)
626 dnl fi
629 if test  "$x_driver_test" = yes; then
630 if test "x$no_x" = x; then 
631   drivers=yes
632   AC_DEFINE(X11_DRIVER)
633   DRIVERDIRS="$DRIVERDIRS ui/ui-drv/x11"
634   DRIVERLIBS="$DRIVERLIBS lib/libuix11.a"
635   if test "x$no_sys_ipc$no_sys_shm y$ac_cv_lib_Xext_XShmAttach" = "x yyes"; then
636     echo "   X11       with MIT shared memory support"
637     AC_DEFINE(MITSHM)
638   else
639     echo "   X11"
640   fi
641   LIBS="$LIBS $X_EXTRA_LIBS $X_LIBS -lX11"
642   CFLAGS="$CFLAGS $X_CFLAGS"
643   CFLAGS1="$CFLAGS1 $X_CFLAGS"
646 if test  "$vga_driver_test" = yes; then
647 if test "x$ac_cv_lib_vga_vga_hasmode$ac_cv_lib_vgagl_gl_write" = xyesyes; then
648   drivers=yes
649   AC_DEFINE(SVGA_DRIVER)
650   STICKY='chmod +s $(bindir)/xaos; chown root $(bindir)/xaos; chgrp root $(bindir)/xaos'
651   DRIVERDIRS="$DRIVERDIRS ui/ui-drv/svga"
652   DRIVERLIBS="$DRIVERLIBS lib/libuisvga.a"
653   if test "x$ac_cv_func_pthread_sighandler" = xyes; then 
654   echo "   SVGAlib   with linuxthread hack"
655   else
656   echo "   SVGAlib"
657   fi
660 REALTOPDIR=`nolinks=1; pwd`
661 AC_SUBST(REALTOPDIR)
662 BINPATH="$REALTOPDIR/bin"
663 AC_SUBST(BINPATH)
664 AR="ar"
665 AC_SUBST(AR)
666 SRCPATH="$REALTOPDIR/src"
667 AC_SUBST(SRCPATH)
668 LIBPATH="$SRCPATH/lib"
669 AC_SUBST(LIBPATH)
670 # does this work if you do make -C <some dir>
671 TOPDIR=`nolinks=1;pwd`
672 AC_SUBST(TOPDIR)
674 INCDIR="-I${SRCPATH}/include"
675 CFLAGS="$CFLAGS $INCDIR"
676 CFLAGS1="$CFLAGS1 $INCDIR"
677 AC_SUBST(INCDIR)
678 AC_SUBST(DRIVERLIBS)
679 AC_SUBST(DRIVERDIRS)
680 AC_SUBST(STICKY)
681 AC_SUBST(CFLAGS1)
685 echo "Compiler options:"
686 echo " CC          : $CC"
687 echo " CFLAGS      : $CFLAGS"
688 echo " CFLAGS1     : $CFLAGS1"
689 echo " LDLAGS      : $LDLAGS"
690 echo " LIBS        : $LIBS"
691 echo " X_LIBS        : $X_LIBS"
692 echo "------------------------------------------------------------"
693 AC_OUTPUT(Makefile src/Makefile src/engine/Makefile src/util/Makefile src/ui/Makefile src/filter/Makefile
694           src/ui/ui-drv/curses/Makefile
695           src/ui/ui-drv/aa/Makefile
696           src/ui/ui-drv/svga/Makefile
697           src/ui/ui-drv/x11/Makefile
698           )
699 echo "------------------------------------------------------------"
700 echo " "
701 echo "READ CUREFULLY FOLLOWING WARNINGS"
702 echo " "
703 if test "x$ac_cv_header_stdc" = xno; then
704   AC_MSG_WARN(There is no ansi c headers avaiable. XaoS will have troubles with compiling.)
705   config_problem=yes
707 if test "x$ac_cv_prog_gcc" = xyes; then
708   echo 
709 else
710   AC_MSG_WARN(The gnu c compiler is recomended to get best performance. XaoS crashes many compiler so your compiler can cause troubles.)
712 if test "x$ac_cv_c_long_double" = xyes; then
713   if test "x$long_double" = xyes; then
714   AC_MSG_WARN(Long double enabled. This works well for x86 architectures. On other systems this should slow down much. Especially on sun workstations. If XaoS works incredibly slowly try to rebuild it using:
715    configure --with-long-double=no
716    make clean
717    make)
718   fi
720 if test "x$drivers" = xno; then
721   AC_MSG_WARN(There is no driver avaible. XaoS will not start.)
722   config_problem=yes
724 if test "x$config_problem" = xyes; then
725   AC_MSG_WARN(There was a problem with automatic configuration.)
726   AC_MSG_WARN(Read INSTALL file for trouble-shooting tips.)
728 if test x"$ac_cv_lib_z_inflate" = xno; then
729  if test x"$ac_cv_lib_gz_inflate" = xno; then
730   echo "You need zlib to compile XaoS with image saving code."
731   echo "Please download it from:"
732   echo "  XaoS homepage at http://www.paru.cas.cz/~hubicka/XaoS"
733   echo "  or ftp://sunsite.unc.edu/pub/Linux/libs"
734   echo "  or ftp://ftp.uu.net/graphics/png/src/zlib-0.95.tar.gz"
735   echo
736  fi
738 if test x"$ac_cv_lib_png_png_create_info_struct" = xno; then
739   echo "You need pnglib to compile XaoS with image saving code."
740   echo "Please download it from:"
741   echo "  XaoS homepage at http://www.paru.cas.cz/~hubicka/XaoS"
742   echo "  or ftp://sunsite.unc.edu/pub/Linux/libs"
743   echo "  or ftp://ftp.uu.net/graphics/png/src/libpng-0.81.tar.gz"
744   echo
746 echo " "
747 echo "END OF WARNINGS"
748 echo " "
749 echo "In case you have troubles with compiling or running"
750 echo "XaoS please read compilers.txt."
751 echo "------------------------------------------------------------"