summaryrefslogtreecommitdiff
blob: bfac4c5a016f889a7af60805b912804355481dcf (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
--- a/configure
+++ b/configure
@@ -9,7 +9,6 @@
 prefix="/usr/local"
 manprefix='$(PREFIX)'
 #compiler flags
-CC="g++"
 common_cflags="-Wall"
 devel_cflags="-g -Werror -fno-builtin"
 optimization_cflags="-O3"
@@ -36,7 +35,6 @@
 
 if [ "${HOSTNAME}" = "powerpc-apple-darwin6.0" ]; then
 #compiler flags
-CC="c++"
 common_cflags="-pedantic -Wall"
 #devel_cflags="-g -Werror -fno-builtin"
 devel_cflags="-g -fno-builtin"
@@ -153,8 +151,15 @@
     if test "$gcc_minor" = "0" -o "$gcc_minor" = "1"; then
 	optimization_cflags="-O2";
     fi
+    if test "$gcc_minor" -ge 4; then
+	optimization_cflags="$optimization_cflags -fno-unit-at-a-time"
+    fi
+elif test "$gcc_major" -ge "4"; then
+	optimization_cflags="$optimization_cflags -fno-unit-at-a-time"
 fi
 
+
+
 # Now check if the system handles large file support
 # unless user has specified not to do so
 if test $LFS = "yes"; then
@@ -165,7 +170,7 @@
 		return (int)(fseeko(stdin,0,SEEK_SET));
 		}
 EOF
-	$CC __LFStest.cpp -o __LFStestPASSED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 1>__LFSout 2>__LFSerror
+	${CXX:-c++} __LFStest.cpp -o __LFStestPASSED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 1>__LFSout 2>__LFSerror
 	if test -f __LFStestPASSED; then
 		echo "PASSED";
 		cflags="$cflags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE";
@@ -211,7 +211,6 @@
 fi
 
 if test $devel = "no" -a $debug = "no"; then
-lflags="$lflags -s";
 cflags="$cflags $optimization_cflags";
 fi

@@ -293,15 +298,15 @@
 	@echo ""
 
 mpgtx : commandline.cxx mpegOut.o mpeg.o chunkTab.o id3command.o common.hh
-	$CC \$(CFLAGS) \$(OFLAGS) -o mpgtx commandline.cxx mpegOut.o mpeg.o chunkTab.o id3command.o \$(LFLAGS)
+	\$(CXX) \$(CFLAGS) \$(OFLAGS) \$(LDFLAGS) -o mpgtx commandline.cxx mpegOut.o mpeg.o chunkTab.o id3command.o \$(LFLAGS)
 mpegOut.o : mpegOut.cxx mpegOut.hh mpeg.hh common.hh
-	$CC \$(CFLAGS) \$(OFLAGS) -c mpegOut.cxx 
+	\$(CXX) \$(CFLAGS) \$(OFLAGS) -c mpegOut.cxx 
 mpeg.o : mpeg.cxx mpeg.hh mpegOut.hh common.hh
-	$CC \$(CFLAGS) \$(OFLAGS) -c mpeg.cxx 
+	\$(CXX) \$(CFLAGS) \$(OFLAGS) -c mpeg.cxx 
 chunkTab.o : chunkTab.cxx chunkTab.hh common.hh
-	$CC \$(CFLAGS) \$(OFLAGS) -c chunkTab.cxx
+	\$(CXX) \$(CFLAGS) \$(OFLAGS) -c chunkTab.cxx
 id3command.o : id3command.cxx id3command.hh common.hh
-	$CC \$(CFLAGS) \$(OFLAGS) -c id3command.cxx
+	\$(CXX) \$(CFLAGS) \$(OFLAGS) -c id3command.cxx