filename | configure.in |
changeset | 586:2a3ba82cf243 |
prev | 542:96c5494e02fd |
next | 614:a2d239d4438a |
author | nkeynes |
date | Tue Jan 22 10:11:45 2008 +0000 (16 years ago) |
permissions | -rw-r--r-- |
last change | Invoke emulator single-step for untranslatable delay slots (and fix a few related bugs) |
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 AM_PROG_AS
12 AC_HEADER_STDC
13 AC_CANONICAL_BUILD
14 AC_CANONICAL_HOST
15 AC_ARG_ENABLE( trace,
16 AS_HELP_STRING( [--enable-trace], [Enable generation of IO traces (warning: hurts performance)]),
17 [if test "$enableval" == "yes"; then
18 AC_DEFINE(ENABLE_TRACE_IO, 1, [Enable IO tracing])
19 fi] )
20 AC_ARG_ENABLE( watch,
21 AS_HELP_STRING( [--enable-watch], [Enable watchpoints in the debugger (warning: hurts performance)]),
22 [if test "$enableval" == "yes"; then
23 AC_DEFINE(ENABLE_WATCH, 1, [Enable watchpoints])
24 fi] )
25 dnl ----------- Check for mandatory dependencies --------------
26 dnl Building on MAC?
27 AC_CHECK_HEADER([Carbon/Carbon.h], [
28 HAVE_CARBON='yes'
29 APPLE_BUILD='yes'
30 LIBS="$LIBS -framework OpenGL -framework AGL -framework Carbon -L/usr/X11R6/lib -lGL"
31 AC_DEFINE(HAVE_CARBON,[1],[Have Carbon framework])
32 AC_DEFINE(APPLE_BUILD,[1],[Building on an apple platform. Things are different...])
33 ])
35 dnl Check for libpng (required)
36 PKG_CHECK_MODULES(LIBPNG, [libpng] )
38 dnl Implied by libpng, but check explicitly just in case
39 AC_CHECK_LIB(z, uncompress, [], [
40 echo "Zlib (libz.so) could not be found, but is required."
41 exit 1])
43 if test "$APPLE_BUILD" != 'yes'; then
44 AC_CHECK_LIB(GL, glXQueryVersion, [], [
45 echo "The OpenGL library (libGL.so) could not be found, but is required."
46 exit 1])
47 AC_CHECK_HEADER([GL/gl.h], [], [
48 echo "The OpenGL header files (eg GL/gl.h) could not be found, but are required."
49 exit 1])
50 fi
52 dnl Check for GTK (required for unix systems)
53 PKG_CHECK_MODULES(GTK, gtk+-2.0, [
54 HAVE_GTK='yes'
55 AC_DEFINE([HAVE_GTK],1,[Have GTK libraries])
56 ])
58 AM_CONDITIONAL(GUI_CARBON, [test "$HAVE_CARBON" = 'yes'])
59 AM_CONDITIONAL(GUI_GTK, [test "$HAVE_GTK" = 'yes'])
61 dnl Check for a supported cpu target for translation purposes
62 case $host_cpu in
63 i386|i486|i586|i686)
64 SH4_TRANSLATOR="x86"
65 AC_DEFINE_UNQUOTED(SH4_TRANSLATOR,[TARGET_X86], [SH4 Translator to use (if any)] );;
66 x86_64)
67 SH4_TRANSLATOR="x86_64"
68 AC_DEFINE_UNQUOTED(SH4_TRANSLATOR,[TARGET_X86_64], [SH4 Translator to use (if any)] );;
69 *)
70 echo "Warning: No translator available for $host. Building emulation core only";;
71 esac
72 AM_CONDITIONAL(BUILD_SH4X86, [test "$SH4_TRANSLATOR" = "x86" -o "$SH4_TRANSLATOR" = "x86_64"])
73 AM_CONDITIONAL(BUILD_X86_64, [test "$SH4_TRANSLATOR" = "x86_64"])
75 dnl ------------------ Optional driver support -------------------
76 dnl Check for esound
77 PKG_CHECK_MODULES(ESOUND, [esound], [
78 HAVE_ESOUND='yes'
79 AC_DEFINE([HAVE_ESOUND],1,[Have esound support]) ],
80 [ echo "Warning: esound not found - building without audio support" ])
81 AM_CONDITIONAL( AUDIO_ESOUND, [test "$HAVE_ESOUND" = 'yes'] )
83 dnl Check for linux cdrom device support
84 AC_CHECK_HEADER([linux/cdrom.h], [HAVE_LINUX_CDROM_H=yes], [
85 echo "Linux CDROM support not found, building without it."] )
86 AM_CONDITIONAL(CDROM_LINUX, [test "$HAVE_LINUX_CDROM_H" = "yes"])
88 dnl Check for cross-compiler availability - needed for system tests
89 AC_PATH_PROG(SHCC, [sh-elf-gcc])
90 AC_PATH_PROG(SHLD, [sh-elf-ld])
91 AC_PATH_PROG(SHOBJCOPY, [sh-elf-objcopy])
92 AC_PATH_PROG(ARMCC, [arm-elf-gcc])
93 AC_PATH_PROG(ARMLD, [arm-elf-ld])
94 AC_PATH_PROG(ARMOBJCOPY, [arm-elf-objcopy])
96 if test "x$SHCC" = "x" -o "x$SHLD" = "x" -o "x$SHOBJCOPY" = "x"; then
97 BUILD_SH="no"
98 echo "Warning: SH4 cross-compiler not found, system tests will be disabled."
99 else
100 BUILD_SH="yes"
101 fi
102 if test "x$ARMCC" = "x" -o "x$ARMLD" = "x" -o "x$ARMOBJCOPY" = "x"; then
103 BUILD_ARM="no"
104 echo "Warning: ARM cross-compiler not found, AICA tests will be disabled."
105 else
106 BUILD_ARM="yes"
107 fi
108 AM_CONDITIONAL(BUILD_SYSTEST, [test "$BUILD_SH" = "yes"])
109 AM_CONDITIONAL(BUILD_ARMTEST, [test "$BUILD_ARM" = "yes"])
112 dnl ----------------------- All done, finish up -----------------------
113 GETTEXT_PACKAGE=lxdream
114 AC_SUBST(GETTEXT_PACKAGE)
115 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[translation domain])
117 dnl Add the languages which your application supports here.
118 ALL_LINGUAS="de pt_BR"
119 AM_GLIB_GNU_GETTEXT
121 AC_OUTPUT([
122 Makefile
123 src/Makefile
124 po/Makefile.in
125 test/Makefile
126 ])
.