add object file format guessing from configure

This commit is contained in:
Josh Coalson 2001-06-18 23:07:19 +00:00
parent 2ac3a5429c
commit da0adb2056
2 changed files with 28 additions and 24 deletions

View File

@ -39,6 +39,10 @@ esac
AM_CONDITIONAL(FLaC__CPU_IA32, test x$cpu_ia32 = xtrue) AM_CONDITIONAL(FLaC__CPU_IA32, test x$cpu_ia32 = xtrue)
AM_CONDITIONAL(FLaC__CPU_PPC, test x$cpu_ppc = xtrue) AM_CONDITIONAL(FLaC__CPU_PPC, test x$cpu_ppc = xtrue)
AM_CONDITIONAL(FLaC__CPU_SPARC, test x$cpu_sparc = xtrue) AM_CONDITIONAL(FLaC__CPU_SPARC, test x$cpu_sparc = xtrue)
case "$host" in
*) OBJ_FORMAT=elf ;;
esac
AC_SUBST(OBJ_FORMAT)
if test x$cpu_ia32 = xtrue ; then if test x$cpu_ia32 = xtrue ; then
AC_DEFINE(FLAC__ALIGN_MALLOC_DATA) AC_DEFINE(FLAC__ALIGN_MALLOC_DATA)
@ -51,12 +55,12 @@ AC_DEFINE(FLAC__NO_ASM)
fi fi
AC_ARG_ENABLE(debug, AC_ARG_ENABLE(debug,
[ --enable-debug Turn on debugging], [ --enable-debug Turn on debugging],
[case "${enableval}" in [case "${enableval}" in
yes) debug=true ;; yes) debug=true ;;
no) debug=false ;; no) debug=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
esac],[debug=false]) esac],[debug=false])
AM_CONDITIONAL(DEBUG, test x$debug = xtrue) AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
AM_PATH_XMMS(0.9.5.1, , AC_MSG_WARN([*** XMMS >= 0.9.5.1 not installed - xmms support will not be built])) AM_PATH_XMMS(0.9.5.1, , AC_MSG_WARN([*** XMMS >= 0.9.5.1 not installed - xmms support will not be built]))
@ -70,24 +74,24 @@ fi
CFLAGS='-I./include -I $(top_srcdir)/include -Wall -W' CFLAGS='-I./include -I $(top_srcdir)/include -Wall -W'
if test x$debug = xtrue; then if test x$debug = xtrue; then
CFLAGS="$CFLAGS -g -O0 -DDEBUG" CFLAGS="$CFLAGS -g -O0 -DDEBUG"
else else
CFLAGS="$CFLAGS -O3 -DNDEBUG" CFLAGS="$CFLAGS -O3 -DNDEBUG"
if test x$GCC = xyes; then if test x$GCC = xyes; then
CFLAGS="$CFLAGS -fomit-frame-pointer -funroll-loops -ffast-math -finline-functions" CFLAGS="$CFLAGS -fomit-frame-pointer -funroll-loops -ffast-math -finline-functions"
fi fi
fi fi
AC_OUTPUT( Makefile \ AC_OUTPUT( Makefile \
src/Makefile \ src/Makefile \
src/libFLAC/Makefile \ src/libFLAC/Makefile \
src/libFLAC/ia32/Makefile \ src/libFLAC/ia32/Makefile \
src/flac/Makefile \ src/flac/Makefile \
src/metaflac/Makefile \ src/metaflac/Makefile \
src/plugin_xmms/Makefile \ src/plugin_xmms/Makefile \
src/test_streams/Makefile \ src/test_streams/Makefile \
src/test_unit/Makefile \ src/test_unit/Makefile \
include/Makefile \ include/Makefile \
include/FLAC/Makefile \ include/FLAC/Makefile \
test/Makefile \ test/Makefile \
) )

View File

@ -19,7 +19,7 @@
# nasm build rule: # nasm build rule:
SUFFIXES = .nasm .lo SUFFIXES = .nasm .lo
.nasm.lo: .nasm.lo:
$(NASM) -f elf -d OBJ_FORMAT_elf $< -o $@ $(NASM) -f $(OBJ_FORMAT) -d OBJ_FORMAT_$(OBJ_FORMAT) $< -o $@
noinst_LTLIBRARIES = libFLAC-asm.la noinst_LTLIBRARIES = libFLAC-asm.la
libFLAC_asm_la_SOURCES = \ libFLAC_asm_la_SOURCES = \