summaryrefslogtreecommitdiffstats
path: root/mpg123_artsplugin/configure.in.in
blob: 33da7fa90629595c93bef9f39ca0b9c46d7f6a74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
dnl ============
dnl Machine type
dnl ============
 
ARCH_CFLAGS="$CFLAGS -O2 -funroll-all-loops -finline-functions -ffast-math"

case "$ARCH_TYPE" in
	i486)
		AC_DEFINE(ARCH_486, 1, [WE ARE BUILDING FOR A 486])
		OPTIMIZED_ARCH="YES"
	;;
	i586)
		AC_DEFINE(ARCH_586, 1, [WE ARE BUILDING FOR A PENTIUM])
		OPTIMIZED_ARCH="YES"
	;;
	i686)
		AC_DEFINE(ARCH_686, 1, [WE ARE BUILDING FOR A PPRO])
		OPTIMIZED_ARCH="YES"
		#EXTRA_CPU_CFLAGS=$(if $CC -march=i686 -S -o /dev/null -xc /dev/null > /dev/null; then echo "-march=i686"; fi)
	;;
	ppc)
		AC_DEFINE(ARCH_PPC, 1, [WE ARE BUILDING FOR A POWERPC])
		OPTIMIZED_ARCH="YES"
	;;
	sun4u)
		AC_DEFINE(ARCH_ULTRA, 1, [WE ARE BUILDING FOR A SUN ULTRASPARC])
		# Is there mpg123 optimization for UltraSparc?
	;;
esac

# ARCH_X86
if test "$ARCH_TYPE" = "i486" || test "$ARCH_TYPE" = "i586" || test "$ARCH_TYPE" = "i686"; then
	MPG123_PLAT_LIB="$MPG123_PLAT_LIB libmpx86.la"
fi
# ARCH_486
if test "$ARCH_TYPE" = "i486"; then
	MPG123_PLAT_LIB="$MPG123_PLAT_LIB libmp486.la"
	ARCH_CFLAGS="$ARCH_CFLAGS -DROT_I386 -DI386_ASSEM -DI486_OPT -DLINUX -DREAL_IS_FLOAT"
fi
# ARCH_586
if test "$ARCH_TYPE" = "i586" -a "$MMX_SUPPORT" = "no"; then
        MPG123_PLAT_LIB="$MPG123_PLAT_LIB libmp586.la"
	ARCH_CFLAGS="$ARCH_CFLAGS -DROT_I386 -DI386_ASSEM -DPENTIUM_OPT -DLINUX -DREAL_IS_FLOAT"
fi
# ARCH_586_MMX
if test "$ARCH_TYPE" = "i586" -a "$MMX_SUPPORT" = "yes"; then
	ARCH_CFLAGS="$ARCH_CFLAGS -DROT_I386 -DI386_ASSEM -DPENTIUM_OPT -DLINUX -DREAL_IS_FLOAT"
	MPG123_PLAT_LIB=libmp586mmx.la
fi
# ARCH_686
if test "$ARCH_TYPE" = "i686" -a "$MMX_SUPPORT" = "no"; then
	ARCH_CFLAGS="$ARCH_CFLAGS -DROT_I386 -DI386_ASSEM -DPENTIUM_OPT -DLINUX -DREAL_IS_FLOAT -march=pentiumpro"
	MPG123_PLAT_LIB=libmp686.la
fi
# ARCH_686_MMX
if test "$ARCH_TYPE" = "i686" -a "$MMX_SUPPORT" = "yes"; then
	ARCH_CFLAGS="$ARCH_CFLAGS -DROT_I386 -DI386_ASSEM -DPENTIUM_OPT -DUSE_MMX -DLINUX -DREAL_IS_FLOAT -march=pentiumpro"
	MPG123_PLAT_LIB=libmp686mmx.la
fi
# ARCH_PPC
if test "$ARCH_TYPE" = "ppc"; then
	MPG123_PLAT_LIB=libmpppc.la
fi
# ARCH_ULTRA
if test "$ARCH_TYPE" = "sun4u"; then
	:
	# nothing for now
fi
# ARCH_PLAIN
if test -z "$OPTIMIZED_ARCH"; then
	MPG123_PLAT_LIB=libmpplain.la
fi

AC_SUBST(ARCH_CFLAGS)
AC_SUBST(MPG123_PLAT_LIB)

if test "$kde_mpeglib_compiles" = "yes"
then
DO_NOT_COMPILE="$DO_NOT_COMPILE mpg123_artsplugin"
fi

# this is run after libtool configure parts, which set AS to as
# which is the wrong one for us.  E.g. libtool doesn't recognize that as
# tag.  So we unset it here, so the below macro can set it.
save_AS=$AS
unset AS
ifdef([AM_PROG_AS],[AM_PROG_AS],[])
#if the macro did set something usefull fallback.
test -z "$AS" && AS=$save_AS
#and if AS was set to as by the macro, and we have a saved value,
#it's likely it contains a better guess (or it's also as)
test "x$AS" = xas && test -n "$save_AS" && AS=$save_AS