Search
lxdream.org :: lxdream/configure.in
lxdream 0.9.1
released Jun 29
Download Now
filename configure.in
changeset 542:96c5494e02fd
prev539:75f3e594d4a7
next562:e598411b640b
next586:2a3ba82cf243
author nkeynes
date Tue Jan 01 04:55:06 2008 +0000 (16 years ago)
branchlxdream-mmu
permissions -rw-r--r--
last change Remove Makefile (should never have been here)
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@539
    16
dnl Building on MAC?
nkeynes@539
    17
AC_CHECK_HEADER([Carbon/Carbon.h], [
nkeynes@539
    18
   HAVE_CARBON='yes'
nkeynes@539
    19
   APPLE_BUILD='yes'
nkeynes@542
    20
   LIBS="$LIBS -framework OpenGL -framework AGL -framework Carbon -L/usr/X11R6/lib -lGL"
nkeynes@539
    21
   AC_DEFINE(HAVE_CARBON,[1],[Have Carbon framework])
nkeynes@539
    22
   AC_DEFINE(APPLE_BUILD,[1],[Building on an apple platform. Things are different...])
nkeynes@539
    23
])
nkeynes@539
    24
nkeynes@537
    25
dnl Check for libpng (required)
nkeynes@537
    26
PKG_CHECK_MODULES(LIBPNG, [libpng] )
nkeynes@529
    27
nkeynes@539
    28
dnl Implied by libpng, but check explicitly just in case
nkeynes@539
    29
AC_CHECK_LIB(z, uncompress, [], [
nkeynes@539
    30
    echo "Zlib (libz.so) could not be found, but is required."
nkeynes@539
    31
    exit 1])
nkeynes@539
    32
nkeynes@539
    33
if test "$APPLE_BUILD" != 'yes'; then
nkeynes@487
    34
AC_CHECK_LIB(GL, glXQueryVersion, [], [
nkeynes@487
    35
    echo "The OpenGL library (libGL.so) could not be found, but is required."
nkeynes@487
    36
    exit 1])
nkeynes@521
    37
AC_CHECK_HEADER([GL/gl.h], [], [
nkeynes@521
    38
    echo "The OpenGL header files (eg GL/gl.h) could not be found, but are required."
nkeynes@521
    39
    exit 1])
nkeynes@539
    40
fi
nkeynes@537
    41
nkeynes@537
    42
dnl Check for GTK (required for unix systems)
nkeynes@539
    43
PKG_CHECK_MODULES(GTK, gtk+-2.0, [
nkeynes@539
    44
    HAVE_GTK='yes'
nkeynes@539
    45
    AC_DEFINE([HAVE_GTK],1,[Have GTK libraries])
nkeynes@539
    46
])
nkeynes@539
    47
nkeynes@539
    48
AM_CONDITIONAL(GUI_CARBON, [test "$HAVE_CARBON" = 'yes'])
nkeynes@537
    49
AM_CONDITIONAL(GUI_GTK, [test "$HAVE_GTK" = 'yes'])
nkeynes@521
    50
nkeynes@521
    51
dnl Check for a supported cpu target for translation purposes
nkeynes@521
    52
case $host_cpu in
nkeynes@526
    53
    i386|i486|i586|i686)
nkeynes@526
    54
	SH4_TRANSLATOR="x86"
nkeynes@528
    55
        AC_DEFINE_UNQUOTED(SH4_TRANSLATOR,[TARGET_X86], [SH4 Translator to use (if any)] );;
nkeynes@526
    56
    x86_64)
nkeynes@526
    57
	SH4_TRANSLATOR="x86_64"
nkeynes@528
    58
        AC_DEFINE_UNQUOTED(SH4_TRANSLATOR,[TARGET_X86_64], [SH4 Translator to use (if any)] );;
nkeynes@521
    59
    *)
nkeynes@521
    60
	echo "Warning: No translator available for $host. Building emulation core only";;
nkeynes@521
    61
esac
nkeynes@526
    62
AM_CONDITIONAL(BUILD_SH4X86, [test "$SH4_TRANSLATOR" = "x86" -o "$SH4_TRANSLATOR" = "x86_64"])
nkeynes@94
    63
