Search
lxdream.org :: lxdream/configure.in
lxdream 0.9.1
released Jun 29
Download Now
filename configure.in
changeset 521:33d2d92784c7
prev509:d72564edc482
next526:ba3da45b5754
author nkeynes
date Sat Nov 17 01:13:41 2007 +0000 (12 years ago)
permissions -rw-r--r--
last change Detect presence of SH4 + ARM cross-compilers, and disable the system tests if
we don't find the sh-elf environment.
Detect build host to see if we can make a working translator
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|x86_64)
    32 	TRANSLATOR="x86";;
    33     *)
    34 	echo "Warning: No translator available for $host. Building emulation core only";;
    35 esac
    36 AM_CONDITIONAL(BUILD_SH4X86, [test "$TRANSLATOR"="x86"])
    38 dnl Check for cdrom device support
    39 AC_CHECK_HEADER([linux/cdrom.h], [HAVE_LINUX_CDROM_H=yes], [
    40     echo "Linux CDROM support not found, building without it."]  )
    41 AM_CONDITIONAL(CDROM_LINUX, [test "$HAVE_LINUX_CDROM_H" = "yes"])
    43 dnl Check for cross-compiler availability
    44 AC_PATH_PROG(SHCC, [sh-elf-gcc])
    45 AC_PATH_PROG(SHLD, [sh-elf-ld])
    46 AC_PATH_PROG(SHOBJCOPY, [sh-elf-objcopy])
    47 AC_PATH_PROG(ARMCC, [arm-elf-gcc])
    48 AC_PATH_PROG(ARMLD, [arm-elf-ld])
    49 AC_PATH_PROG(ARMOBJCOPY, [arm-elf-objcopy])
    51 if test "x$SHCC" = "x" -o "x$SHLD" = "x" -o "x$SHOBJCOPY" = "x"; then
    52   BUILD_SH="no"
    53   echo "Warning: SH4 cross-compiler not found, system tests will be disabled."
    54 else
    55   BUILD_SH="yes"
    56 fi
    57 if test "x$ARMCC" = "x" -o "x$ARMLD" = "x" -o "x$ARMOBJCOPY" = "x"; then
    58   BUILD_ARM="no"
    59   echo "Warning: ARM cross-compiler not found, AICA tests will be disabled."
    60 else
    61   BUILD_ARM="yes"
    62 fi
    63 AM_CONDITIONAL(BUILD_SYSTEST, [test "$BUILD_SH" = "yes"])
    64 AM_CONDITIONAL(BUILD_ARMTEST, [test "$BUILD_ARM" = "yes"])
    66 GETTEXT_PACKAGE=lxdream
    67 AC_SUBST(GETTEXT_PACKAGE)
    68 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
    69 AC_SUBST(PACKAGE_CFLAGS)
    70 AC_SUBST(PACKAGE_LIBS)
    73 dnl Add the languages which your application supports here.
    74 ALL_LINGUAS="de pt_BR"
    75 AM_GLIB_GNU_GETTEXT
    77 AC_OUTPUT([
    78 Makefile
    79 src/Makefile
    80 po/Makefile.in
    81 test/Makefile
    82 ])
.