1 dnl Process this file with autoconf to produce a configure script.
4 AM_INIT_AUTOMAKE(lxdream, 0.8.1)
6 AM_CONFIG_HEADER(config.h)
15 dnl ----------- Check for mandatory dependencies --------------
17 AC_CHECK_HEADER([Carbon/Carbon.h], [
20 LIBS="$LIBS -framework OpenGL -framework AGL -framework Carbon -L/usr/X11R6/lib -lGL"
21 AC_DEFINE(HAVE_CARBON,[1],[Have Carbon framework])
22 AC_DEFINE(APPLE_BUILD,[1],[Building on an apple platform. Things are different...])
25 dnl Check for libpng (required)
26 PKG_CHECK_MODULES(LIBPNG, [libpng] )
28 dnl Implied by libpng, but check explicitly just in case
29 AC_CHECK_LIB(z, uncompress, [], [
30 echo "Zlib (libz.so) could not be found, but is required."
33 if test "$APPLE_BUILD" != 'yes'; then
34 AC_CHECK_LIB(GL, glXQueryVersion, [], [
35 echo "The OpenGL library (libGL.so) could not be found, but is required."
37 AC_CHECK_HEADER([GL/gl.h], [], [
38 echo "The OpenGL header files (eg GL/gl.h) could not be found, but are required."
42 dnl Check for GTK (required for unix systems)
43 PKG_CHECK_MODULES(GTK, gtk+-2.0, [
45 AC_DEFINE([HAVE_GTK],1,[Have GTK libraries])
48 AM_CONDITIONAL(GUI_CARBON, [test "$HAVE_CARBON" = 'yes'])
49 AM_CONDITIONAL(GUI_GTK, [test "$HAVE_GTK" = 'yes'])
51 dnl Check for a supported cpu target for translation purposes
55 AC_DEFINE_UNQUOTED(SH4_TRANSLATOR,[TARGET_X86], [SH4 Translator to use (if any)] );;
57 SH4_TRANSLATOR="x86_64"
58 AC_DEFINE_UNQUOTED(SH4_TRANSLATOR,[TARGET_X86_64], [SH4 Translator to use (if any)] );;
60 echo "Warning: No translator available for $host. Building emulation core only";;
62 AM_CONDITIONAL(BUILD_SH4X86, [test "$SH4_TRANSLATOR" = "x86" -o "$SH4_TRANSLATOR" = "x86_64"])
64 dnl ------------------ Optional driver support -------------------
66 PKG_CHECK_MODULES(ESOUND, [esound], [
68 AC_DEFINE([HAVE_ESOUND],1,[Have esound support]) ],
69 [ echo "Warning: esound not found - building without audio support" ])
70 AM_CONDITIONAL( AUDIO_ESOUND, [test "$HAVE_ESOUND" = 'yes'] )
72 dnl Check for linux cdrom device support
73 AC_CHECK_HEADER([linux/cdrom.h], [HAVE_LINUX_CDROM_H=yes], [
74 echo "Linux CDROM support not found, building without it."] )
75 AM_CONDITIONAL(CDROM_LINUX, [test "$HAVE_LINUX_CDROM_H" = "yes"])
77 dnl Check for cross-compiler availability - needed for system tests
78 AC_PATH_PROG(SHCC, [sh-elf-gcc])
79 AC_PATH_PROG(SHLD, [sh-elf-ld])
80 AC_PATH_PROG(SHOBJCOPY, [sh-elf-objcopy])
81 AC_PATH_PROG(ARMCC, [arm-elf-gcc])
82 AC_PATH_PROG(ARMLD, [arm-elf-ld])
83 AC_PATH_PROG(ARMOBJCOPY, [arm-elf-objcopy])
85 if test "x$SHCC" = "x" -o "x$SHLD" = "x" -o "x$SHOBJCOPY" = "x"; then
87 echo "Warning: SH4 cross-compiler not found, system tests will be disabled."
91 if test "x$ARMCC" = "x" -o "x$ARMLD" = "x" -o "x$ARMOBJCOPY" = "x"; then
93 echo "Warning: ARM cross-compiler not found, AICA tests will be disabled."
97 AM_CONDITIONAL(BUILD_SYSTEST, [test "$BUILD_SH" = "yes"])
98 AM_CONDITIONAL(BUILD_ARMTEST, [test "$BUILD_ARM" = "yes"])
101 dnl ----------------------- All done, finish up -----------------------
102 GETTEXT_PACKAGE=lxdream
103 AC_SUBST(GETTEXT_PACKAGE)
104 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[translation domain])
106 dnl Add the languages which your application supports here.
107 ALL_LINGUAS="de pt_BR"
.