Alphabetizes AUTHORS by surname, credits huevos_rancheros' contributions.
[HandBrake.git] / configure
blobae0d0badb5084073770194e54ea6428a0acd702f
1 #! /bin/sh
3 CC="gcc"
4 CXX="g++"
5 CCFLAGS="$CCFLAGS -Wall -g"
6 OPTIM="$OPTIM -O3 -funroll-loops"
7 LINKLIBS="-lz"
9 # System-specific flags
10 SYSTEM=`uname -s`
11 case $SYSTEM in
12 BeOS)
13 CCFLAGS="$CCFLAGS -Wno-multichar"
14 DEFINES="$DEFINES SYS_BEOS"
15 LINKLIBS="$LINKLIBS -lbe -ltracker"
17 RELEASE=`uname -r`
18 case $RELEASE in
19 6.0|5.0.4) # Zeta or R5 / BONE beta 7
20 SYSTEM="$SYSTEM / BONE"
21 LINKLIBS="$LINKLIBS -lbind -lsocket"
23 5.0*) # R5 / net_server
24 SYSTEM="$SYSTEM / net_server"
25 DEFINES="$DEFINES BEOS_NETSERVER"
26 LINKLIBS="$LINKLIBS -lnet"
29 echo "Unsupported BeOS version"
30 exit 1 ;;
31 esac
34 Darwin)
35 DEFINES="$DEFINES SYS_DARWIN USE_PTHREAD"
36 LINKLIBS="$LINKLIBS -lpthread"
39 FreeBSD)
40 DEFINES="$DEFINES SYS_FREEBSD USE_PTHREAD"
41 LINKLIBS="$LINKLIBS -pthread"
44 NetBSD)
45 DEFINES="$DEFINES SYS_NETBSD USE_PTHREAD"
46 LINKLIBS="$LINKLIBS -lpthread"
49 Linux)
50 DEFINES="$DEFINES SYS_LINUX USE_PTHREAD _LARGEFILE_SOURCE _FILE_OFFSET_BITS=64"
51 LINKLIBS="$LINKLIBS -lpthread"
54 CYGWIN*)
55 DEFINES="$DEFINES SYS_CYGWIN USE_PTHREAD"
56 LINKLIBS="$LINKLIBS -lpthread"
60 echo "Unsupported operating system"
61 exit 1 ;;
62 esac
63 echo "System: $SYSTEM"
65 # Check for endianness (we need to define WORDS_BIGENDIAN for libdvdread)
66 cat > testconf.c << EOF
67 int main()
69 int i = 1;
70 return *( (char *) &i );
72 EOF
73 if ( cc -o testconf testconf.c && ./testconf ) > /dev/null 2>&1
74 then
75 echo "Endian: big"
76 DEFINES="$DEFINES WORDS_BIGENDIAN"
77 else
78 echo "Endian: little"
80 rm -f testconf.c testconf
82 # Generate config.jam
83 rm -f config.jam
84 cat << EOF > config.jam
85 CC = $CC ;
86 C++ = $CXX ;
87 LINK = $CXX ;
88 CCFLAGS = $CCFLAGS ;
89 C++FLAGS = $CCFLAGS ;
90 OPTIM = $OPTIM ;
91 DEFINES = $DEFINES ;
92 LINKLIBS = $LINKLIBS ;
93 EOF
95 echo
96 echo "To build HandBrake, run:"
97 echo " './jam' on a Mac (or 'make' to try the UB build method),"
98 echo " 'jam' on Linux or Windows."