summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure152
1 files changed, 57 insertions, 95 deletions
diff --git a/configure b/configure
index fdd8f23356..48ea29c8ea 100755
--- a/configure
+++ b/configure
@@ -6,6 +6,10 @@
#
# Changes in reversed order:
#
+# 2001/07/03 by Nick Kurshev
+# - added universal way of configuring SUBDIRS
+# - moved configurable stuff of depended SUBDIRS to SUBDIRS
+#
# 2001/06/05 by Pontscho
# - added alsa and esd detection
#
@@ -1284,70 +1288,48 @@ if [ "$system_name" = "FreeBSD" ]; then
CFLAGS="$CFLAGS -D_THREAD_SAFE"
fi
-echo
-echo "Creating $MCONF"
-cat > $MCONF << EOF
-
-# -------- Generated by ./configure -----------
-
-prefix = $_prefix
-AR=ar
-CC=$_cc
-# OPTFLAGS=-O4 $_profile $_debug -march=$proc -mcpu=$proc -pipe -fomit-frame-pointer -ffast-math
-OPTFLAGS=$CFLAGS
-EXTRA_INC=$_extraincdir
-WIN32_PATH=-DWIN32_PATH=\"$_win32libdir\"
-
-X11_INC=$_x11incdir
-X11DIR=$_x11libdir
-X_LIBS=$_x11libdir $_extralibdir $_gllib $_ggilib $_sdllib $_dgalib $_x11lib $_xvlib $_vmlib $_svgalib $_libpng $_socklib
-
-TERMCAP_LIB=$_libtermcap
-XMM_LIBS = $_xmmplibs
-LIRC_LIBS = $_lirclibs
-CSS_LIB = $_csslib
-CSS_INC = $_cssinc
-SDL_INC = $_sdlcflags
-DS_DEP = $_dshowdep
-DS_LIB = $_dshowlib
-ALSA_LIB = $_alsalib
-ESD_LIB = $_esdlib
-ARCH_LIBS = $_archlibs
-STREAM_SRCS = $_streamingsrcs
-
-EOF
# echo 'CFLAGS=$(OPTFLAGS) -Wall -DMPG12PLAY' >> config.mak
echo "Creating $CCONF"
if [ "$_mmx" = "yes" ]; then
_mmx='#define HAVE_MMX'
+ _cfg_mmx='yes'
else
_mmx='#undef HAVE_MMX'
+ _cfg_mmx='no'
fi
if [ "$_mmx2" = "yes" ]; then
_mmx2='#define HAVE_MMX2'
+ _cfg_mmx2='yes'
else
_mmx2='#undef HAVE_MMX2'
+ _cfg_mmx2='no'
fi
if [ $_3dnow = yes ]; then
_3dnowm='#define HAVE_3DNOW'
+ _cfg_3dnow='yes'
else
_3dnowm='#undef HAVE_3DNOW'
+ _cfg_3dnow='no'
fi
if [ $_3dnowex = yes ]; then
_3dnowexm='#define HAVE_3DNOWEX'
+ _cfg_3dnowex='yes'
else
_3dnowexm='#undef HAVE_3DNOWEX'
+ _cfg_3dnowex='no'
fi
if [ $_sse = yes ]; then
_ssem='#define HAVE_SSE'
+ _cfg_sse='yes'
else
_ssem='#undef HAVE_SSE'
+ _cfg_sse='no'
fi
# ---
@@ -1486,6 +1468,49 @@ else
_gui='#undef HAVE_GUI'
fi
+
+echo
+echo "Creating $MCONF"
+cat > $MCONF << EOF
+
+# -------- Generated by ./configure -----------
+
+prefix = $_prefix
+AR=ar
+CC=$_cc
+# OPTFLAGS=-O4 $_profile $_debug -march=$proc -mcpu=$proc -pipe -fomit-frame-pointer -ffast-math
+OPTFLAGS=$CFLAGS
+EXTRA_INC=$_extraincdir
+WIN32_PATH=-DWIN32_PATH=\"$_win32libdir\"
+
+X11_INC=$_x11incdir
+X11DIR=$_x11libdir
+X_LIBS=$_x11libdir $_extralibdir $_gllib $_ggilib $_sdllib $_dgalib $_x11lib $_xvlib $_vmlib $_svgalib $_libpng $_socklib
+
+TERMCAP_LIB=$_libtermcap
+XMM_LIBS = $_xmmplibs
+LIRC_LIBS = $_lirclibs
+CSS_LIB = $_csslib
+CSS_INC = $_cssinc
+SDL_INC = $_sdlcflags
+DS_DEP = $_dshowdep
+DS_LIB = $_dshowlib
+ALSA_LIB = $_alsalib
+ESD_LIB = $_esdlib
+ARCH_LIBS = $_archlibs
+STREAM_SRCS = $_streamingsrcs
+
+# --- Some stuff for autoconfigure ----
+TARGET_ARCH_X86=yes
+TARGET_CPU=$iproc
+TARGET_MMX=$_cfg_mmx
+TARGET_MMX2=$_cfg_mmx2
+TARGET_3DNOW=$_cfg_3dnow
+TARGET_3DNOWEX=$_cfg_3dnowex
+TARGET_SSE=$_cfg_sse
+
+BINUTILS=$_binutils
+EOF
cat > $CCONF << EOF
@@ -1655,69 +1680,6 @@ OPTIONAL_OBJS=$_aoobj
EOF
-echo "Creating libac3/config.mak"
-
-if [ $_sse = yes ]; then
- _downmixc='downmix/downmix_kni.S'
- _downmixo='downmix/downmix_kni.o'
-else
-if [ $_3dnow = yes ]; then
- _downmixc='downmix/downmix_3dnow.S'
- _downmixo='downmix/downmix_3dnow.o'
-else
-if [ $_binutils = yes ]; then
- _downmixc='downmix/downmix_i386.S'
- _downmixo='downmix/downmix_i386.o'
-else
-_downmixc='downmix/downmix.c'
-_downmixo='downmix/downmix.o'
-cat << EOF
-
-!!! Warning! fallback to slow downmix.c due the old binutils.
-!!! Upgrade it for better AC3 audio decoding performance!
-
-EOF
-fi
-fi
-fi
-cat > libac3/config.mak << EOF
-
-include ../config.mak
-
-OPTIONAL_SRCS = $_downmixc
-OPTIONAL_OBJS = $_downmixo
-
-EOF
-
-echo "Creating mp3lib/config.mak"
-
-if [ $_3dnowex = yes ]; then
- _mp3libobjectsrcs='dct36_k7.s dct64_k7.s decode_k7.s dct36_3dnow.s dct64_3dnow.s decode_3dnow.s'
- _mp3libobjectobjs='dct36_k7.o dct64_k7.o decode_k7.o dct36_3dnow.o dct64_3dnow.o decode_3dnow.o'
-else
-if [ $_3dnow = yes ]; then
- _mp3libobjectsrcs='dct36_3dnow.s dct64_3dnow.s decode_3dnow.s'
- _mp3libobjectobjs='dct36_3dnow.o dct64_3dnow.o decode_3dnow.o'
-else
-if [ $_sse = yes ]; then
- _mp3libobjectsrcs='decode_sse.s'
- _mp3libobjectobjs='decode_sse.o'
-else
- _mp3libobjectsrcs=
- _mp3libobjectobjs=
-fi
-fi
-fi
-
-cat > mp3lib/config.mak << EOF
-
-include ../config.mak
-
-OPTIONAL_SRCS = $_mp3libobjectsrcs
-OPTIONAL_OBJS = $_mp3libobjectobjs
-
-EOF
-
cat << EOF
Config files successfully generated by ./configure !