Search
lxdream.org :: lxdream/configure.in
lxdream 0.9.1
released Jun 29
Download Now
filename configure.in
changeset 537:d924be49e192
prev529:06ffbecc7262
next539:75f3e594d4a7
author nkeynes
date Tue Nov 20 10:27:58 2007 +0000 (11 years ago)
permissions -rw-r--r--
last change Move gtk UI into gtkui subdir (prep for non-gtk builds), and protect with
an automake conditional
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@537
    15
dnl ----------- Check for mandatory dependencies --------------
nkeynes@537
    16
dnl Check for libpng (required)
nkeynes@537
    17
PKG_CHECK_MODULES(LIBPNG, [libpng] )
nkeynes@529
    18
nkeynes@487
    19
AC_CHECK_LIB(GL, glXQueryVersion, [], [
nkeynes@487
    20
    echo "The OpenGL library (libGL.so) could not be found, but is required."
nkeynes@487
    21
    exit 1])
nkeynes@521
    22
AC_CHECK_HEADER([GL/gl.h], [], [
nkeynes@521
    23
    echo "The OpenGL header files (eg GL/gl.h) could not be found, but are required."
nkeynes@521
    24
    exit 1])
nkeynes@537
    25
dnl Implied by libpng, but check explicitly just in case
nkeynes@537
    26
AC_CHECK_LIB(z, uncompress, [], [
nkeynes@537
    27
    echo "Zlib (libz.so) could not be found, but is required."
nkeynes@537
    28
    exit 1])
nkeynes@537
    29
nkeynes@537
    30
dnl Check for GTK (required for unix systems)
nkeynes@537
    31
PKG_CHECK_MODULES(GTK, gtk+-2.0, [HAVE_GTK='yes'])
nkeynes@537
    32
AM_CONDITIONAL(GUI_GTK, [test "$HAVE_GTK" = 'yes'])
nkeynes@521
    33
nkeynes@521
    34
dnl Check for a supported cpu target for translation purposes
nkeynes@521
    35
case $host_cpu in
nkeynes@526
    36
    i386|i486|i586|i686)
nkeynes@526
    37
	SH4_TRANSLATOR="x86"
nkeynes@528
    38
        AC_DEFINE_UNQUOTED(SH4_TRANSLATOR,[TARGET_X86], [SH4 Translator to use (if any)] );;
nkeynes@526
    39
    x86_64)
nkeynes@526
    40
	SH4_TRANSLATOR="x86_64"
nkeynes@528
    41
        AC_DEFINE_UNQUOTED(SH4_TRANSLATOR,[TARGET_X86_64], [SH4 Translator to use (if any)] );;
nkeynes@521
    42
    *)
nkeynes@521
    43
	echo "Warning: No translator available for $host. Building emulation core only";;
nkeynes@521
    44
esac
nkeynes@526
    45
AM_CONDITIONAL(BUILD_SH4X86, [test "$SH4_TRANSLATOR" = "x86" -o "$SH4_TRANSLATOR" = "x86_64"])
nkeynes@94
    46
nkeynes@537
    47
dnl ------------------ Optional driver support -------------------
nkeynes@537
    48
dnl Check for esound
nkeynes@537
    49
PKG_CHECK_MODULES(ESOUND, [esound], [ 
nkeynes@537
    50
     HAVE_ESOUND='yes'
nkeynes@537
    51
     AC_DEFINE([HAVE_ESOUND],1,[Have esound support]) ], 
nkeynes@537
    52
   [ echo "Warning: esound not found - building without audio support" ])
nkeynes@537
    53
AM_CONDITIONAL( AUDIO_ESOUND, [test "$HAVE_ESOUND" = 'yes'] )
nkeynes@537
    54
nkeynes@537
    55
dnl Check for linux cdrom device support
nkeynes@489
    56
AC_CHECK_HEADER([linux/cdrom.h], [HAVE_LINUX_CDROM_H=yes], [
nkeynes@489
    57
    echo "Linux CDROM support not found, building without it."]  )
nkeynes@489
    58
AM_CONDITIONAL(CDROM_LINUX, [test "$HAVE_LINUX_CDROM_H" = "yes"])
nkeynes@489
    59
nkeynes@537
    60
dnl Check for cross-compiler availability - needed for system tests
nkeynes@521
    61
AC_PATH_PROG(SHCC, [sh-elf-gcc])
nkeynes@521
    62
AC_PATH_PROG(SHLD, [sh-elf-ld])
nkeynes@521
    63
AC_PATH_PROG(SHOBJCOPY, [sh-elf-objcopy])
nkeynes@521
    64
AC_PATH_PROG(ARMCC, [arm-elf-gcc])
nkeynes@521
    65
AC_PATH_PROG(ARMLD, [arm-elf-ld])
nkeynes@521
    66
AC_PATH_PROG(ARMOBJCOPY, [arm-elf-objcopy])
nkeynes@521
    67
nkeynes@521
    68
if test "x$SHCC" = "x" -o "x$SHLD" = "x" -o "x$SHOBJCOPY" = "x"; then
nkeynes@521
    69
  BUILD_SH="no"
nkeynes@521
    70
  echo "Warning: SH4 cross-compiler not found, system tests will be disabled."
nkeynes@521
    71
else
nkeynes@521
    72
  BUILD_SH="yes"
nkeynes@521
    73
fi
nkeynes@521
    74
if test "x$ARMCC" = "x" -o "x$ARMLD" = "x" -o "x$ARMOBJCOPY" = "x"; then
nkeynes@521
    75
  BUILD_ARM="no"
nkeynes@521
    76
  echo "Warning: ARM cross-compiler not found, AICA tests will be disabled."
nkeynes@521
    77
else
nkeynes@521
    78
  BUILD_ARM="yes"
nkeynes@521
    79
fi
nkeynes@521
    80
AM_CONDITIONAL(BUILD_SYSTEST, [test "$BUILD_SH" = "yes"])
nkeynes@521
    81
AM_CONDITIONAL(BUILD_ARMTEST, [test "$BUILD_ARM" = "yes"])
nkeynes@521
    82
nkeynes@537
    83
nkeynes@537
    84
dnl ----------------------- All done, finish up -----------------------
nkeynes@503
    85
GETTEXT_PACKAGE=lxdream
nkeynes@1
    86
AC_SUBST(GETTEXT_PACKAGE)
nkeynes@529
    87
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[translation domain])
nkeynes@1
    88
nkeynes@1
    89
dnl Add the languages which your application supports here.
nkeynes@509
    90
ALL_LINGUAS="de pt_BR"
nkeynes@1
    91
AM_GLIB_GNU_GETTEXT
nkeynes@1
    92
nkeynes@1
    93
AC_OUTPUT([
nkeynes@1
    94
Makefile
nkeynes@1
    95
src/Makefile
nkeynes@1
    96
po/Makefile.in
nkeynes@521
    97
test/Makefile
nkeynes@1
    98
])
nkeynes@1
    99
.