Commit 252642a3 authored by thomas's avatar thomas
Browse files

fixes to autoconf system


git-svn-id: https://svn.grrrr.org/ext/trunk@853 4d9ac71a-51e6-0310-8455-cad1006bcd31
parent 5782ca36
......@@ -18,49 +18,54 @@ AC_ARG_ENABLE(system, [ --enable-system flext system (default: pd)],
AC_DEFINE(FLEXT_SYS,2))
AC_ARG_ENABLE(sysdir,
[ --enable-sysdir path to pd or max headers],
[
[ --enable-sysdir path to pd or max headers],
[
sysdir=$enableval
INCLUDEDIR="-I$enableval $INCLUDEDIR"
]
)
],
[echo "path to system headers required "$enableval && exit 1])
dnl check for g_canvas.h in pd folder
AC_CHECK_FILE("$sysdir/g_canvas.h",,[echo "$sysdir/g_canvas.h not found" && exit 1])
AC_ARG_ENABLE(stkdir,
[ --enable-stkdir path to stk headers],
[ --enable-stkdir path to stk headers],
[
AC_CHECK_FILE("$enableval/Stk.h",,[echo "$enableval/Stk.h not found" && exit 1])
stkdir=$enableval
INCLUDEDIR="-I$enableval $INCLUDEDIR"
])
AM_CONDITIONAL([STK],[test "$stkdir"])
AC_ARG_ENABLE(sndobjdir,
[ --enable-sndobjdir path to SndObj headers],
[ --enable-sndobjdir path to SndObj headers],
[
AC_CHECK_FILE("$enableval/SndObj.h",,[echo "$enableval/SndObj.h not found" && exit 1])
sndobjdir=$enableval
INCLUDEDIR="-I$enableval $INCLUDEDIR"
])
AM_CONDITIONAL([STK],[test "$stkdir"])
AM_CONDITIONAL([SNDOBJ],[test "$sndobjdir"])
AC_ARG_ENABLE(optimize, [ --enable-optimize enables optimized builds for: pentium4, pentium3, G4, G5],
[
case $enableval in
pentium4)
OPT_FLAGS = "-mtune=pentium4 -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse";;
pentium3)
OPT_FLAGS = "-mtune=pentium3 -march=pentium3 -mmmx -msse -mfpmath=sse";;
pentium2)
OPT_FLAGS="-mtune=pentium2 -march=pentium2 -mmmx";;
pentium3 | pentium3m)
OPT_FLAGS = "-mtune=$enableval -march=$enableval -mmmx -msse -mfpmath=sse";
AC_DEFINE(FLEXT_USE_SIMD);;
pentium2 | athlon | pentium-mmx)
OPT_FLAGS="-mtune=$enableval -march=$enableval -mmmx";;
pentium)
OPT_FLAGS="-mtune=pentium -march=pentium";;
G5)
OPT_FLAGS="-march=G5 -mcpu=G5 -maltivec -faltivec -malign-natural";
OPT_FLAGS="-mtune=$enableval -march=$enableval";;
pentium4 | pentium4m | pentium-m | prescott | nocona | athlon-xp | athlon-mp | athlon64 | opteron)
OPT_FLAGS="-mtune=$enableval -march=$enableval -mmmx -msse -msse2 -mfpmath=sse";
AC_DEFINE(FLEXT_USE_SIMD);;
G4)
OPT_FLAGS="-march=G4 -mcpu=G4 -maltivec -faltivec -malign-natural";
G5 | G4)
OPT_FLAGS="-mtune=$enableval -march=$enableval -maltivec -faltivec -malign-natural";
AC_DEFINE(FLEXT_USE_SIMD);;
G3)
OPT_FLAGS="-mtune=G3 -mcpu=G3 -malign-natural";;
OPT_FLAGS="-mtune=$enableval -march=$enableval -malign-natural";;
*)
;;
esac
......
......@@ -3,8 +3,8 @@
# added by tim blechmann
#
pkglib_LIBRARIES = libflext.a libflext_d.a libflext_t.a libflext_td.a
pkglib_LTLIBRARIES = libflext.la libflext_d.la
lib_LIBRARIES = libflext.a libflext_d.a libflext_t.a libflext_td.a
lib_LTLIBRARIES = libflext.la libflext_d.la
SRCS_FLEXT = \
flbase.cpp \
......@@ -57,21 +57,21 @@ pkginclude_HEADERS = \
#handling for stk / sndobj
SRCS_STK = flstk.cpp
HDRS_STK = flstk.cpp
HDRS_STK = flstk.h
SRCS_SNDOBJ = flsndobj.cpp
HDRS_SNDOBJ = flsndobj.cpp
HDRS_SNDOBJ = flsndobj.h
if SNDOBJ
SRCS_FLEXT += $(SRCS_SNDOBJ)
pkginclude_HEADERS += $(HDRS_SNDOBJ)
LIB_SNDOBJ = sndobj
LIB_SNDOBJ = -lsndobj
endif
if STK
SRCS_FLEXT += $(SRCS_STK)
pkginclude_HEADERS += $(HDRS_STK)
LIB_STK = stk
LIB_STK = -lstk
endif
libflext_a_SOURCES = $(SRCS_FLEXT)
......@@ -90,6 +90,6 @@ libflext_la_CXXFLAGS = @OPT_FLAGS@ @INCLUDEDIR@ -DFLEXT_SHARED \
libflext_d_la_CXXFLAGS = @INCLUDEDIR@ -g -DFLEXT_DEBUG -DFLEXT_SHARED \
-DFLEXT_EXPORTS
libflext_la_LDFLAGS = @DYNAMIC_LDFLAGS@ -l$(LIB_STK) -l$(LIB_SNDOBJ)
libflext_d_la_LDFLAGS = @DYNAMIC_LDFLAGS@ -l$(LIB_STK) -l$(LIB_SNDOBJ)
libflext_la_LDFLAGS = @DYNAMIC_LDFLAGS@ $(LIB_STK) $(LIB_SNDOBJ)
libflext_d_la_LDFLAGS = @DYNAMIC_LDFLAGS@ $(LIB_STK) $(LIB_SNDOBJ)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment