filename | configure.in |
changeset | 562:e598411b640b |
prev | 542:96c5494e02fd |
next | 571:9bc09948d0f2 |
author | nkeynes |
date | Fri Jan 04 11:54:17 2008 +0000 (16 years ago) |
branch | lxdream-mmu |
permissions | -rw-r--r-- |
last change | Bring icache partially into line with the mmu, a little less slow with AT off now. |
view | annotate | diff | log | raw |
1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(configure.in)
4 AM_INIT_AUTOMAKE(lxdream, 0.8.1)
5 AM_MAINTAINER_MODE
6 AM_CONFIG_HEADER(config.h)
8 AC_ISC_POSIX
9 AC_PROG_CC
10 AM_PROG_CC_STDC
11 AC_HEADER_STDC
12 AC_CANONICAL_BUILD
13 AC_CANONICAL_HOST
14 AC_ARG_ENABLE( trace,
15 AS_HELP_STRING( [--enable-trace], [Enable generation of IO traces (warning: hurts performance)]),
16 [if test "$enableval" == "yes"; then
17 AC_DEFINE(ENABLE_TRACE_IO, 1, [Enable IO tracing])
18 fi] )
19 AC_ARG_ENABLE( watch,
20 AS_HELP_STRING( [--enable-watch], [Enable watchpoints in the debugger (warning: hurts performance)]),
21 [if test "$enableval" == "yes"; then
22 AC_DEFINE(ENABLE_WATCH, 1, [Enable watchpoints])
23 fi] )
24 dnl ----------- Check for mandatory dependencies --------------
25 dnl Building on MAC?
26 AC_CHECK_HEADER([Carbon/Carbon.h], [
27 HAVE_CARBON='yes'
28 APPLE_BUILD='yes'
29 LIBS="$LIBS -framework OpenGL -framework AGL -framework Carbon -L/usr/X11R6/lib -lGL"
30 AC_DEFINE(HAVE_CARBON,[1],[Have Carbon framework])
31 AC_DEFINE(APPLE_BUILD,[1],[Building on an apple platform. Things are different...])
32 ])
34 dnl Check for libpng (required)
35 PKG_CHECK_MODULES(LIBPNG, [libpng] )
37 dnl Implied by libpng, but check explicitly just in case
38 AC_CHECK_LIB(z, uncompress, [], [
39 echo "Zlib (libz.so) could not be found, but is required."
40 exit 1])
42 if test "$APPLE_BUILD" != 'yes'; then
43 AC_CHECK_LIB(GL, glXQueryVersion, [], [
44 echo "The OpenGL library (libGL.so) could not be found, but is required."
45 exit 1])
46 AC_CHECK_HEADER([GL/gl.h], [], [
47 echo "The OpenGL header files (eg GL/gl.h) could not be found, but are required."
48 exit 1])
49 fi
51 dnl Check for GTK (required for unix systems)
52 PKG_CHECK_MODULES(GTK, gtk+-2.0, [
53 HAVE_GTK='yes'
54 AC_DEFINE([HAVE_GTK],1,[Have GTK libraries])
55 ])
57 AM_CONDITIONAL(GUI_CARBON, [test "$HAVE_CARBON" = 'yes'])
58 AM_CONDITIONAL(GUI_GTK, [test "$HAVE_GTK" = 'yes'])
60 dnl Check for a supported cpu target for translation purposes
61 case $host_cpu in
62 i386|i486|i586|i686)
63 SH4_TRANSLATOR="x86"
64 AC_DEFINE_UNQUOTED(SH4_TRANSLATOR,[TARGET_X86], [SH4 Translator to use (if any)] );;
65 x86_64)
66 SH4_TRANSLATOR="x86_64"
67 AC_DEFINE_UNQUOTED(SH4_TRANSLATOR,[TARGET_X86_64], [SH4 Translator to use (if any)] );;
68 *)
69 echo "Warning: No translator available for $host. Building emulation core only";;
70 esac
71 AM_CONDITIONAL(BUILD_SH4X86, [test "$SH4_TRANSLATOR" = "x86" -o "$SH4_TRANSLATOR" = "x86_64"])
73 dnl ------------------ Optional driver support -------------------
74 dnl Check for esound
75 PKG_CHECK_MODULES(ESOUND, [esound], [
76 HAVE_ESOUND='yes'
77 AC_DEFINE([HAVE_ESOUND],1,[Have esound support]) ],
78 [ echo "Warning: esound not found - building without audio support" ])
79 AM_CONDITIONAL( AUDIO_ESOUND, [test "$HAVE_ESOUND" = 'yes'] )
81 dnl Check for linux cdrom device support
82 AC_CHECK_HEADER([linux/cdrom.h], [HAVE_LINUX_CDROM_H=yes], [
83 echo "Linux CDROM support not found, building without it."] )
84 AM_CONDITIONAL(CDROM_LINUX, [test "$HAVE_LINUX_CDROM_H" = "yes"])
86 dnl Check for cross-compiler availability - needed for system tests
87 AC_PATH_PROG(SHCC, [sh-elf-gcc])
88 AC_PATH_PROG(SHLD, [sh-elf-ld])
89 AC_PATH_PROG(SHOBJCOPY, [sh-elf-objcopy])
90 AC_PATH_PROG(ARMCC, [arm-elf-gcc])
91 AC_PATH_PROG(ARMLD, [arm-elf-ld])
92 AC_PATH_PROG(ARMOBJCOPY, [arm-elf-objcopy])
94 if test "x$SHCC" = "x" -o "x$SHLD" = "x" -o "x$SHOBJCOPY" = "x"; then
95 BUILD_SH="no"
96 echo "Warning: SH4 cross-compiler not found, system tests will be disabled."
97 else
98 BUILD_SH="yes"
99 fi
100 if test "x$ARMCC" = "x" -o "x$ARMLD" = "x" -o "x$ARMOBJCOPY" = "x"; then
101 BUILD_ARM="no"
102 echo "Warning: ARM cross-compiler not found, AICA tests will be disabled."
103 else
104 BUILD_ARM="yes"
105 fi
106 AM_CONDITIONAL(BUILD_SYSTEST, [test "$BUILD_SH" = "yes"])
107 AM_CONDITIONAL(BUILD_ARMTEST, [test "$BUILD_ARM" = "yes"])
110 dnl ----------------------- All done, finish up -----------------------
111 GETTEXT_PACKAGE=lxdream
112 AC_SUBST(GETTEXT_PACKAGE)
113 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[translation domain])
115 dnl Add the languages which your application supports here.
116 ALL_LINGUAS="de pt_BR"
117 AM_GLIB_GNU_GETTEXT
119 AC_OUTPUT([
120 Makefile
121 src/Makefile
122 po/Makefile.in
123 test/Makefile
124 ])
.