加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
configure.ac 33.93 KB
一键复制 编辑 原始数据 按行查看 历史
Andrea Mazzoleni 提交于 2020-01-28 22:56 . Preliminary Pi 4 support
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.65])
dnl Get version number from git
m4_define([git_revision], m4_esyscmd_s([./autover.sh]))
AC_INIT([advancemame], [git_revision], [], [], [http://www.advancemame.it])
AC_CONFIG_SRCDIR([advance/advance.mak])
AC_CONFIG_HEADERS([advance/lib/config.h:advance/lib/config.hin])
AC_CANONICAL_HOST
dnl Checks for system.
case "$host" in
*-*-linux*)
ac_system=unix
ac_host=linux
ac_host_cflags=
ac_host_ldflags=
AC_SUBST([ASMFLAGS],["-f elf"])
AC_SUBST([CFLAGS_FOR_BUILD],["-O0 -DUSE_COMPILER_GNUC -DUSE_OBJ_ELF -DUSE_OS_UNIX"])
AC_SUBST([EXE],[])
;;
*-*-darwin*)
ac_system=unix
ac_host=darwin
ac_host_cflags=-no-cpp-precomp
ac_host_ldflags=
AC_SUBST([ASMFLAGS],[""])
AC_SUBST([CFLAGS_FOR_BUILD],["-O0"])
AC_SUBST([EXE],[])
;;
*-*-mingw32*)
ac_system=windows
ac_host=windows
ac_host_cflags=
ac_host_ldflags=
AC_SUBST([ASMFLAGS],["-f coff"])
AC_SUBST([CFLAGS_FOR_BUILD],["-O0 -DUSE_COMPILER_GNUC -DUSE_OBJ_COFF -DUSE_OS_WINDOWS"])
AC_SUBST([EXE],[.exe])
;;
*-*-msdos*)
ac_system=dos
ac_host=dos
ac_host_cflags=
ac_host_ldflags=
AC_SUBST([ASMFLAGS],["-f coff"])
AC_SUBST([CFLAGS_FOR_BUILD],["-O0 -DUSE_COMPILER_GNUC -DUSE_OBJ_COFF -DUSE_OS_DOS"])
AC_SUBST([EXE],[.exe])
;;
*)
ac_system=unix
ac_host=generic
ac_host_cflags=
ac_host_ldflags=
AC_SUBST([ASMFLAGS],[""])
AC_SUBST([CFLAGS_FOR_BUILD],["-O0"])
AC_SUBST([EXE],[])
;;
esac
AC_SUBST([CONF_SYSTEM],[$ac_system])
AC_SUBST([CONF_HOST],[$ac_host])
case "$build" in
*-*-linux*)
ac_build=linux
AC_SUBST([EXE_FOR_BUILD],[])
;;
*-*-darwin*)
ac_build=darwin
AC_SUBST([EXE_FOR_BUILD],[])
;;
*-*-cygwin* | *-*-mingw32*)
ac_build=windows
AC_SUBST([EXE_FOR_BUILD],[.exe])
;;
*-*-msdos*)
ac_build=dos
AC_SUBST([EXE_FOR_BUILD],[.exe])
;;
*)
ac_build=unix
AC_SUBST([EXE_FOR_BUILD],[])
;;
esac
AC_SUBST([CONF_BUILD],[$ac_build])
if test -z "$CFLAGS" ; then
ac_auto_cflags=yes
else
ac_auto_cflags=no
fi
if test -z "$LDFLAGS" ; then
ac_auto_ldflags=yes
else
ac_auto_ldflags=no
fi
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_GREP
PKG_PROG_PKG_CONFIG
AC_CHECK_TOOLS(AR, ar)
AC_CHECK_TOOLS(RC, windres)
AC_CHECK_PROGS(RM, rm)
AC_CHECK_PROGS(CP, cp)
AC_CHECK_PROGS(MKDIR, mkdir)
AC_CHECK_PROGS(ECHO, echo)
AC_CHECK_PROGS(TAR, tar)
AC_CHECK_PROGS(GZIP, gzip)
AC_CHECK_PROGS(ZIP, zip)
if test "x$cross_compiling" = "xyes"; then
dnl if cross compiling autodetect the system compilers
AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
AC_CHECK_PROGS(CXX_FOR_BUILD, g++ gxx c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC)
else
#if not cross compiling use the already detected compilers
CC_FOR_BUILD=$CC
CXX_FOR_BUILD=$CXX
AC_SUBST(CC_FOR_BUILD)
AC_SUBST(CXX_FOR_BUILD)
fi
dnl Checks for optimizations
AC_ARG_ENABLE(
[perf],
AC_HELP_STRING([--enable-perf],[enable the test compilation with profiler. Only for developers. (default no)]),
[ac_enable_perf=$enableval],
[ac_enable_perf=no]
)
AC_SUBST([CONF_PERF],[$ac_enable_perf])
AC_ARG_ENABLE(
[debug],
AC_HELP_STRING([--enable-debug],[enable the test compilation without optimization and with debug info. Only for developers. (default no)]),
[ac_enable_debug=$enableval],
[ac_enable_debug=no]
)
AC_SUBST([CONF_DEBUG],[$ac_enable_debug])
AC_ARG_ENABLE(
[bare],
AC_HELP_STRING([--enable-bare],[enable compilation without drivers. (default no)]),
[ac_enable_bare=$enableval],
[ac_enable_bare=no]
)
AC_ARG_ENABLE(
[tiny],
AC_HELP_STRING([--enable-tiny],[enable compilation with MAME/MESS tiny configuration. (default no)]),
[ac_enable_tiny=$enableval],
[ac_enable_tiny=no]
)
AC_SUBST([CONF_TINY],[$ac_enable_tiny])
AC_ARG_ENABLE(
[32],
AC_HELP_STRING([--enable-32],[force compilation for x86 32 bit. (default no)]),
[ac_enable_32=$enableval],
[ac_enable_32=no]
)
if test $ac_auto_cflags = yes; then
if test $ac_enable_perf = yes ; then
CFLAGS="-O1 -pg -Wall -Wno-sign-compare -Wno-unused"
elif test $ac_enable_debug = yes ; then
CFLAGS="-O0 -g -Wall -Wno-sign-compare -Wno-unused"
else
CFLAGS=""
dnl O3 generally gives better performance than O2 in both Intel and ARM
AC_CHECK_CC_OPT([-O3], [CFLAGS="$CFLAGS -O3"], [])
if test $ac_enable_32 = yes ; then
dnl Force build for 32 bit x86
AC_CHECK_CC_OPT([-m32 -march=i686], [CFLAGS="$CFLAGS -m32 -march=i686"], [])
AC_CHECK_CC_OPT([-fomit-frame-pointer], [CFLAGS="$CFLAGS -fomit-frame-pointer"], [])
elif $GREP a03111\\\|b03111\\\|c03111 /proc/cpuinfo >/dev/null 2>&1; then
dnl Raspberry Pi 4
AC_CHECK_CC_OPT([-march=armv8-a+crc], [CFLAGS="$CFLAGS -march=armv8-a+crc"], [])
AC_CHECK_CC_OPT([-mtune=cortex-a72], [CFLAGS="$CFLAGS -mtune=cortex-a72"], [])
AC_CHECK_CC_OPT([-fomit-frame-pointer], [CFLAGS="$CFLAGS -fomit-frame-pointer"], [])
AC_CHECK_CC_OPT([-funsafe-math-optimizations], [CFLAGS="$CFLAGS -funsafe-math-optimizations"], [])
elif $GREP a02082\\\|a22082 /proc/cpuinfo >/dev/null 2>&1; then
dnl Raspberry Pi 3
dnl GCC 4 has problems with -march=native in Raspbian,
dnl resulting in a "double free or corruption" error
dnl See: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=139091
AC_CHECK_CC_OPT([-march=armv8-a+crc], [CFLAGS="$CFLAGS -march=armv8-a+crc"], [])
AC_CHECK_CC_OPT([-mtune=cortex-a53], [CFLAGS="$CFLAGS -mtune=cortex-a53"], [])
AC_CHECK_CC_OPT([-mfloat-abi=hard], [CFLAGS="$CFLAGS -mfloat-abi=hard"], [])
AC_CHECK_CC_OPT([-mfpu=crypto-neon-fp-armv8], [CFLAGS="$CFLAGS -mfpu=crypto-neon-fp-armv8"], [])
AC_CHECK_CC_OPT([-funsafe-math-optimizations], [CFLAGS="$CFLAGS -funsafe-math-optimizations"], [])
elif $GREP a01040\\\|a01041\\\|a21041\\\|a22042 /proc/cpuinfo >/dev/null 2>&1; then
dnl Raspberry Pi 2
AC_CHECK_CC_OPT([-march=armv7-a], [CFLAGS="$CFLAGS -march=armv7-a"], [])
AC_CHECK_CC_OPT([-mfpu=neon-vfpv4], [CFLAGS="$CFLAGS -mfpu=neon-vfpv4"], [])
else
dnl Generic
AC_CHECK_CC_OPT([-march=native], [CFLAGS="$CFLAGS -march=native"], [])
AC_CHECK_CC_OPT([-fomit-frame-pointer], [CFLAGS="$CFLAGS -fomit-frame-pointer"], [])
fi
dnl Code was written when compilers where not aggressively optimizing undefined behaviour about aliasing
dnl WARNING! At present disabled to maximize performance
dnl AC_CHECK_CC_OPT([-fno-strict-aliasing], [CFLAGS="$CFLAGS -fno-strict-aliasing"], [])
dnl Code was written when compilers where not aggressively optimizing undefined behaviour about overflow in signed integers
dnl WARNING! At present disabled to maximize performance
dnl AC_CHECK_CC_OPT([-fno-strict-overflow], [CFLAGS="$CFLAGS -fno-strict-overflow"], [])
dnl Code was written on Intel where char is signed
AC_CHECK_CC_OPT([-fsigned-char], [CFLAGS="$CFLAGS -fsigned-char"], [])
dnl We are not interested in stack protection
AC_CHECK_CC_OPT([-fno-stack-protector], [CFLAGS="$CFLAGS -fno-stack-protector"], [])
dnl Some useful warnings
AC_CHECK_CC_OPT([-Wall], [CFLAGS="$CFLAGS -Wall"], [])
AC_CHECK_CC_OPT([-Wno-sign-compare], [CFLAGS="$CFLAGS -Wno-sign-compare"], [])
AC_CHECK_CC_OPT([-Wno-unused], [CFLAGS="$CFLAGS -Wno-unused"], [])
fi
if test ! -z $ac_host_cflags; then
CFLAGS="$ac_host_cflags $CFLAGS"
fi
fi
if test $ac_auto_ldflags = yes ; then
if test $ac_enable_perf = yes ; then
LDFLAGS="-pg"
elif test $ac_enable_debug = yes ; then
if test $ac_system = unix ; then
LDFLAGS="-rdynamic"
else
LDFLAGS="-g"
fi
else
LDFLAGS="-s"
fi
if test ! -z $ac_host_ldflags; then
LDFLAGS="$ac_host_ldflags $LDFLAGS"
fi
if test $ac_enable_32 = yes ; then
dnl Force build for 32 bit x86
LDFLAGS="-m32 $LDFLAGS"
fi
fi
AC_SUBST([CONF_CFLAGS_OPT],[$CFLAGS])
AC_SUBST([CONF_LDFLAGS],[$LDFLAGS])
dnl Checks for architecture
AC_C_BIGENDIAN(
[ac_is_bigendian=yes],
[ac_is_bigendian=no]
)
if test $ac_is_bigendian = yes; then
CFLAGS_ARCH="$CFLAGS_ARCH -DUSE_MSB"
else
CFLAGS_ARCH="$CFLAGS_ARCH -DUSE_LSB"
fi
AC_CHECK_SIZEOF(char)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
AC_CHECK_SIZEOF(void*)
dnl Large file supports
AC_SYS_LARGEFILE
AC_ARG_ENABLE(
[asm],
AC_HELP_STRING([--enable-asm],[enable the x86 assembler optimizations (default auto)]),
[ac_enable_asm=$enableval],
[ac_enable_asm=auto]
)
if test $ac_enable_asm = auto; then
AC_MSG_CHECKING([whether ${CC-cc} accepts x86 assembler])
AC_TRY_COMPILE([
], [
#if !defined(__GNUC__) || !defined(__i386__)
choke me
#endif
],[ac_enable_asm=yes],[ac_enable_asm=no])
AC_MSG_RESULT([$ac_enable_asm])
if test $ac_enable_asm = yes; then
AC_CHECK_PROGS([ASM], [${ac_tool_prefix}nasm], [none])
if test $ASM = none; then
ac_enable_asm=no
else
CFLAGS_ARCH="$CFLAGS_ARCH -DUSE_ASM_INLINE"
fi
fi
elif test $ac_enable_asm = yes; then
AC_CHECK_PROGS([ASM], [${ac_tool_prefix}nasm], [none])
if test $ASM = none; then
AC_MSG_ERROR([the NASM assembler is required for the "asm" compilation])
else
CFLAGS_ARCH="$CFLAGS_ARCH -DUSE_ASM_INLINE"
fi
fi
AC_ARG_ENABLE(
[asm-mips3],
AC_HELP_STRING([--enable-asm-mips3],[enable the x86 assembler MIPS3 emulator (default no)]),
[ac_enable_asm_mips3=$enableval],
[ac_enable_asm_mips3=no]
)
if test $ac_enable_asm_mips3 = auto; then
if test $ac_enable_asm = yes; then
ac_enable_asm_mips3=yes
else
ac_enable_asm_mips3=no
fi
fi
if test $ac_enable_asm_mips3 = yes; then
if test ! $ac_enable_asm = yes; then
AC_MSG_ERROR([the x86 assembler is required for the "asm-mips3" compilation])
fi
CFLAGS_ARCH="$CFLAGS_ARCH -DUSE_ASM_EMUMIPS3"
fi
AC_SUBST([CONF_CFLAGS_ARCH],[$CFLAGS_ARCH])
AC_ARG_ENABLE(
[debugger],
AC_HELP_STRING([--enable-debugger],[enable the emulator debugger (default no)]),
[ac_enable_debugger=$enableval],
[ac_enable_debugger=no]
)
AC_SUBST([CONF_DEBUGGER],[$ac_enable_debugger])
dnl Checks for header files.
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for library functions.
if test $ac_system = unix ; then
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_HEADER_DIRENT
AC_HEADER_TIME
AC_HEADER_TIOCGWINSZ
AC_CHECK_HEADERS([unistd.h sched.h netdb.h termios.h execinfo.h])
AC_CHECK_HEADERS([sys/utsname.h sys/types.h sys/stat.h sys/socket.h sys/select.h sys/ioctl.h sys/time.h sys/mman.h sys/io.h sys/kd.h sys/vt.h])
AC_CHECK_HEADERS([netinet/in.h ucontext.h])
AC_C_CONST
AC_C_RESTRICT
AC_C_INLINE
AC_FUNC_ALLOCA
AC_FUNC_MMAP
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([strcasecmp strerror utimes])
AC_CHECK_FUNCS([uname sysconf backtrace backtrace_symbols])
AC_CHECK_FUNCS([flockfile funlockfile fread_unlocked fwrite_unlocked fgetc_unlocked feof_unlocked fseeko ftello])
AC_CHECK_FUNCS([fsync renameat openat fdopen])
AC_CHECK_FUNCS([iopl mprotect sched_getscheduler sched_setscheduler sched_get_priority_max sched_yield])
AC_MSG_CHECKING([for port in/out])
AC_TRY_LINK([
#include <sys/io.h>
], [
outb(0x80, inb(0x80));
],[ac_func_inout=yes],[ac_func_inout=no])
AC_MSG_RESULT([$ac_func_inout])
if test $ac_func_inout = yes; then
AC_DEFINE([HAVE_INOUT],[1],[Define to 1 if you have the `inb' and `outb' functions.])
fi
fi
dnl Checks for libraries.
ac_lib_direct_flag=no
ac_lib_video_flag=no
ac_lib_text_flag=no
ac_lib_sound_flag=no
ac_lib_keyboard_flag=no
if test $ac_system = dos; then
ac_lib_video="$ac_lib_video svgaline vbeline vgaline vbe"
ac_lib_sound="$ac_lib_sound seal vsync allegro"
ac_lib_keyboard="$ac_lib_keyboard allegro"
ac_lib_joystick="$ac_lib_joystick allegro"
ac_lib_mouse="$ac_lib_mouse allegro"
ac_lib_direct_flag=yes
ac_lib_video_flag=yes
ac_lib_sound_flag=yes
ac_lib_keyboard_flag=yes
ac_lib_text_flag=yes
fi
if test $ac_system = windows; then
ac_lib_text_flag=yes
fi
dnl Checks for math. In some platforms it's not needed to use -lm, like Haiku.
AC_CHECK_LIB(
[m],
[cos],
[ac_lib_system="$ac_lib_system -lm"],
[]
)
dnl Checks for network lib. In some platforms it's needed to use -lnetwork, like Haiku.
AC_CHECK_LIB(
[socket],
[socket],
[ac_lib_system="$ac_lib_system -lsocket"],
[]
)
AC_CHECK_LIB(
[network],
[socket],
[ac_lib_system="$ac_lib_system -lnetwork"],
[]
)
AC_SUBST([CONF_LIBS],[$ac_lib_system])
dnl Checks for zlib
AC_ARG_ENABLE(
[zlib],
AC_HELP_STRING([--enable-zlib],[enable the use of the zlib library. (default auto)]),
[ac_lib_zlib=$enableval],
[ac_lib_zlib=auto]
)
if test $ac_lib_zlib = auto; then
AC_CHECK_LIB(
[z],
[adler32],
[ac_lib_zlib=yes],
[ac_lib_zlib=no]
)
fi
if test $ac_lib_zlib = yes; then
ac_lib_other="$ac_lib_other zlib"
else
ac_lib_other="$ac_lib_other zlib(internal)"
fi
AC_SUBST([CONF_LIB_ZLIB],[$ac_lib_zlib])
dnl Checks for expat
AC_ARG_ENABLE(
[expat],
AC_HELP_STRING([--enable-expat],[enable the use of the expat library. (default auto)]),
[ac_lib_expat=$enableval],
[ac_lib_expat=auto]
)
if test $ac_lib_expat = auto; then
AC_CHECK_LIB(
[expat],
[XML_ParserCreate],
[ac_lib_expat=yes],
[ac_lib_expat=no]
)
fi
if test $ac_lib_expat = yes; then
ac_lib_other="$ac_lib_other expat"
else
ac_lib_other="$ac_lib_other expat(internal)"
fi
AC_SUBST([CONF_LIB_EXPAT],[$ac_lib_expat])
dnl Checks for svgalib
AC_ARG_ENABLE(
[svgalib],
AC_HELP_STRING([--enable-svgalib],[enable the use of the SVGALIB library. (default no)]),
[ac_lib_svgalib=$enableval],
[ac_lib_svgalib=no]
)
if test $ac_lib_svgalib = auto; then
AC_CHECK_LIB(
[vga],
[vga_init],
[ac_lib_svgalib=yes],
[ac_lib_svgalib=no]
)
if test $ac_lib_svgalib = yes; then
AC_MSG_CHECKING([for svgalib version])
AC_TRY_COMPILE([
#include <vga.h>
], [
#if !defined(SVGALIB_VER) || (SVGALIB_VER<0x010900)
choke me
#endif
],[ac_lib_svgalib=yes],[ac_lib_svgalib=no])
AC_MSG_RESULT([$ac_lib_svgalib])
fi
elif test $ac_lib_svgalib = yes; then
AC_CHECK_LIB(
[vga],
[vga_init],
[],
[AC_MSG_ERROR([the SVGALIB library is missing])]
)
AC_MSG_CHECKING([for svgalib version])
AC_TRY_COMPILE([
#include <vga.h>
], [
#if !defined(SVGALIB_VER) || (SVGALIB_VER<0x010900)
choke me
#endif
],[],[AC_MSG_ERROR([the SVGALIB library is too old. Please upgrade to the 1.9 or 2.0 version])])
AC_MSG_RESULT([yes])
fi
if test $ac_lib_svgalib = yes; then
ac_lib_video="$ac_lib_video svgalib"
ac_lib_keyboard="$ac_lib_keyboard svgalib"
ac_lib_mouse="$ac_lib_mouse svgalib"
ac_lib_joystick="$ac_lib_joystick svgalib"
ac_lib_direct_flag=yes
ac_lib_video_flag=yes
ac_lib_keyboard_flag=yes
fi
AC_SUBST([CONF_LIB_SVGALIB],[$ac_lib_svgalib])
dnl Checks for fb
AC_ARG_ENABLE(
[fb],
AC_HELP_STRING([--enable-fb],[enable the use of the Frame Buffer library. (default auto)]),
[ac_lib_fb=$enableval],
[ac_lib_fb=auto]
)
if test $ac_lib_fb = auto; then
AC_MSG_CHECKING([for FrameBuffer])
AC_TRY_COMPILE([
#include <linux/fb.h>
], [
struct fb_var_screeninfo dummy;
],[ac_lib_fb=yes],[ac_lib_fb=no])
AC_MSG_RESULT([$ac_lib_fb])
elif test $ac_lib_fb = yes; then
AC_MSG_CHECKING([for FrameBuffer])
AC_TRY_COMPILE([
#include <linux/fb.h>
], [
struct fb_var_screeninfo dummy;
],[],[AC_MSG_ERROR([the Frame Buffer library is missing])])
AC_MSG_RESULT([yes])
fi
if test $ac_lib_fb = yes; then
ac_lib_video="$ac_lib_video fb"
ac_lib_direct_flag=yes
ac_lib_video_flag=yes
fi
AC_SUBST([CONF_LIB_FB],[$ac_lib_fb])
dnl Checks for Raspberry Pi VideoCore
AC_ARG_WITH(
[vc-prefix],
AC_HELP_STRING([--with-vc-prefix=DIR],[Prefix where the Raspberry Pi VideoCore is installed (optional)]),
[ac_lib_vc_prefix="$withval"],
[ac_lib_vc_prefix="/opt/vc"]
)
AC_ARG_ENABLE(
[vc],
AC_HELP_STRING([--enable-vc],[enable the use of the Raspberry Pi VideoCore library. (default auto)]),
[ac_lib_vc=$enableval],
[ac_lib_vc=auto]
)
if test $ac_lib_vc = auto; then
if test ! -d $ac_lib_vc_prefix; then
ac_lib_vc=no
else
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
VCCFLAGS="-I$ac_lib_vc_prefix/include"
VCLIBS="-L$ac_lib_vc_prefix/lib -lbcm_host -lvcos -lvchiq_arm"
CFLAGS="$VCCFLAGS $CFLAGS"
LIBS="$VCLIBS $LIBS"
AC_MSG_CHECKING([for VideoCore])
AC_TRY_LINK([
#include "interface/vcos/vcos.h"
], [
vcos_init();
],[ac_lib_vc=yes],[ac_lib_vc=no])
AC_MSG_RESULT([$ac_lib_vc])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
elif test $ac_lib_vc = yes; then
if test ! -d $ac_lib_vc_prefix; then
AC_MSG_ERROR([the ${$ac_lib_vc_prefix} dir is missing])
else
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
VCCFLAGS="-I$ac_lib_vc_prefix/include"
VCLIBS="-L$ac_lib_vc_prefix/lib -lbcm_host -lvcos -lvchiq_arm"
CFLAGS="$VCCFLAGS $CFLAGS"
LIBS="$VCLIBS $LIBS"
AC_MSG_CHECKING([for VideoCore])
AC_TRY_LINK([
#include "interface/vcos/vcos.h"
], [
vcos_init();
],[],[AC_MSG_ERROR([the Raspberry Pi VideoCore library is missing])])
AC_MSG_RESULT([yes])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
AC_SUBST([VCCFLAGS])
AC_SUBST([VCLIBS])
AC_SUBST([CONF_LIB_VC],[$ac_lib_vc])
if test $ac_lib_vc = yes; then
ac_lib_other="$ac_lib_other VideoCore"
fi
dnl Checks for alsa
AC_ARG_ENABLE(
[alsa],
AC_HELP_STRING([--enable-alsa],[enable the use of the ALSA library. (default auto)]),
[ac_lib_alsa=$enableval],
[ac_lib_alsa=auto]
)
if test $ac_lib_alsa = auto; then
AC_CHECK_LIB(
[asound],
[snd_pcm_open],
[ac_lib_alsa=yes],
[ac_lib_alsa=no]
)
if test $ac_lib_alsa = yes; then
AC_MSG_CHECKING([for ALSA])
AC_TRY_COMPILE([
#include <alsa/asoundlib.h>
], [
#if SND_LIB_VERSION < ((0<<16)|(9<<8)|0)
choke me
#endif
],[ac_lib_alsa=yes],[ac_lib_alsa=no])
AC_MSG_RESULT([$ac_lib_alsa])
fi
elif test $ac_lib_alsa = yes; then
AC_CHECK_LIB(
[asound],
[snd_pcm_open],
[],
[AC_MSG_ERROR([the ALSA library is missing])]
)
AC_MSG_CHECKING([for ALSA version])
AC_TRY_COMPILE([
#include <alsa/asoundlib.h>
], [
#if SND_LIB_VERSION < ((0<<16)|(9<<8)|0)
choke me
#endif
],[],[AC_MSG_ERROR([the ALSA library is too old])])
AC_MSG_RESULT([yes])
fi
if test $ac_lib_alsa = yes; then
ac_lib_sound="$ac_lib_sound alsa"
ac_lib_sound_flag=yes
fi
AC_SUBST([CONF_LIB_ALSA],[$ac_lib_alsa])
dnl Checks for oss
AC_ARG_ENABLE(
[oss],
AC_HELP_STRING([--enable-oss],[enable the use of the OSS library. (default auto)]),
[ac_lib_oss=$enableval],
[ac_lib_oss=auto]
)
if test $ac_lib_oss = auto; then
AC_MSG_CHECKING([for OSS])
AC_TRY_COMPILE([
#include <sys/soundcard.h>
], [
int dummy = SNDCTL_DSP_SETFMT;
],[ac_lib_oss=yes],[ac_lib_oss=no])
AC_MSG_RESULT([$ac_lib_oss])
elif test $ac_lib_oss = yes; then
AC_MSG_CHECKING([for OSS])
AC_TRY_COMPILE([
#include <sys/soundcard.h>
], [
int dummy = SNDCTL_DSP_SETFMT;
],[],[AC_MSG_ERROR([the OSS library is missing])])
AC_MSG_RESULT([yes])
fi
if test $ac_lib_oss = yes; then
ac_lib_sound="$ac_lib_sound oss"
ac_lib_sound_flag=yes
fi
AC_SUBST([CONF_LIB_OSS],[$ac_lib_oss])
dnl Checks for pthread
AC_ARG_ENABLE(
[pthread],
AC_HELP_STRING([--enable-pthread],[enable the use of the pthread library (default auto)]),
[ac_lib_pthread=$enableval],
[ac_lib_pthread=auto]
)
if test $ac_lib_pthread = auto; then
AC_CHECK_LIB(
[pthread],
[pthread_create],
[ac_lib_pthread=yes],
[ac_lib_pthread=no],
[]
)
elif test $ac_lib_pthread = yes; then
AC_CHECK_LIB(
[pthread],
[pthread_create],
[],
[AC_MSG_ERROR([the pthread library is missing])],
[]
)
fi
if test $ac_lib_pthread = yes; then
ac_lib_other="$ac_lib_other pthread"
fi
AC_SUBST([CONF_LIB_PTHREAD],[$ac_lib_pthread])
dnl Checks for slang
AC_ARG_ENABLE(
[slang],
AC_HELP_STRING([--enable-slang],[enable the use of the sLang library (default auto)]),
[ac_lib_slang=$enableval],
[ac_lib_slang=auto]
)
if test $ac_lib_slang = auto; then
AC_CHECK_LIB(
[slang],
[SLang_init_tty],
[ac_lib_slang=yes],
[ac_lib_slang=no],
[]
)
elif test $ac_lib_slang = yes; then
AC_CHECK_LIB(
[slang],
[SLang_init_tty],
[],
[AC_MSG_ERROR([the sLang library is missing])],
[]
)
fi
if test $ac_lib_slang = yes; then
AC_CHECK_HEADERS([slang.h slang/slang.h], [break])
ac_lib_video="$ac_lib_video slang"
ac_lib_text_flag=yes
fi
AC_SUBST([CONF_LIB_SLANG],[$ac_lib_slang])
dnl Checks for ncurses
AC_ARG_ENABLE(
[ncurses],
AC_HELP_STRING([--enable-ncurses],[enable the use of the ncurses library (default auto)]),
[ac_lib_ncurses=$enableval],
[ac_lib_ncurses=auto]
)
if test $ac_lib_ncurses = auto; then
AC_CHECK_LIB(
[ncurses],
[endwin],
[ac_lib_ncurses=yes],
[ac_lib_ncurses=no],
[]
)
elif test $ac_lib_ncurses = yes; then
AC_CHECK_LIB(
[ncurses],
[endwin],
[],
[AC_MSG_ERROR([the sLang library is missing])],
[]
)
fi
if test $ac_lib_ncurses = yes; then
ac_lib_video="$ac_lib_video ncurses"
ac_lib_text_flag=yes
fi
AC_SUBST([CONF_LIB_NCURSES],[$ac_lib_ncurses])
dnl Checks for freetype
AC_ARG_ENABLE(
[freetype],
AC_HELP_STRING([--enable-freetype],[enable the use of the freetype2 library. (default auto)]),
[ac_lib_freetype=$enableval],
[ac_lib_freetype=auto]
)
if test $ac_lib_freetype = auto; then
PKG_CHECK_MODULES([FREETYPE], [freetype2], [ac_lib_freetype=yes], [ac_lib_freetype=no])
if test $ac_lib_freetype = yes; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$FREETYPE_CFLAGS $CFLAGS"
LIBS="$FREETYPE_LIBS $LIBS"
AC_MSG_CHECKING([for linking freetype2])
AC_TRY_LINK([
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
], [
FT_Library library;
int dummy = FT_RENDER_MODE_NORMAL;
FT_Init_FreeType(&library);
FT_Done_FreeType(library);
],[ac_lib_freetype=yes],[ac_lib_freetype=no])
AC_MSG_RESULT([$ac_lib_freetype])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
elif test $ac_lib_freetype = yes; then
PKG_CHECK_MODULES([FREETYPE], [freetype2], [], AC_MSG_ERROR([the freetype2 library is missing]))
fi
if test $ac_lib_freetype = yes; then
ac_lib_other="$ac_lib_other freetype2"
fi
AC_SUBST([FREETYPECFLAGS],[$FREETYPE_CFLAGS])
AC_SUBST([FREETYPELIBS],[$FREETYPE_LIBS])
AC_SUBST([CONF_LIB_FREETYPE],[$ac_lib_freetype])
dnl Checks for SDL v1 and v2
AC_ARG_ENABLE(
[sdl2],
AC_HELP_STRING([--enable-sdl2],[enable the use of the SDL2 library. (default auto)]),
[ac_lib_sdl2=$enableval],
[ac_lib_sdl2=auto]
)
if test $ac_lib_sdl2 = auto; then
if test $ac_enable_32 = yes ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
SDL_CFLAGS="-I/usr/include/SDL2 -I/usr/include -D_REENTRANT"
SDL_LIBS="-pthread -lSDL2"
CFLAGS="$SDL_CFLAGS $CFLAGS"
LIBS="$SDL_LIBS $LIBS"
AC_MSG_CHECKING([for SDL2])
AC_TRY_LINK([
#include "SDL.h"
#undef main
], [
SDL_Init(SDL_INIT_EVERYTHING);
],[ac_lib_sdl2=yes],[ac_lib_sdl2=no])
AC_MSG_RESULT([$ac_lib_sdl2])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
else
PKG_CHECK_MODULES([SDL], [sdl2], [ac_lib_sdl2=yes], [ac_lib_sdl2=no])
if test $ac_lib_sdl2 = yes; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$SDL_CFLAGS $CFLAGS"
LIBS="$SDL_LIBS $LIBS"
AC_MSG_CHECKING([for linking sdl2])
AC_TRY_LINK([
#include "SDL.h"
#undef main
], [
SDL_Init(SDL_INIT_EVERYTHING);
],[ac_lib_sdl2=yes],[ac_lib_sdl2=no])
AC_MSG_RESULT([$ac_lib_sdl2])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
elif test $ac_lib_sdl2 = yes; then
PKG_CHECK_MODULES([SDL], [sdl2], [ac_lib_sdl2=yes], AC_MSG_ERROR([the SDL2 library is missing]))
fi
AC_ARG_ENABLE(
[sdl],
AC_HELP_STRING([--enable-sdl],[enable the use of the SDL library. (default auto)]),
[ac_lib_sdl=$enableval],
[ac_lib_sdl=auto]
)
if test $ac_lib_sdl = auto; then
if test $ac_lib_sdl2 = yes; then
ac_lib_sdl=no
else
if test $ac_enable_32 = yes ; then
dnl Force build for 32 bit x86
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
SDL_CFLAGS="-I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT"
SDL_LIBS="-lSDL -lpthread"
CFLAGS="$SDL_CFLAGS $CFLAGS"
LIBS="$SDL_LIBS $LIBS"
AC_MSG_CHECKING([for SDL])
AC_TRY_LINK([
#include "SDL.h"
#undef main
], [
SDL_Init(SDL_INIT_EVERYTHING);
],[ac_lib_sdl=yes],[ac_lib_sdl=no])
AC_MSG_RESULT([$ac_lib_sdl])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
else
PKG_CHECK_MODULES([SDL], [sdl], [ac_lib_sdl=yes], [ac_lib_sdl=no])
if test $ac_lib_sdl = yes; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$SDL_CFLAGS $CFLAGS"
LIBS="$SDL_LIBS $LIBS"
AC_MSG_CHECKING([for SDL])
AC_TRY_LINK([
#include "SDL.h"
#undef main
], [
SDL_Init(SDL_INIT_EVERYTHING);
],[ac_lib_sdl=yes],[ac_lib_sdl=no])
AC_MSG_RESULT([$ac_lib_sdl])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
fi
elif test $ac_lib_sdl = yes; then
if test $ac_lib_sdl2 = yes; then
AC_MSG_ERROR([You cannot enable both SDL and SDL2])
fi
PKG_CHECK_MODULES([SDL], [sdl], [ac_lib_sdl=yes], AC_MSG_ERROR([the SDL library is missing]))
fi
ac_lib_sdl_flag=no
if test $ac_lib_sdl = yes -o $ac_lib_sdl2 = yes; then
ac_lib_video="$ac_lib_video sdl"
ac_lib_sound="$ac_lib_sound sdl"
ac_lib_keyboard="$ac_lib_keyboard sdl"
ac_lib_joystick="$ac_lib_joystick sdl"
ac_lib_mouse="$ac_lib_mouse sdl"
ac_lib_sdl_flag=yes
ac_lib_video_flag=yes
ac_lib_sound_flag=yes
ac_lib_keyboard_flag=yes
fi
AC_SUBST([CONF_LIB_SDL],[$ac_lib_sdl_flag])
AC_SUBST([SDLCFLAGS],[$SDL_CFLAGS])
AC_SUBST([SDLLIBS],[$SDL_LIBS])
dnl Checks for svgawin
AC_ARG_ENABLE(
[svgawin],
AC_HELP_STRING([--enable-svgawin],[enable the use of the SVGAWIN library. (default no)]),
[ac_lib_svgawin=$enableval],
[ac_lib_svgawin=no]
)
if test $ac_lib_svgawin = auto; then
if test $ac_system = windows; then
if test $ac_lib_sdl = yes; then
ac_lib_svgawin=yes
else
ac_lib_svgawin=no
fi
else
ac_lib_svgawin=no
fi
fi
if test $ac_lib_svgawin = yes; then
if test ! $ac_system = windows; then
AC_MSG_ERROR([the SVGAWIN library is not supported in this host])
fi
if test $ac_lib_sdl = no; then
AC_MSG_ERROR([the SVGAWIN library requires the SDL library])
fi
fi
if test $ac_lib_svgawin = yes; then
ac_lib_video="$ac_lib_video svgawin"
ac_lib_direct_flag=yes
ac_lib_video_flag=yes
fi
AC_SUBST([CONF_LIB_SVGAWIN],[$ac_lib_svgawin])
dnl Checks for mrawinput
AC_ARG_ENABLE(
[mrawinput],
AC_HELP_STRING([--enable-mrawinput],[enable the use of the Windows Raw input mouse interface. (default auto)]),
[ac_lib_mrawinput=$enableval],
[ac_lib_mrawinput=auto]
)
if test $ac_lib_mrawinput = auto; then
if test $ac_system = windows; then
ac_lib_mrawinput=yes
else
ac_lib_mrawinput=no
fi
fi
if test $ac_lib_mrawinput = yes; then
if test ! $ac_system = windows; then
AC_MSG_ERROR([the rawinput library is not supported in this host])
fi
fi
if test $ac_lib_mrawinput = yes; then
ac_lib_mouse="$ac_lib_mouse rawinput"
fi
AC_SUBST([CONF_LIB_MRAWINPUT],[$ac_lib_mrawinput])
dnl Checks for mcpn
AC_ARG_ENABLE(
[mcpn],
AC_HELP_STRING([--enable-mcpn],[enable the use of the Windows CPN mouse interface. (default auto)]),
[ac_lib_mcpn=$enableval],
[ac_lib_mcpn=auto]
)
if test $ac_lib_mcpn = auto; then
if test $ac_system = windows; then
ac_lib_mcpn=yes
else
ac_lib_mcpn=no
fi
fi
if test $ac_lib_mcpn = yes; then
if test ! $ac_system = windows; then
AC_MSG_ERROR([the cpn library is not supported in this host])
fi
fi
if test $ac_lib_mcpn = yes; then
ac_lib_mouse="$ac_lib_mouse cpn"
fi
AC_SUBST([CONF_LIB_MCPN],[$ac_lib_mcpn])
dnl Checks for kraw
AC_ARG_ENABLE(
[kraw],
AC_HELP_STRING([--enable-kraw],[enable the use of the raw keyboard interface. (default auto)]),
[ac_lib_kraw=$enableval],
[ac_lib_kraw=auto]
)
if test $ac_lib_kraw = auto; then
AC_MSG_CHECKING([for raw keyboard interface])
AC_TRY_COMPILE([
#include <sys/kd.h>
#include <sys/vt.h>
#include <sys/ioctl.h>
#include <termios.h>
], [
int dummy0 = K_MEDIUMRAW;
int dummy1 = VT_ACTIVATE;
struct termios dummy2;
],[ac_lib_kraw=yes],[ac_lib_kraw=no])
AC_MSG_RESULT([$ac_lib_kraw])
elif test $ac_lib_kraw = yes; then
AC_MSG_CHECKING([for raw keyboard interface])
AC_TRY_COMPILE([
#include <sys/kd.h>
#include <sys/vt.h>
#include <sys/ioctl.h>
#include <termios.h>
], [
int dummy0 = K_MEDIUMRAW;
int dummy1 = VT_ACTIVATE;
struct termios dummy2;
],[],[AC_MSG_ERROR([the KRAW keyboard interface is missing])])
AC_MSG_RESULT([yes])
fi
if test $ac_lib_kraw = yes; then
ac_lib_keyboard="$ac_lib_keyboard raw"
ac_lib_keyboard_flag=yes
fi
AC_SUBST([CONF_LIB_KRAW],[$ac_lib_kraw])
dnl Checks for jraw
AC_ARG_ENABLE(
[jraw],
AC_HELP_STRING([--enable-jraw],[enable the use of the raw joystick interface. (default auto)]),
[ac_lib_jraw=$enableval],
[ac_lib_jraw=auto]
)
if test $ac_lib_jraw = auto; then
AC_MSG_CHECKING([for raw joystick interface])
AC_TRY_COMPILE([
#include <linux/joystick.h>
], [
#ifndef JS_VERSION
choke me
#endif
],[ac_lib_jraw=yes],[ac_lib_jraw=no])
AC_MSG_RESULT([$ac_lib_jraw])
elif test $ac_lib_jraw = yes; then
AC_MSG_CHECKING([for raw joystick interface])
AC_TRY_COMPILE([
#include <linux/joystick.h>
], [
#ifndef JS_VERSION
choke me
#endif
],[],[AC_MSG_ERROR([the JRAW joystick interface is missing])])
AC_MSG_RESULT([yes])
fi
if test $ac_lib_jraw = yes; then
ac_lib_joystick="$ac_lib_joystick raw"
fi
AC_SUBST([CONF_LIB_JRAW],[$ac_lib_jraw])
dnl Checks for mraw
AC_ARG_ENABLE(
[mraw],
AC_HELP_STRING([--enable-mraw],[enable the use of the raw mouse interface. (default auto)]),
[ac_lib_mraw=$enableval],
[ac_lib_mraw=auto]
)
if test $ac_lib_mraw = auto; then
AC_MSG_CHECKING([for raw mouse interface])
AC_TRY_COMPILE([
#include <termios.h>
], [
tcsetattr(0, TCSAFLUSH, 0);
],[ac_lib_mraw=yes],[ac_lib_mraw=no])
AC_MSG_RESULT([$ac_lib_mraw])
elif test $ac_lib_mraw = yes; then
AC_MSG_CHECKING([for raw mouse interface])
AC_TRY_COMPILE([
#include <termios.h>
], [
tcsetattr(0, TCSAFLUSH, 0);
],[],[AC_MSG_ERROR([the MRAW mouse interface is missing])])
AC_MSG_RESULT([yes])
fi
if test $ac_lib_mraw = yes; then
ac_lib_mouse="$ac_lib_mouse raw"
fi
AC_SUBST([CONF_LIB_MRAW],[$ac_lib_mraw])
dnl Checks for mevent
AC_ARG_ENABLE(
[mevent],
AC_HELP_STRING([--enable-mevent],[enable the use of the event mouse interface. (default auto)]),
[ac_lib_mevent=$enableval],
[ac_lib_mevent=auto]
)
if test $ac_lib_mevent = auto; then
AC_MSG_CHECKING([for event mouse interface])
AC_TRY_COMPILE([
#include <linux/input.h>
], [
int dummy = EVIOCGVERSION;
],[ac_lib_mevent=yes],[ac_lib_mevent=no])
AC_MSG_RESULT([$ac_lib_mevent])
elif test $ac_lib_mevent = yes; then
AC_MSG_CHECKING([for event mouse interface])
AC_TRY_COMPILE([
#include <linux/input.h>
], [
int dummy = EVIOCGVERSION;
],[],[AC_MSG_ERROR([the event mouse interface is missing])])
AC_MSG_RESULT([yes])
fi
if test $ac_lib_mevent = yes; then
ac_lib_mouse="$ac_lib_mouse event"
fi
AC_SUBST([CONF_LIB_MEVENT],[$ac_lib_mevent])
dnl Checks for kevent
AC_ARG_ENABLE(
[kevent],
AC_HELP_STRING([--enable-kevent],[enable the use of the event keyboard interface. (default auto)]),
[ac_lib_kevent=$enableval],
[ac_lib_kevent=auto]
)
if test $ac_lib_kevent = auto; then
AC_MSG_CHECKING([for event keyboard interface])
AC_TRY_COMPILE([
#include <linux/input.h>
], [
int dummy = EVIOCGVERSION;
],[ac_lib_kevent=yes],[ac_lib_kevent=no])
AC_MSG_RESULT([$ac_lib_kevent])
elif test $ac_lib_kevent = yes; then
AC_MSG_CHECKING([for event keyboard interface])
AC_TRY_COMPILE([
#include <linux/input.h>
], [
int dummy = EVIOCGVERSION;
],[],[AC_MSG_ERROR([the event keyboard interface is missing])])
AC_MSG_RESULT([yes])
fi
if test $ac_lib_kevent = yes; then
ac_lib_keyboard="$ac_lib_keyboard event"
ac_lib_keyboard_flag=yes
fi
AC_SUBST([CONF_LIB_KEVENT],[$ac_lib_kevent])
dnl Checks for jevent
AC_ARG_ENABLE(
[jevent],
AC_HELP_STRING([--enable-jevent],[enable the use of the event joystick interface. (default auto)]),
[ac_lib_jevent=$enableval],
[ac_lib_jevent=auto]
)
if test $ac_lib_jevent = auto; then
AC_MSG_CHECKING([for event joystick interface])
AC_TRY_COMPILE([
#include <linux/input.h>
], [
int dummy = EVIOCGVERSION;
],[ac_lib_jevent=yes],[ac_lib_jevent=no])
AC_MSG_RESULT([$ac_lib_jevent])
elif test $ac_lib_jevent = yes; then
AC_MSG_CHECKING([for event joystick interface])
AC_TRY_COMPILE([
#include <linux/input.h>
], [
int dummy = EVIOCGVERSION;
],[],[AC_MSG_ERROR([the event joystick interface is missing])])
AC_MSG_RESULT([yes])
fi
if test $ac_lib_jevent = yes; then
ac_lib_joystick="$ac_lib_joystick event"
fi
AC_SUBST([CONF_LIB_JEVENT],[$ac_lib_jevent])
dnl Final
AC_SUBST([CONF_LIB_DIRECT],[$ac_lib_direct_flag])
AC_SUBST([mandir],['${prefix}/man'])
AC_SUBST([docdir],['${prefix}/doc'])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
dnl Print user information
echo ""
echo "== Host =="
echo "Environment :" $host
if test $ac_is_bigendian = yes; then
echo "Endianess : big"
else
echo "Endianess : little"
fi
echo "Bits :" $((8 * $ac_cv_sizeof_voidp))
if test $ac_enable_asm = yes; then
echo "Assembler for x86 : yes"
else
echo "Assembler for x86 : no"
fi
if test $ac_enable_asm_mips3 = yes; then
echo "Assembler MIPS3 emulator for x86 : yes"
else
echo "Assembler MIPS3 emulator for x86 : no"
fi
echo ""
echo "== Drivers/Libraries =="
if test $ac_lib_direct_flag = no ; then
echo "Video :" $ac_lib_video
echo "No video driver is able to program your video board."
echo "You will be able to use only standard video modes."
else
echo "Video :" $ac_lib_video
fi
echo "Sound :" $ac_lib_sound
echo "Keyboard :" $ac_lib_keyboard
echo "Joystick :" $ac_lib_joystick
echo "Mouse :" $ac_lib_mouse
echo "Misc :" $ac_lib_other
if test $ac_enable_bare = no ; then
if test $ac_enable_debug = no ; then
if test $ac_enable_perf = no ; then
if test $ac_lib_video_flag = no; then
AC_MSG_ERROR([no video library found. If you have the SDL library installed somewhere try using the --with-sdl-prefix or --with-sdl2-prefix options.])
else
if test $ac_lib_sdl_flag = no; then
AC_MSG_WARN([the SDL library was not found. You will not able to use this program in a window manager environment! If you have the SDL library installed somewhere try using the --with-sdl-prefix or --with-sdl2-prefix options.])
fi
fi
if test $ac_lib_sound_flag = no; then
AC_MSG_ERROR([no sound library found])
fi
if test $ac_lib_text_flag = no; then
AC_MSG_WARN([no text video mode library found. The advv/advcfg utilities will not work!])
fi
fi
fi
fi
echo ""
echo "== Compiler =="
echo "CC :" $CC
echo "CXX :" $CXX
echo "CFLAGS :" $CFLAGS $CFLAGS_OPTOPT
echo "LDFLAGS :" $LDFLAGS
if test $ac_lib_sdl = yes -o $ac_lib_sdl2 = yes; then
echo "SDLCFLAGS :" $SDLCFLAGS
echo "SDLLIBS :" $SDLLIBS
fi
if test ! $ac_with_emu = none ; then
echo ""
echo "== Configuration =="
echo "Emulator :" $ac_with_emu
echo "Debugger :" $ac_enable_debugger
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化