mirror of
https://github.com/dyne/FreeJ.git
synced 2026-02-12 07:40:57 +01:00
168 lines
4.5 KiB
Plaintext
168 lines
4.5 KiB
Plaintext
dnl ==============================================================
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
dnl ==============================================================
|
|
|
|
AC_INIT(src/freej.cpp)
|
|
|
|
AC_CANONICAL_HOST
|
|
AC_CANONICAL_TARGET
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
dnl ==============================================================
|
|
dnl Setup for automake
|
|
dnl ==============================================================
|
|
|
|
AM_SANITY_CHECK
|
|
AM_INIT_AUTOMAKE(FreeJ, 0.4)
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
dnl ==============================================================
|
|
dnl Get the operating system and version number...
|
|
dnl ==============================================================
|
|
|
|
uname=`uname`
|
|
uversion=`uname -r | sed -e 's/-.*$//g;s/[\.]//g'`
|
|
|
|
dnl ==============================================================
|
|
dnl Check for tools
|
|
dnl ==============================================================
|
|
AC_PROG_CC
|
|
AC_PROG_CXX
|
|
|
|
dnl Check for dlopen support
|
|
AC_LIBTOOL_DLOPEN
|
|
AC_DISABLE_STATIC
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
dnl ==============================================================
|
|
dnl Add the local include path and some flags
|
|
dnl ==============================================================
|
|
CFLAGS="-g -Wall -Wno-deprecated -O3 -D_REENTRANT -fomit-frame-pointer -march=${host_cpu} -mcpu=${host_cpu} -finline-functions -ffast-math -malign-double -funroll-loops"
|
|
|
|
dnl Checks for header files.
|
|
AC_HEADER_STDC
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
AC_C_CONST
|
|
|
|
dnl ==============================================================
|
|
dnl Checks for library functions.
|
|
dnl ==============================================================
|
|
AC_CHECK_FUNCS(select malloc mmap ioctl)
|
|
|
|
dnl ==============================================================
|
|
dnl Check for SDL
|
|
dnl ==============================================================
|
|
SDL_VERSION=1.2.0
|
|
AM_PATH_SDL($SDL_VERSION,
|
|
:,
|
|
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
|
|
)
|
|
AC_SUBST(SDL_LIBS)
|
|
|
|
AC_CHECK_SIZEOF(short, 2)
|
|
AC_CHECK_SIZEOF(int, 4)
|
|
AC_CHECK_SIZEOF(long, 4)
|
|
|
|
dnl AC_HEADER_DIRENT
|
|
|
|
|
|
dnl ==============================================================
|
|
dnl See if we can use x86 assembly blitters
|
|
dnl ==============================================================
|
|
CheckNASM()
|
|
{
|
|
dnl Make sure we are running on an x86 platform
|
|
case $target in
|
|
i?86*)
|
|
;;
|
|
*)
|
|
# Nope, bail early.
|
|
return
|
|
;;
|
|
esac
|
|
dnl Check for NASM (for assembly blit routines)
|
|
AC_ARG_ENABLE(nasm,
|
|
[ --enable-nasm use nasm assembly blitters on x86 [default=yes]],
|
|
checking nasm , enable_nasm=yes)
|
|
if test x$enable_nasm = xyes; then
|
|
AC_PATH_PROG(NASM, nasm)
|
|
if test x$NASM = x -o x$NASM = x'"$NASM"'; then
|
|
: # nasm isn't installed
|
|
else
|
|
case $ARCH in
|
|
win32)
|
|
NASMFLAGS="-f win32"
|
|
;;
|
|
*)
|
|
NASMFLAGS="-f elf"
|
|
;;
|
|
esac
|
|
AC_SUBST(NASMFLAGS)
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/asm"
|
|
fi
|
|
fi
|
|
}
|
|
|
|
dnl =====================================================
|
|
dnl CHECK if there is AVILIB
|
|
dnl =====================================================
|
|
AVI_LIBS=""
|
|
AC_AVIFILE(0.6.0)
|
|
if test x$HAVE_AVIFILE = xyes; then
|
|
AC_DEFINE(WITH_AVIFILE,1,
|
|
[define if linking to avifile library for AVI layer playback])
|
|
have_avilayer=yes
|
|
else
|
|
have_avilayer=no
|
|
fi
|
|
AC_SUBST(AVIFILE_LIBS)
|
|
|
|
dnl ==============================================================
|
|
dnl link with memory debugging library dmalloc
|
|
dnl ==============================================================
|
|
AC_CHECK_HEADER(dmalloc.h)
|
|
if test "$ac_cv_header_dmalloc_h" = "yes"; then
|
|
|
|
AC_MSG_CHECKING(if malloc debugging is wanted)
|
|
AC_ARG_WITH(dmalloc,
|
|
[ --with-dmalloc use dmalloc, as in
|
|
ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz],
|
|
[if test "$withval" = yes; then
|
|
AC_MSG_RESULT(yes)
|
|
AC_DEFINE(WITH_DMALLOC,1,
|
|
[Define if using the dmalloc debugging malloc package])
|
|
LIBS="$LIBS -ldmallocthcxx"
|
|
DMALLOCC="dmallocc.cpp"
|
|
have_dmalloc=yes
|
|
else
|
|
AC_MSG_RESULT(no)
|
|
DMALLOCC=""
|
|
have_dmalloc=no
|
|
fi], [AC_MSG_RESULT(no)])
|
|
|
|
fi
|
|
|
|
CXXFLAGS="$CFLAGS $SDL_CFLAGS"
|
|
|
|
|
|
AC_SUBST(LIBS)
|
|
|
|
|
|
AC_OUTPUT([
|
|
Makefile
|
|
src/Makefile
|
|
src/include/Makefile
|
|
filters/Makefile
|
|
filters/null/Makefile
|
|
filters/delaygrab/Makefile
|
|
filters/absdiff/Makefile
|
|
filters/rotozoom/Makefile
|
|
filters/simura/Makefile
|
|
filters/baltan/Makefile
|
|
filters/vertigo/Makefile
|
|
filters/transform/Makefile
|
|
])
|