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
file annotate diff log raw
nkeynes@1
     1
dnl Process this file with autoconf to produce a configure script.
nkeynes@1
     2
nkeynes@1
     3
AC_INIT(configure.in)
nkeynes@503
     4
AM_INIT_AUTOMAKE(lxdream, 0.8.1)
nkeynes@1
     5
AM_MAINTAINER_MODE
nkeynes@1
     6
AM_CONFIG_HEADER(config.h)
nkeynes@1
     7
nkeynes@1
     8
AC_ISC_POSIX
nkeynes@1
     9
AC_PROG_CC
nkeynes@1
    10
AM_PROG_CC_STDC
nkeynes@1
    11
AC_HEADER_STDC
nkeynes@521
    12
AC_CANONICAL_BUILD
nkeynes@521
    13
AC_CANONICAL_HOST
nkeynes@1
    14
nkeynes@94
    15
PKG_CHECK_MODULES(PACKAGE, 
nkeynes@482
    16
   [ gtk+-2.0 dnl
nkeynes@471
    17
     esound dnl
nkeynes@471
    18
     libpng ])
nkeynes@487
    19
AC_CHECK_LIB(z, uncompress, [], [
nkeynes@487
    20
    echo "Zlib (libz.so) could not be found, but is required."
nkeynes@487
    21
    exit 1])
nkeynes@487
    22
AC_CHECK_LIB(GL, glXQueryVersion, [], [
nkeynes@487
    23
    echo "The OpenGL library (libGL.so) could not be found, but is required."
nkeynes@487
    24
    exit 1])
nkeynes@521
    25
AC_CHECK_HEADER([GL/gl.h], [], [
nkeynes@521
    26
    echo "The OpenGL header files (eg GL/gl.h) could not be found, but are required."
nkeynes@521
    27
    exit 1])
nkeynes@521
    28
nkeynes@521
    29
dnl Check for a supported cpu target for translation purposes
nkeynes@521
    30
case $host_cpu in
nkeynes@521
    31
    i386|i486|i586|i686|x86_64)
nkeynes@521
    32
	TRANSLATOR="x86";;
nkeynes@521
    33
    *)
nkeynes@521
    34
	echo "Warning: No translator available for $host. Building emulation core only";;
nkeynes@521
    35
esac
nkeynes@521
    36
AM_CONDITIONAL(BUILD_SH4X86, [test "$TRANSLATOR"="x86"])
nkeynes@94
    37
nkeynes@489
    38
dnl Check for cdrom device support
nkeynes@489
    39
AC_CHECK_HEADER([linux/cdrom.h], [HAVE_LINUX_CDROM_H=yes], [
nkeynes@489
    40
    echo "Linux CDROM support not found, building without it."]  )
nkeynes@489
    41
AM_CONDITIONAL(CDROM_LINUX, [test "$HAVE_LINUX_CDROM_H" = "yes"])
nkeynes@489
    42
nkeynes@521
    43
dnl Check for cross-compiler availability
nkeynes@521
    44
AC_PATH_PROG(SHCC, [sh-elf-gcc])
nkeynes@521
    45
AC_PATH_PROG(SHLD, [sh-elf-ld])
nkeynes@521
    46
AC_PATH_PROG(SHOBJCOPY, [sh-elf-objcopy])
nkeynes@521
    47
AC_PATH_PROG(ARMCC, [arm-elf-gcc])
nkeynes@521
    48
AC_PATH_PROG(ARMLD, [arm-elf-ld])
nkeynes@521
    49
AC_PATH_PROG(ARMOBJCOPY, [arm-elf-objcopy])
nkeynes@521
    50
nkeynes@521
    51
if test "x$SHCC" = "x" -o "x$SHLD" = "x" -o "x$SHOBJCOPY" = "x"; then
nkeynes@521
    52
  BUILD_SH="no"
nkeynes@521
    53
  echo "Warning: SH4 cross-compiler not found, system tests will be disabled."
nkeynes@521
    54
else
nkeynes@521
    55
  BUILD_SH="yes"
nkeynes@521
    56
fi
nkeynes@521
    57
if test "x$ARMCC" = "x" -o "x$ARMLD" = "x" -o "x$ARMOBJCOPY" = "x"; then
nkeynes@521
    58
  BUILD_ARM="no"
nkeynes@521
    59
  echo "Warning: ARM cross-compiler not found, AICA tests will be disabled."
nkeynes@521
    60
else
nkeynes@521
    61
  BUILD_ARM="yes"
nkeynes@521
    62
fi
nkeynes@521
    63
AM_CONDITIONAL(BUILD_SYSTEST, [test "$BUILD_SH" = "yes"])
nkeynes@521
    64
AM_CONDITIONAL(BUILD_ARMTEST, [test "$BUILD_ARM" = "yes"])
nkeynes@521
    65
nkeynes@503
    66
GETTEXT_PACKAGE=lxdream
nkeynes@1
    67
AC_SUBST(GETTEXT_PACKAGE)
nkeynes@1
    68
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
nkeynes@503
    69
AC_SUBST(PACKAGE_CFLAGS)
nkeynes@503
    70
AC_SUBST(PACKAGE_LIBS)
nkeynes@503
    71
nkeynes@1
    72
nkeynes@1
    73
dnl Add the languages which your application supports here.
nkeynes@509
    74
ALL_LINGUAS="de pt_BR"
nkeynes@1
    75
AM_GLIB_GNU_GETTEXT
nkeynes@1
    76
nkeynes@1
    77
AC_OUTPUT([
nkeynes@1
    78
Makefile
nkeynes@1
    79
src/Makefile
nkeynes@1
    80
po/Makefile.in
nkeynes@521
    81
test/Makefile
nkeynes@1
    82
])
nkeynes@1
    83
.