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 (13 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
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 dnl ----------- Check for mandatory dependencies --------------
    16 dnl Check for libpng (required)
    17 PKG_CHECK_MODULES(LIBPNG, [libpng] )
    19 AC_CHECK_LIB(GL, glXQueryVersion, [], [
    20     echo "The OpenGL library (libGL.so) could not be found, but is required."
    21     exit 1])
    22 AC_CHECK_HEADER([GL/gl.h], [], [
    23     echo "The OpenGL header files (eg GL/gl.h) could not be found, but are required."
    24     exit 1])
    25 dnl Implied by libpng, but check explicitly just in case
    26 AC_CHECK_LIB(z, uncompress, [], [
    27     echo "Zlib (libz.so) could not be found, but is required."
    28     exit 1])
    30 dnl Check for GTK (required for unix systems)
    31 PKG_CHECK_MODULES(GTK, gtk+-2.0, [HAVE_GTK='yes'])
    32 AM_CONDITIONAL(GUI_GTK, [test "$HAVE_GTK" = 'yes'])
    34 dnl Check for a supported cpu target for translation purposes
    35 case $host_cpu in
    36     i386|i486|i586|i686)
    37 	SH4_TRANSLATOR="x86"
    38         AC_DEFINE_UNQUOTED(SH4_TRANSLATOR,[TARGET_X86], [SH4 Translator to use (if any)] );;
    39     x86_64)
    40 	SH4_TRANSLATOR="x86_64"
    41         AC_DEFINE_UNQUOTED(SH4_TRANSLATOR,[TARGET_X86_64], [SH4 Translator to use (if any)] );;
    42     *)
    43 	echo "Warning: No translator available for $host. Building emulation core only";;
    44 esac
    45 AM_CONDITIONAL(BUILD_SH4X86, [test "$SH4_TRANSLATOR" = "x86" -o "$SH4_TRANSLATOR" = "x86_64"])
    47 dnl ------------------ Optional driver support -------------------
    48 dnl Check for esound
    49 PKG_CHECK_MODULES(ESOUND, [esound], [ 
    50      HAVE_ESOUND='yes'
    51      AC_DEFINE([HAVE_ESOUND],1,[Have esound support]) ], 
    52    [ echo "Warning: esound not found - building without audio support" ])
    53 AM_CONDITIONAL( AUDIO_ESOUND, [test "$HAVE_ESOUND" = 'yes'] )
    55 dnl Check for linux cdrom device support
    56 AC_CHECK_HEADER([linux/cdrom.h], [HAVE_LINUX_CDROM_H=yes], [
    57     echo "Linux CDROM support not found, building without it."]  )
    58 AM_CONDITIONAL(CDROM_LINUX, [test "$HAVE_LINUX_CDROM_H" = "yes"])
    60 dnl Check for cross-compiler availability - needed for system tests
    61 AC_PATH_PROG(SHCC, [sh-elf-gcc])
    62 AC_PATH_PROG(SHLD, [sh-elf-ld])
    63 AC_PATH_PROG(SHOBJCOPY, [sh-elf-objcopy])
    64 AC_PATH_PROG(ARMCC, [arm-elf-gcc])
    65 AC_PATH_PROG(ARMLD, [arm-elf-ld])
    66 AC_PATH_PROG(ARMOBJCOPY, [arm-elf-objcopy])
    68 if test "x$SHCC" = "x" -o "x$SHLD" = "x" -o "x$SHOBJCOPY" = "x"; then
    69   BUILD_SH="no"
    70   echo "Warning: SH4 cross-compiler not found, system tests will be disabled."
    71 else
    72   BUILD_SH="yes"
    73 fi
    74 if test "x$ARMCC" = "x" -o "x$ARMLD" = "x" -o "x$ARMOBJCOPY" = "x"; then
    75   BUILD_ARM="no"
    76   echo "Warning: ARM cross-compiler not found, AICA tests will be disabled."
    77 else
    78   BUILD_ARM="yes"
    79 fi
    80 AM_CONDITIONAL(BUILD_SYSTEST, [test "$BUILD_SH" = "yes"])
    81 AM_CONDITIONAL(BUILD_ARMTEST, [test "$BUILD_ARM" = "yes"])
    84 dnl ----------------------- All done, finish up -----------------------
    85 GETTEXT_PACKAGE=lxdream
    86 AC_SUBST(GETTEXT_PACKAGE)
    87 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[translation domain])
    89 dnl Add the languages which your application supports here.
    90 ALL_LINGUAS="de pt_BR"
    91 AM_GLIB_GNU_GETTEXT
    93 AC_OUTPUT([
    94 Makefile
    95 src/Makefile
    96 po/Makefile.in
    97 test/Makefile
    98 ])
.