Binary interface: Posix building
This commit is contained in:
parent
97d1613421
commit
1f37dcc0a0
|
@ -0,0 +1,219 @@
|
|||
AM_CFLAGS =
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/../../../src/ -I$(top_srcdir)/../../../src/libretro-common/include
|
||||
|
||||
AM_CPPFLAGS += $(SDL_CFLAGS) $(GLIB_CFLAGS) $(GTHREAD_CFLAGS) $(LIBAGG_CFLAGS) $(LIBSOUNDTOUCH_CFLAGS)
|
||||
|
||||
SUBDIRS = $(PO_DIR)
|
||||
|
||||
lib_LTLIBRARIES = libdesmume.la
|
||||
libdesmume_la_LDFLAGS = -module -avoid-version -shared -rdynamic $(INTLLIBS)
|
||||
|
||||
libdesmume_la_LIBADD = \
|
||||
$(SDL_LIBS) $(GTHREAD_LIBS) $(LIBAGG_LIBS) \
|
||||
$(LIBSOUNDTOUCH_LIBS) $(GLIB_LIBS)
|
||||
|
||||
libdesmume_la_SOURCES = interface.cpp draw_sdl_window.cpp interface.h
|
||||
|
||||
libdesmume_la_SOURCES += \
|
||||
../../armcpu.cpp ../../armcpu.h \
|
||||
../../arm_instructions.cpp \
|
||||
../../agg2d.h ../../agg2d.inl \
|
||||
../../bios.cpp ../../bios.h ../../bits.h ../../cp15.cpp ../../cp15.h \
|
||||
../../commandline.h ../../commandline.cpp \
|
||||
../../common.cpp ../../common.h \
|
||||
../../debug.cpp ../../debug.h \
|
||||
../../driver.cpp ../../driver.h \
|
||||
../../Database.cpp ../../Database.h \
|
||||
../../emufile.h ../../emufile.cpp ../../encrypt.h ../../encrypt.cpp ../../FIFO.cpp ../../FIFO.h \
|
||||
../../firmware.cpp ../../firmware.h ../../GPU.cpp ../../GPU.h \
|
||||
../../GPU_osd.h \
|
||||
../../instructions.h \
|
||||
../../mem.h ../../mc.cpp ../../mc.h \
|
||||
../../path.cpp ../../path.h \
|
||||
../../readwrite.cpp ../../readwrite.h \
|
||||
../../wifi.cpp ../../wifi.h \
|
||||
../../mic.h \
|
||||
../../MMU.cpp ../../MMU.h ../../MMU_timing.h ../../NDSSystem.cpp ../../NDSSystem.h ../../registers.h \
|
||||
../../OGLRender.h ../../OGLRender_3_2.h \
|
||||
../../ROMReader.cpp ../../ROMReader.h \
|
||||
../../render3D.cpp ../../render3D.h \
|
||||
../../rtc.cpp ../../rtc.h \
|
||||
../../saves.cpp ../../saves.h \
|
||||
../../slot1.cpp ../../slot1.h \
|
||||
../../slot2.cpp ../../slot2.h \
|
||||
../../SPU.cpp ../../SPU.h \
|
||||
../../matrix.cpp ../../matrix.h \
|
||||
../../gfx3d.cpp ../../gfx3d.h \
|
||||
../../thumb_instructions.cpp ../../types.h \
|
||||
../../movie.cpp ../../movie.h \
|
||||
../../PACKED.h ../../PACKED_END.h \
|
||||
../../frontend/modules/Disassembler.cpp ../../frontend/modules/Disassembler.h \
|
||||
../../utils/advanscene.cpp ../../utils/advanscene.h \
|
||||
../../utils/datetime.cpp ../../utils/datetime.h \
|
||||
../../utils/guid.cpp ../../utils/guid.h \
|
||||
../../utils/emufat.cpp ../../utils/emufat.h utils/emufat_types.h \
|
||||
../../utils/fsnitro.cpp ../../utils/fsnitro.h \
|
||||
../../utils/xstring.cpp ../../utils/xstring.h \
|
||||
../../utils/decrypt/crc.cpp ../../utils/decrypt/crc.h ../../utils/decrypt/decrypt.cpp \
|
||||
../../utils/decrypt/decrypt.h ../../utils/decrypt/header.cpp ../../utils/decrypt/header.h \
|
||||
../../utils/task.cpp ../../utils/task.h \
|
||||
../../utils/vfat.h ../../utils/vfat.cpp \
|
||||
../../utils/dlditool.cpp \
|
||||
../../utils/libfat/bit_ops.h \
|
||||
../../utils/libfat/cache.cpp \
|
||||
../../utils/libfat/cache.h \
|
||||
../../utils/libfat/common.h \
|
||||
../../utils/libfat/directory.cpp \
|
||||
../../utils/libfat/directory.h \
|
||||
../../utils/libfat/disc.cpp \
|
||||
../../utils/libfat/disc.h \
|
||||
../../utils/libfat/disc_io.h \
|
||||
../../utils/libfat/fat.h \
|
||||
../../utils/libfat/fatdir.cpp \
|
||||
../../utils/libfat/fatdir.h \
|
||||
../../utils/libfat/fatfile.cpp \
|
||||
../../utils/libfat/fatfile.h \
|
||||
../../utils/libfat/filetime.cpp \
|
||||
../../utils/libfat/filetime.h \
|
||||
../../utils/libfat/file_allocation_table.cpp \
|
||||
../../utils/libfat/file_allocation_table.h \
|
||||
../../utils/libfat/libfat.cpp \
|
||||
../../utils/libfat/libfat_pc.h \
|
||||
../../utils/libfat/libfat_public_api.cpp \
|
||||
../../utils/libfat/libfat_public_api.h \
|
||||
../../utils/libfat/lock.cpp \
|
||||
../../utils/libfat/lock.h \
|
||||
../../utils/libfat/mem_allocate.h \
|
||||
../../utils/libfat/partition.cpp \
|
||||
../../utils/libfat/partition.h \
|
||||
../../utils/tinyxml/tinystr.cpp \
|
||||
../../utils/tinyxml/tinystr.h \
|
||||
../../utils/tinyxml/tinyxml.cpp \
|
||||
../../utils/tinyxml/tinyxml.h \
|
||||
../../utils/tinyxml/tinyxmlerror.cpp \
|
||||
../../utils/tinyxml/tinyxmlparser.cpp \
|
||||
../../utils/glcorearb.h \
|
||||
../../utils/colorspacehandler/colorspacehandler.cpp ../../utils/colorspacehandler/colorspacehandler.h \
|
||||
../../addons/slot2_auto.cpp ../../addons/slot2_mpcf.cpp ../../addons/slot2_paddle.cpp ../../addons/slot2_gbagame.cpp ../../addons/slot2_none.cpp ../../addons/slot2_rumblepak.cpp ../../addons/slot2_guitarGrip.cpp ../../addons/slot2_expMemory.cpp ../../addons/slot2_piano.cpp ../../addons/slot2_passme.cpp ../../addons/slot1_none.cpp ../../addons/slot1_r4.cpp ../../addons/slot1_retail_nand.cpp ../../addons/slot1_retail_auto.cpp ../../addons/slot1_retail_mcrom.cpp ../../addons/slot1_retail_mcrom_debug.cpp ../../addons/slot1comp_mc.cpp ../../addons/slot1comp_mc.h ../../addons/slot1comp_rom.h ../../addons/slot1comp_rom.cpp ../../addons/slot1comp_protocol.h ../../addons/slot1comp_protocol.cpp \
|
||||
../../cheatSystem.cpp ../../cheatSystem.h \
|
||||
../../texcache.cpp ../../texcache.h ../../rasterize.cpp ../../rasterize.h \
|
||||
../../metaspu/metaspu.cpp ../../metaspu/metaspu.h \
|
||||
../../filter/2xsai.cpp ../../filter/bilinear.cpp ../../filter/deposterize.cpp ../../filter/epx.cpp ../../filter/filter.h \
|
||||
../../filter/hq2x.cpp ../../filter/hq2x.h \
|
||||
../../filter/hq3x.cpp ../../filter/hq3x.dat \
|
||||
../../filter/hq4x.cpp ../../filter/hq4x.dat \
|
||||
../../filter/interp.h ../../filter/lq2x.cpp ../../filter/lq2x.h ../../filter/scanline.cpp \
|
||||
../../filter/videofilter.cpp ../../filter/videofilter.h \
|
||||
../../filter/xbrz.cpp ../../filter/xbrz.h \
|
||||
../../version.cpp ../../version.h \
|
||||
../../libretro-common/compat/compat_getopt.c \
|
||||
../../libretro-common/file/file_path.c \
|
||||
../../libretro-common/compat/compat_strl.c \
|
||||
../../libretro-common/features/features_cpu.c \
|
||||
../../libretro-common/file/retro_dirent.c \
|
||||
../../libretro-common/file/retro_stat.c \
|
||||
../../libretro-common/rthreads/async_job.c \
|
||||
../../libretro-common/rthreads/rsemaphore.c \
|
||||
../../libretro-common/rthreads/rthreads.c \
|
||||
../../libretro-common/encodings/encoding_utf.c
|
||||
|
||||
if HAVE_JIT
|
||||
libdesmume_la_SOURCES += \
|
||||
../../arm_jit.cpp ../../arm_jit.h ../../instruction_attributes.h \
|
||||
../../utils/AsmJit/AsmJit.h \
|
||||
../../utils/AsmJit/Config.h \
|
||||
../../utils/AsmJit/core.h \
|
||||
../../utils/AsmJit/x86.h \
|
||||
../../utils/AsmJit/core/apibegin.h \
|
||||
../../utils/AsmJit/core/apiend.h \
|
||||
../../utils/AsmJit/core/assembler.cpp \
|
||||
../../utils/AsmJit/core/assembler.h \
|
||||
../../utils/AsmJit/core/assert.cpp \
|
||||
../../utils/AsmJit/core/assert.h \
|
||||
../../utils/AsmJit/core/buffer.cpp \
|
||||
../../utils/AsmJit/core/buffer.h \
|
||||
../../utils/AsmJit/core/build.h \
|
||||
../../utils/AsmJit/core/compiler.cpp \
|
||||
../../utils/AsmJit/core/compiler.h \
|
||||
../../utils/AsmJit/core/compilercontext.cpp \
|
||||
../../utils/AsmJit/core/compilercontext.h \
|
||||
../../utils/AsmJit/core/compilerfunc.cpp \
|
||||
../../utils/AsmJit/core/compilerfunc.h \
|
||||
../../utils/AsmJit/core/compileritem.cpp \
|
||||
../../utils/AsmJit/core/compileritem.h \
|
||||
../../utils/AsmJit/core/context.cpp \
|
||||
../../utils/AsmJit/core/context.h \
|
||||
../../utils/AsmJit/core/cpuinfo.cpp \
|
||||
../../utils/AsmJit/core/cpuinfo.h \
|
||||
../../utils/AsmJit/core/defs.cpp \
|
||||
../../utils/AsmJit/core/defs.h \
|
||||
../../utils/AsmJit/core/func.cpp \
|
||||
../../utils/AsmJit/core/func.h \
|
||||
../../utils/AsmJit/core/intutil.h \
|
||||
../../utils/AsmJit/core/lock.h \
|
||||
../../utils/AsmJit/core/logger.cpp \
|
||||
../../utils/AsmJit/core/logger.h \
|
||||
../../utils/AsmJit/core/memorymanager.cpp \
|
||||
../../utils/AsmJit/core/memorymanager.h \
|
||||
../../utils/AsmJit/core/memorymarker.cpp \
|
||||
../../utils/AsmJit/core/memorymarker.h \
|
||||
../../utils/AsmJit/core/operand.cpp \
|
||||
../../utils/AsmJit/core/operand.h \
|
||||
../../utils/AsmJit/core/podvector.h \
|
||||
../../utils/AsmJit/core/stringbuilder.cpp \
|
||||
../../utils/AsmJit/core/stringbuilder.h \
|
||||
../../utils/AsmJit/core/stringutil.cpp \
|
||||
../../utils/AsmJit/core/stringutil.h \
|
||||
../../utils/AsmJit/core/virtualmemory.cpp \
|
||||
../../utils/AsmJit/core/virtualmemory.h \
|
||||
../../utils/AsmJit/core/zonememory.cpp \
|
||||
../../utils/AsmJit/core/zonememory.h \
|
||||
../../utils/AsmJit/x86/x86assembler.cpp \
|
||||
../../utils/AsmJit/x86/x86assembler.h \
|
||||
../../utils/AsmJit/x86/x86compiler.cpp \
|
||||
../../utils/AsmJit/x86/x86compiler.h \
|
||||
../../utils/AsmJit/x86/x86compilercontext.cpp \
|
||||
../../utils/AsmJit/x86/x86compilercontext.h \
|
||||
../../utils/AsmJit/x86/x86compilerfunc.cpp \
|
||||
../../utils/AsmJit/x86/x86compilerfunc.h \
|
||||
../../utils/AsmJit/x86/x86compileritem.cpp \
|
||||
../../utils/AsmJit/x86/x86compileritem.h \
|
||||
../../utils/AsmJit/x86/x86cpuinfo.cpp \
|
||||
../../utils/AsmJit/x86/x86cpuinfo.h \
|
||||
../../utils/AsmJit/x86/x86defs.cpp \
|
||||
../../utils/AsmJit/x86/x86defs.h \
|
||||
../../utils/AsmJit/x86/x86func.cpp \
|
||||
../../utils/AsmJit/x86/x86func.h \
|
||||
../../utils/AsmJit/x86/x86operand.cpp \
|
||||
../../utils/AsmJit/x86/x86operand.h \
|
||||
../../utils/AsmJit/x86/x86util.cpp \
|
||||
../../utils/AsmJit/x86/x86util.h
|
||||
endif
|
||||
|
||||
#libdesmume_la_SOURCES += shared/desmume_config.cpp shared/desmume_config.h
|
||||
|
||||
if HAVE_GL
|
||||
libdesmume_la_SOURCES += ../../OGLRender.cpp ../../OGLRender_3_2.cpp
|
||||
endif
|
||||
|
||||
libdesmume_la_SOURCES += ../posix/shared/sndsdl.cpp ../posix/shared/sndsdl.h
|
||||
libdesmume_la_SOURCES += ../posix/shared/ctrlssdl.cpp ../posix/shared/ctrlssdl.h
|
||||
|
||||
if HAVE_OPENAL
|
||||
libdesmume_la_SOURCES += ../posix/shared/mic_openal.cpp
|
||||
else
|
||||
libdesmume_la_SOURCES += ../../mic.cpp ../../mic.h
|
||||
endif
|
||||
|
||||
if HAVE_LIBSOUNDTOUCH
|
||||
libdesmume_la_SOURCES += ../../metaspu/SndOut.cpp ../../metaspu/SndOut.h ../../metaspu/Timestretcher.cpp
|
||||
endif
|
||||
|
||||
if HAVE_LIBAGG
|
||||
libdesmume_la_SOURCES += ../../frontend/modules/osd/agg/aggdraw.cpp ../../frontend/modules/osd/agg/aggdraw.h ../../frontend/modules/osd/agg/agg_osd.cpp
|
||||
endif
|
||||
if HAVE_GDB_STUB
|
||||
libdesmume_la_SOURCES += ../../gdbstub/gdbstub.cpp
|
||||
libdesmume_la_SOURCES += ../../gdbstub/gdbstub_internal.h
|
||||
libdesmume_la_SOURCES += ../../gdbstub.h
|
||||
endif
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
autoreconf --install --force --verbose
|
|
@ -0,0 +1,247 @@
|
|||
dnl --- Package name is first argument to AC_INIT
|
||||
dnl --- Release version is second argument to AC_INIT
|
||||
|
||||
AC_INIT(desmume, [git])
|
||||
LT_INIT
|
||||
|
||||
dnl -- find host architecture for some os specific libraries
|
||||
AC_CANONICAL_HOST
|
||||
case $host in
|
||||
*linux*) desmume_arch=linux;;
|
||||
*mingw*) desmume_arch=windows;;
|
||||
*darwin*) desmume_arch=linux;;
|
||||
*bsd*) desmume_arch=linux;;
|
||||
esac
|
||||
AC_SUBST(desmume_arch)
|
||||
|
||||
AC_CONFIG_AUX_DIR([.])
|
||||
|
||||
AM_INIT_AUTOMAKE([subdir-objects tar-pax foreign])
|
||||
|
||||
dnl -- make sure we have a c++ compiler
|
||||
AC_PROG_CXX
|
||||
|
||||
dnl -- check for endianess
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
COMMIT="unknown"
|
||||
GIT=`which git 2>/dev/null`
|
||||
if ( test -d ../../../../.git; ) && test "x${GIT}" != "x" -a -x "${GIT}" ; then
|
||||
COMMIT=`$GIT rev-parse HEAD`
|
||||
echo "$COMMIT"
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([GIT_COMMIT], ["$COMMIT"], [git commit hash])
|
||||
|
||||
dnl - Check for zlib
|
||||
AC_CHECK_LIB(z, gzopen, [], [AC_MSG_ERROR([zlib was not found, we can't go further. Please install it or specify the location where it's installed.])])
|
||||
|
||||
dnl - Check for libpcap
|
||||
AC_CHECK_LIB(pcap, main, [LIBS="$LIBS -lpcap"], [AC_MSG_ERROR([libpcap was not found, we can't go further. Please install it or specify the location where it's installed.])])
|
||||
|
||||
dnl - Check for zziplib
|
||||
AC_CHECK_LIB(zzip, zzip_open, [
|
||||
LIBS="-lzzip $LIBS"
|
||||
AC_DEFINE([HAVE_LIBZZIP])
|
||||
AC_MSG_CHECKING([[whether zzip use void * as second parameter]])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <zzip/lib.h>]], [[
|
||||
void * v;
|
||||
zzip_read(NULL, v, 0);]])],
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_DEFINE([ZZIP_OLD_READ])
|
||||
AC_MSG_RESULT(no))
|
||||
])
|
||||
|
||||
dnl - Check for SDL
|
||||
AC_PATH_PROGS(SDLCONFIG, [sdl-config sdl11-config])
|
||||
if test ! "x$SDLCONFIG" = "x" ; then
|
||||
SDL_CFLAGS=`$SDLCONFIG --cflags`
|
||||
SDL_LIBS=`$SDLCONFIG --libs`
|
||||
AC_SUBST(SDL_CFLAGS)
|
||||
AC_SUBST(SDL_LIBS)
|
||||
else
|
||||
AC_MSG_ERROR([sdl is required to build desmume])
|
||||
fi
|
||||
|
||||
dnl - Check for the OpenGL includes
|
||||
AC_CHECK_HEADERS([GL/gl.h],
|
||||
[AC_CHECK_HEADERS([GL/glu.h], [have_gl_h=yes LIBS="$LIBS -lGL -lGLU"], [have_gl_h=no])],
|
||||
[have_gl_h=no])
|
||||
if test "have_gl_h" = "no" ; then
|
||||
AC_MSG_WARN([Building without GL support because of missing headers.])
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_GL], [test "${have_gl_h}" = "yes"])
|
||||
|
||||
dnl - make the usage of libagg for HUD rendering configurable
|
||||
AC_ARG_ENABLE([hud],
|
||||
[AC_HELP_STRING([--enable-hud], [Enable HUD rendering, requires libagg])],
|
||||
[libagg=yes])
|
||||
|
||||
HAVE_OPENAL=no
|
||||
dnl - openal support
|
||||
AC_ARG_ENABLE(openal,
|
||||
[AC_HELP_STRING(--enable-openal, enable experimental OpenAL microphone input)],
|
||||
[openal=yes])
|
||||
|
||||
if test "x$openal" = "xyes" ; then
|
||||
AC_CHECK_LIB([openal], [main],[
|
||||
HAVE_OPENAL=yes
|
||||
LIBS="$LIBS -lopenal"
|
||||
])
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_OPENAL], [test "${HAVE_OPENAL}" = "yes"])
|
||||
|
||||
dnl - Looking for glib
|
||||
FOUND_GLIB=no
|
||||
GLIB_VER=2.8
|
||||
|
||||
PKG_CHECK_MODULES(GLIB,
|
||||
glib-2.0 >= $GLIB_VER,
|
||||
FOUND_GLIB=yes,
|
||||
FOUND_GLIB=no)
|
||||
|
||||
dnl -- force lua disabled
|
||||
HAVE_LUA=no
|
||||
|
||||
PKG_CHECK_MODULES(LIBAGG, libagg >= 2.4.0, FOUND_LIBAGG=yes, FOUND_LIBAGG=no)
|
||||
AM_CONDITIONAL([HAVE_LIBAGG], [test "x$libagg" = "xyes" -a "${FOUND_LIBAGG}" = "yes"])
|
||||
if test "x$libagg" = "xyes" ; then
|
||||
if test "x$FOUND_LIBAGG" = "xyes" ; then
|
||||
AC_SUBST(LIBAGG_CFLAGS)
|
||||
AC_SUBST(LIBAGG_LIBS)
|
||||
AC_DEFINE([HAVE_LIBAGG])
|
||||
else
|
||||
AC_MSG_ERROR([HUD rendering enabled, but libagg not found])
|
||||
fi
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES(LIBSOUNDTOUCH, soundtouch >= 1.5.0, HAVE_LIBSOUNDTOUCH=yes, HAVE_LIBSOUNDTOUCH=no)
|
||||
AC_SUBST(LIBSOUNDTOUCH_CFLAGS)
|
||||
AC_SUBST(LIBSOUNDTOUCH_LIBS)
|
||||
AM_CONDITIONAL([HAVE_LIBSOUNDTOUCH], [test "${HAVE_LIBSOUNDTOUCH}" = "yes"])
|
||||
if test "x$HAVE_LIBSOUNDTOUCH" = "xyes"; then
|
||||
AC_DEFINE([HAVE_LIBSOUNDTOUCH])
|
||||
else
|
||||
AC_MSG_WARN([SoundTouch library not found, pcsx2 resampler will be disabled])
|
||||
fi
|
||||
|
||||
if test "x$HAVE_OPENAL" = "xno"; then
|
||||
AC_DEFINE([FAKE_MIC])
|
||||
fi
|
||||
|
||||
dnl - jit support
|
||||
case $host_cpu in
|
||||
x86|x86_64|i386|i486|i586|i686)
|
||||
HAVE_JIT=yes
|
||||
AC_DEFINE(HAVE_JIT)
|
||||
;;
|
||||
esac
|
||||
AM_CONDITIONAL([HAVE_JIT], [test "x$HAVE_JIT" = "xyes"])
|
||||
|
||||
dnl - wifi support
|
||||
AC_ARG_ENABLE(wifi,
|
||||
[AC_HELP_STRING(--enable-wifi, enable wifi support)],
|
||||
[wifisupport=yes])
|
||||
|
||||
if test "x$wifisupport" = "xyes" ; then
|
||||
AC_DEFINE(EXPERIMENTAL_WIFI_COMM)
|
||||
fi
|
||||
|
||||
dnl Set compiler library flags per host architecture
|
||||
case $host in
|
||||
*mingw*)
|
||||
LIBS="$LIBS -ldxguid -ldxerr8 -ldsound -lopengl32 -lws2_32 -mwindows"
|
||||
;;
|
||||
*darwin*)
|
||||
dnl - openal is required on mac os x and we are not able to figure out if it's installed or not
|
||||
AC_DEFINE(HAVE_OPENAL)
|
||||
LIBS="$LIBS -framework OpenGL -framework OpenAL"
|
||||
CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/OpenAL.framework/Headers"
|
||||
AC_SUBST(CPPFLAGS)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Detect the host platform and architecture and feed them to the compiler as
|
||||
# defines
|
||||
AS_CASE([$host],
|
||||
[*linux*], [AC_DEFINE(HOST_LINUX)],
|
||||
[*bsd*] , [AC_DEFINE(HOST_BSD)],
|
||||
[*mingw*], [AC_DEFINE(HOST_WINDOWS)],
|
||||
[*darwin*],[AC_DEFINE(HOST_DARWIN)],
|
||||
[AC_DEFINE(HOST_UNK)]
|
||||
)
|
||||
|
||||
AS_CASE([$host_cpu],
|
||||
[x86_64], [AC_DEFINE(HOST_64)],
|
||||
[amd64], [AC_DEFINE(HOST_64)],
|
||||
[AC_DEFINE(HOST_32)]
|
||||
)
|
||||
|
||||
AC_CHECK_DECL([__SSE2__])
|
||||
AM_CONDITIONAL([SUPPORT_SSE2], [test "x$ac_cv_have_decl___SSE2__" = xyes])
|
||||
|
||||
AC_CHECK_DECL([__AVX2__])
|
||||
AM_CONDITIONAL([SUPPORT_AVX2], [test "x$ac_cv_have_decl___AVX2__" = xyes])
|
||||
|
||||
AC_CHECK_DECL([__ALTIVEC__])
|
||||
AM_CONDITIONAL([SUPPORT_ALTIVEC], [test "x$ac_cv_have_decl___ALTIVEC__" = xyes])
|
||||
|
||||
AC_SUBST(PO_DIR)
|
||||
|
||||
dnl - Gdb stub
|
||||
AC_ARG_ENABLE(gdb-stub,
|
||||
[AC_HELP_STRING(--enable-gdb-stub, enable gdb stub)],
|
||||
[
|
||||
AC_DEFINE(GDB_STUB)
|
||||
wantgdbstub=yes
|
||||
])
|
||||
AM_CONDITIONAL([HAVE_GDB_STUB], [test "${wantgdbstub}" = "yes"])
|
||||
|
||||
dnl - Compiler warnings
|
||||
|
||||
# for developer use, enable lots of compile warnings,
|
||||
# but don't require this generally, because some system's
|
||||
# header files (BSD) can't handle it
|
||||
#
|
||||
# NB: must add -Werror after AC_PROG_CC, etc., so do this last
|
||||
AC_ARG_ENABLE(hardcore,
|
||||
[AC_HELP_STRING(--enable-hardcore, turn on -W -Wall -Werror)],
|
||||
[case "${enableval}" in
|
||||
yes) ENABLE_HARDCORE=1 ;;
|
||||
no) ENABLE_HARDCORE=0 ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-hardcore) ;; esac],
|
||||
[ENABLE_HARDCORE=0])
|
||||
|
||||
if test "x[$]ENABLE_HARDCORE" = "x1"; then
|
||||
AC_MSG_WARN(enable hardcore compile warnings)
|
||||
if test "x$CXX" = "x"; then
|
||||
dnl - only valid for C with newer gcc's
|
||||
CPPFLAGS="[$]CPPFLAGS -Wmissing-prototypes"
|
||||
fi
|
||||
dnl - -Wshadow
|
||||
CPPFLAGS="[$]CPPFLAGS -Wall -Wextra -D_FORTIFY_SOURCE=2 -Wno-missing-field-initializers -Wpointer-arith -Wcast-align -Wwrite-strings -Wno-unused-parameter -Wmissing-declarations -Wundef -Wmissing-noreturn -Wredundant-decls -Wformat-nonliteral -Wformat-security -Winit-self -Wno-reorder"
|
||||
fi
|
||||
|
||||
dnl - Enable debug mode
|
||||
AC_ARG_ENABLE(debug,
|
||||
AC_HELP_STRING(--enable-debug, enable debug information),
|
||||
AC_DEFINE(DEBUG))
|
||||
AC_ARG_ENABLE(gpu-debug,
|
||||
AC_HELP_STRING(--enable-gpu-debug, enable gpu debug information),
|
||||
AC_DEFINE(GPUDEBUG))
|
||||
AC_ARG_ENABLE(div-debug,
|
||||
AC_HELP_STRING(--enable-div-debug, enable div debug information),
|
||||
AC_DEFINE(DIVDEBUG))
|
||||
AC_ARG_ENABLE(sqrt-debug,
|
||||
AC_HELP_STRING(--enable-sqrt-debug, enable sqrt debug information),
|
||||
AC_DEFINE(SQRTDEBUG))
|
||||
AC_ARG_ENABLE(dma-debug,
|
||||
AC_HELP_STRING(--enable-dma-debug, enable dma debug information),
|
||||
AC_DEFINE(DMADEBUG))
|
||||
|
||||
dnl -- set maintainer mode
|
||||
AM_MAINTAINER_MODE
|
||||
AC_SUBST(USE_MAINTAINER_MODE)
|
||||
|
||||
dnl --- Finally, output the makefile
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
Loading…
Reference in New Issue