nkeynes@537
    64
dnl ------------------ Optional driver support -------------------
nkeynes@537
    65
dnl Check for esound
nkeynes@537
    66
PKG_CHECK_MODULES(ESOUND, [esound], [ 
nkeynes@537
    67
     HAVE_ESOUND='yes'
nkeynes@537
    68
     AC_DEFINE([HAVE_ESOUND],1,[Have esound support]) ], 
nkeynes@537
    69
   [ echo "Warning: esound not found - building without audio support" ])
nkeynes@537
    70
AM_CONDITIONAL( AUDIO_ESOUND, [test "$HAVE_ESOUND" = 'yes'] )
nkeynes@537
    71
nkeynes@537
    72
dnl Check for linux cdrom device support
nkeynes@489
    73
AC_CHECK_HEADER([linux/cdrom.h], [HAVE_LINUX_CDROM_H=yes], [
nkeynes@489
    74
    echo "Linux CDROM support not found, building without it."]  )
nkeynes@489
    75
AM_CONDITIONAL(CDROM_LINUX, [test "$HAVE_LINUX_CDROM_H" = "yes"])
nkeynes@489
    76
nkeynes@537
    77
dnl Check for cross-compiler availability - needed for system tests
nkeynes@521
    78
AC_PATH_PROG(SHCC, [sh-elf-gcc])
nkeynes@521
    79
AC_PATH_PROG(SHLD, [sh-elf-ld])
nkeynes@521
    80
AC_PATH_PROG(SHOBJCOPY, [sh-elf-objcopy])
nkeynes@521
    81
AC_PATH_PROG(ARMCC, [arm-elf-gcc])
nkeynes@521
    82
AC_PATH_PROG(ARMLD, [arm-elf-ld])
nkeynes@521
    83
AC_PATH_PROG(ARMOBJCOPY, [arm-elf-objcopy])
nkeynes@521
    84
nkeynes@521
    85
if test "x$SHCC" = "x" -o "x$SHLD" = "x" -o "x$SHOBJCOPY" = "x"; then
nkeynes@521
    86
  BUILD_SH="no"
nkeynes@521
    87
  echo "Warning: SH4 cross-compiler not found, system tests will be disabled."
nkeynes@521
    88
else
nkeynes@521
    89
  BUILD_SH="yes"
nkeynes@521
    90
fi
nkeynes@521
    91
if test "x$ARMCC" = "x" -o "x$ARMLD" = "x" -o "x$ARMOBJCOPY" = "x"; then
nkeynes@521
    92
  BUILD_ARM="no"
nkeynes@521
    93
  echo "Warning: ARM cross-compiler not found, AICA tests will be disabled."
nkeynes@521
    94
else
nkeynes@521
    95
  BUILD_ARM="yes"
nkeynes@521
    96
fi
nkeynes@521
    97
AM_CONDITIONAL(BUILD_SYSTEST, [test "$BUILD_SH" = "yes"])
nkeynes@521
    98
AM_CONDITIONAL(BUILD_ARMTEST, [test "$BUILD_ARM" = "yes"])
nkeynes@521
    99
nkeynes@537
   100
nkeynes@537
   101
dnl ----------------------- All done, finish up -----------------------
nkeynes@503
   102
GETTEXT_PACKAGE=lxdream
nkeynes@1
   103
AC_SUBST(GETTEXT_PACKAGE)
nkeynes@529
   104
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[translation domain])
nkeynes@1
   105
nkeynes@1
   106
dnl Add the languages which your application supports here.
nkeynes@509
   107
ALL_LINGUAS="de pt_BR"
nkeynes@1
   108
AM_GLIB_GNU_GETTEXT
nkeynes@1
   109
nkeynes@1
   110
AC_OUTPUT([
nkeynes@1
   111
Makefile
nkeynes@1
   112
src/Makefile
nkeynes@1
   113
po/Makefile.in
nkeynes@521
   114
test/Makefile
nkeynes@1
   115
])
nkeynes@1
   116
.