Search
lxdream.org :: lxdream/configure.in
lxdream 0.9.1
released Jun 29
Download Now
filename configure.in
changeset 526:ba3da45b5754
prev521:33d2d92784c7
next528:49cb007348aa
author nkeynes
date Sat Nov 17 06:04:19 2007 +0000 (16 years ago)
permissions -rw-r--r--
last change Don't build the translator if the architecture is unsupported. Also tidy things up a little to allow (theoretically) different translators to be selected at build time.
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
    15 PKG_CHECK_MODULES(PACKAGE, 
    16    [ gtk+-2.0 dnl
    17      esound dnl
    18      libpng ])
    19 AC_CHECK_LIB(z, uncompress, [], [
    20     echo "Zlib (libz.so) could not be found, but is required."
    21     exit 1])
    22 AC_CHECK_LIB(GL, glXQueryVersion, [], [
    23     echo "The OpenGL library (libGL.so) could not be found, but is required."
    24     exit 1])
    25 AC_CHECK_HEADER([GL/gl.h], [], [
    26     echo "The OpenGL header files (eg GL/gl.h) could not be found, but are required."
    27     exit 1])
    29 dnl Check for a supported cpu target for translation purposes
    30 case $host_cpu in
    31     i386|i486|i586|i686)
    32 	SH4_TRANSLATOR="x86"
    33         AC_DEFINE_UNQUOTED(SH4_TRANSLATOR,["x86"], [SH4 Translator to use (if any)] );;
    34     x86_64)
    35 	SH4_TRANSLATOR="x86_64"
    36         AC_DEFINE_UNQUOTED(SH4_TRANSLATOR,["x86_64"], [SH4 Translator to use (if any)] );;
    37     *)
    38 	echo "Warning: No translator available for $host. Building emulation core only";;
    39 esac
    40 AM_CONDITIONAL(BUILD_SH4X86, [test "$SH4_TRANSLATOR" = "x86" -o "$SH4_TRANSLATOR" = "x86_64"])
    42 dnl Check for cdrom device support
    43 AC_CHECK_HEADER([linux/cdrom.h], [HAVE_LINUX_CDROM_H=yes], [
    44     echo "Linux CDROM support not found, building without it."]  )
    45 AM_CONDITIONAL(CDROM_LINUX, [test "$HAVE_LINUX_CDROM_H" = "yes"])
    47 dnl Check for cross-compiler availability
    48 AC_PATH_PROG(SHCC, [sh-elf-gcc])
    49 AC_PATH_PROG(SHLD, [sh-elf-ld])
    50 AC_PATH_PROG(SHOBJCOPY, [sh-elf-objcopy])
    51 AC_PATH_PROG(ARMCC, [arm-elf-gcc])
    52 AC_PATH_PROG(ARMLD, [arm-elf-ld])
    53 AC_PATH_PROG(ARMOBJCOPY, [arm-elf-objcopy])
    55 if test "x$SHCC" = "x" -o "x$SHLD" = "x" -o "x$SHOBJCOPY" = "x"; then
    56   BUILD_SH="no"
    57   echo "Warning: SH4 cross-compiler not found, system tests will be disabled."
    58 else
    59   BUILD_SH="yes"
    60 fi
    61 if test "x$ARMCC" = "x" -o "x$ARMLD" = "x" -o "x$ARMOBJCOPY" = "x"; then
    62   BUILD_ARM="no"
    63   echo "Warning: ARM cross-compiler not found, AICA tests will be disabled."
    64 else
    65   BUILD_ARM="yes"
    66 fi
    67 AM_CONDITIONAL(BUILD_SYSTEST, [test "$BUILD_SH" = "yes"])
    68 AM_CONDITIONAL(BUILD_ARMTEST, [test "$BUILD_ARM" = "yes"])
    70 GETTEXT_PACKAGE=lxdream
    71 AC_SUBST(GETTEXT_PACKAGE)
    72 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
    73 AC_SUBST(PACKAGE_CFLAGS)
    74 AC_SUBST(PACKAGE_LIBS)
    77 dnl Add the languages which your application supports here.
    78 ALL_LINGUAS="de pt_BR"
    79 AM_GLIB_GNU_GETTEXT
    81 AC_OUTPUT([
    82 Makefile
    83 src/Makefile
    84 po/Makefile.in
    85 test/Makefile
    86 ])
.