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 Wed Nov 21 11:52:13 2007 +0000 (12 years ago)
permissions -rw-r--r--
last change Link the X GL as well as the framework one - this probably shouldn't work, and yet it seems to be fine...
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 Building on MAC?
    17 AC_CHECK_HEADER([Carbon/Carbon.h], [
    18    HAVE_CARBON='yes'
    19    APPLE_BUILD='yes'
    20    LIBS="$LIBS -framework OpenGL -framework AGL -framework Carbon -L/usr/X11R6/lib -lGL"
    21    AC_DEFINE(HAVE_CARBON,[1],[Have Carbon framework])
    22    AC_DEFINE(APPLE_BUILD,[1],[Building on an apple platform. Things are different...])
    23 ])
    25 dnl Check for libpng (required)
    26 PKG_CHECK_MODULES(LIBPNG, [libpng] )
    28 dnl Implied by libpng, but check explicitly just in case
    29 AC_CHECK_LIB(z, uncompress, [], [
    30     echo "Zlib (libz.so) could not be found, but is required."
    31     exit 1])
    33 if test "$APPLE_BUILD" != 'yes'; then
    34 AC_CHECK_LIB(GL, glXQueryVersion, [], [
    35     echo "The OpenGL library (libGL.so) could not be found, but is required."
    36     exit 1])
    37 AC_CHECK_HEADER([GL/gl.h], [], [
    38     echo "The OpenGL header files (eg GL/gl.h) could not be found, but are required."
    39     exit 1])
    40 fi
    42 dnl Check for GTK (required for unix systems)
    43 PKG_CHECK_MODULES(GTK, gtk+-2.0, [
    44     HAVE_GTK='yes'
    45     AC_DEFINE([HAVE_GTK],1,[Have GTK libraries])
    46 ])
    48 AM_CONDITIONAL(GUI_CARBON, [test "$HAVE_CARBON" = 'yes'])
    49 AM_CONDITIONAL(GUI_GTK, [test "$HAVE_GTK" = 'yes'])
    51 dnl Check for a supported cpu target for translation purposes
    52 case $host_cpu in
    53     i386|i486|i586|i686)
    54 	SH4_TRANSLATOR="x86"
    55         AC_DEFINE_UNQUOTED(SH4_TRANSLATOR,[TARGET_X86], [SH4 Translator to use (if any)] );;
    56     x86_64)
    57 	SH4_TRANSLATOR="x86_64"
    58         AC_DEFINE_UNQUOTED(SH4_TRANSLATOR,[TARGET_X86_64], [SH4 Translator to use (if any)] );;
    59     *)
    60 	echo "Warning: No translator available for $host. Building emulation core only";;
    61 esac
    62 AM_CONDITIONAL(BUILD_SH4X86, [test "$SH4_TRANSLATOR" = "x86" -o "$SH4_TRANSLATOR" = "x86_64"])
    64 dnl ------------------ Optional driver support -------------------
    65 dnl Check for esound
    66 PKG_CHECK_MODULES(ESOUND, [esound], [ 
    67      HAVE_ESOUND='yes'
    68      AC_DEFINE([HAVE_ESOUND],1,[Have esound support]) ], 
    69    [ echo "Warning: esound not found - building without audio support" ])
    70 AM_CONDITIONAL( AUDIO_ESOUND, [test "$HAVE_ESOUND" = 'yes'] )
    72 dnl Check for linux cdrom device support
    73 AC_CHECK_HEADER([linux/cdrom.h], [HAVE_LINUX_CDROM_H=yes], [
    74     echo "Linux CDROM support not found, building without it."]  )
    75 AM_CONDITIONAL(CDROM_LINUX, [test "$HAVE_LINUX_CDROM_H" = "yes"])
    77 dnl Check for cross-compiler availability - needed for system tests
    78 AC_PATH_PROG(SHCC, [sh-elf-gcc])
    79 AC_PATH_PROG(SHLD, [sh-elf-ld])
    80 AC_PATH_PROG(SHOBJCOPY, [sh-elf-objcopy])
    81 AC_PATH_PROG(ARMCC, [arm-elf-gcc])
    82 AC_PATH_PROG(ARMLD, [arm-elf-ld])
    83 AC_PATH_PROG(ARMOBJCOPY, [arm-elf-objcopy])
    85 if test "x$SHCC" = "x" -o "x$SHLD" = "x" -o "x$SHOBJCOPY" = "x"; then
    86   BUILD_SH="no"
    87   echo "Warning: SH4 cross-compiler not found, system tests will be disabled."
    88 else
    89   BUILD_SH="yes"
    90 fi
    91 if test "x$ARMCC" = "x" -o "x$ARMLD" = "x" -o "x$ARMOBJCOPY" = "x"; then
    92   BUILD_ARM="no"
    93   echo "Warning: ARM cross-compiler not found, AICA tests will be disabled."
    94 else
    95   BUILD_ARM="yes"
    96 fi
    97 AM_CONDITIONAL(BUILD_SYSTEST, [test "$BUILD_SH" = "yes"])
    98 AM_CONDITIONAL(BUILD_ARMTEST, [test "$BUILD_ARM" = "yes"])
   101 dnl ----------------------- All done, finish up -----------------------
   102 GETTEXT_PACKAGE=lxdream
   103 AC_SUBST(GETTEXT_PACKAGE)
   104 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[translation domain])
   106 dnl Add the languages which your application supports here.
   107 ALL_LINGUAS="de pt_BR"
   108 AM_GLIB_GNU_GETTEXT
   110 AC_OUTPUT([
   111 Makefile
   112 src/Makefile
   113 po/Makefile.in
   114 test/Makefile
   115 ])
.