1 |
|
dnl Process this file with autoconf to produce a configure script. |
2 |
|
dnl Written in 2002 by Christian Bauer et al. |
3 |
|
|
4 |
< |
AC_INIT(main_unix.cpp) |
4 |
> |
AC_INIT([Basilisk II], 1.0, [Christian.Bauer@uni-mainz.de], BasiliskII) |
5 |
> |
AC_CONFIG_SRCDIR(main_unix.cpp) |
6 |
|
AC_PREREQ(2.52) |
7 |
|
AC_CONFIG_HEADER(config.h) |
8 |
|
|
9 |
+ |
dnl Aliases for PACKAGE and VERSION macros. |
10 |
+ |
AC_DEFINE(PACKAGE, PACKAGE_NAME, [Alias to PACKAGE for i18n.]) |
11 |
+ |
AC_DEFINE(VERSION, PACKAGE_VERSION, [Alias to VERSION for i18n.]) |
12 |
+ |
|
13 |
|
dnl Video options. |
14 |
|
AC_ARG_ENABLE(xf86-dga, [ --enable-xf86-dga use the XFree86 DGA extension [default=yes]], [WANT_XF86_DGA=$enableval], [WANT_XF86_DGA=yes]) |
15 |
|
AC_ARG_ENABLE(xf86-vidmode, [ --enable-xf86-vidmode use the XFree86 VidMode extension [default=yes]], [WANT_XF86_VIDMODE=$enableval], [WANT_XF86_VIDMODE=yes]) |
108 |
|
AC_CHECK_LIB(Hcurses, tgetent, , |
109 |
|
AC_CHECK_LIB(curses, tgetent)))))) |
110 |
|
AC_CHECK_LIB(readline, readline) |
106 |
– |
AC_CHECK_HEADERS(readline.h history.h readline/readline.h readline/history.h) |
111 |
|
else |
112 |
|
AC_MSG_RESULT(no) |
113 |
|
AC_MSG_WARN([Could not find mon, ignoring --with-mon.]) |
190 |
|
CXXFLAGS="$CXXFLAGS $GTK_CFLAGS" |
191 |
|
LIBS="$LIBS $GTK_LIBS" |
192 |
|
UISRCS=prefs_editor_gtk.cpp |
193 |
+ |
dnl somehow, <gnome-i18n.h> would redefine gettext() to nothing if |
194 |
+ |
dnl ENABLE_NLS is not set, thusly conflicting with C++ <string> which |
195 |
+ |
dnl includes <libintl.h> |
196 |
+ |
AM_GNU_GETTEXT |
197 |
|
B2_PATH_GNOMEUI([ |
198 |
|
AC_DEFINE(HAVE_GNOMEUI, 1, [Define if libgnomeui is available.]) |
199 |
|
CXXFLAGS="$CXXFLAGS $GNOMEUI_CFLAGS" |
224 |
|
dnl Checks for header files. |
225 |
|
AC_HEADER_STDC |
226 |
|
AC_CHECK_HEADERS(unistd.h fcntl.h sys/time.h sys/mman.h) |
227 |
+ |
AC_CHECK_HEADERS(readline.h history.h readline/readline.h readline/history.h) |
228 |
|
|
229 |
|
dnl Checks for typedefs, structures, and compiler characteristics. |
230 |
|
AC_C_BIGENDIAN |
562 |
|
AC_TRY_RUN([ |
563 |
|
#include "vm_alloc.cpp" |
564 |
|
int main(void) { /* returns 0 if we could map the lowmem globals */ |
565 |
< |
volatile char * lm; |
565 |
> |
volatile char * lm = 0; |
566 |
|
if (vm_init() < 0) exit(1); |
567 |
< |
if ((lm = (volatile char *)vm_acquire_fixed(0, 0x2000)) == VM_MAP_FAILED) exit(1); |
567 |
> |
if (vm_acquire_fixed(0, 0x2000) < 0) exit(1); |
568 |
|
lm[0] = 'z'; |
569 |
|
if (vm_release((char *)lm, 0x2000) < 0) exit(1); |
570 |
|
vm_exit(); exit(0); |
778 |
|
dnl Check for GCC 2.7 or higher. |
779 |
|
HAVE_GCC27=no |
780 |
|
AC_MSG_CHECKING(for GCC 2.7 or higher) |
781 |
< |
AC_EGREP_CPP(yes, |
781 |
> |
AC_EGREP_CPP(xyes, |
782 |
|
[#if __GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5 |
783 |
< |
yes |
783 |
> |
xyes |
784 |
|
#endif |
785 |
|
], [AC_MSG_RESULT(yes); HAVE_GCC27=yes], AC_MSG_RESULT(no)) |
786 |
|
|
787 |
|
dnl Check for GCC 3.0 or higher. |
788 |
|
HAVE_GCC30=no |
789 |
|
AC_MSG_CHECKING(for GCC 3.0 or higher) |
790 |
< |
AC_EGREP_CPP(yes, |
790 |
> |
AC_EGREP_CPP(xyes, |
791 |
|
[#if __GNUC__ >= 3 |
792 |
< |
yes |
792 |
> |
xyes |
793 |
|
#endif |
794 |
|
], [AC_MSG_RESULT(yes); HAVE_GCC30=yes], AC_MSG_RESULT(no)) |
795 |
|
|
1114 |
|
AC_SUBST(SYSSRCS) |
1115 |
|
AC_SUBST(CPUINCLUDES) |
1116 |
|
AC_SUBST(CPUSRCS) |
1117 |
< |
AC_OUTPUT(Makefile) |
1117 |
> |
AC_CONFIG_FILES([Makefile]) |
1118 |
> |
AC_OUTPUT |
1119 |
|
|
1120 |
|
dnl Print summary. |
1121 |
|
echo |