4 if [ "$1" = "static" ]; then
6 elif [ "$1" = "shared" ]; then
9 echo usage: "./configure <shared | static>"
15 if [ -z "$STATIC_LIBRARIES" ]; then
23 if [ $OBJDIR = i686 ]; then
24 if [ ! -x /usr/bin/nasm -a ! -x /usr/local/bin/nasm ]; then
25 echo " *** Nasm is required.";
31 if [ ! -x /usr/bin/yasm -a ! -x /usr/local/bin/yasm ]; then
32 echo " *** Yasm is required.";
37 # test for videodev2.h
40 cat > conftest.c << EOF
41 #include <asm/types.h>
43 #include <linux/videodev2.h>
50 gcc conftest.c > /dev/null 2>&1
52 if [ -x a.out ]; then HAVE_VIDEO4LINUX2=y; else HAVE_VIDEO4LINUX2=n; fi
58 cat > conftest.c << EOF
60 #include <linux/dvb/dmx.h>
61 #include <linux/dvb/frontend.h>
68 gcc conftest.c > /dev/null 2>&1
70 if [ -x a.out ]; then HAVE_DVB=y; else HAVE_DVB=n; fi
72 rm -f a.out conftest.c
75 # test for -msse support
78 cat > conftest.c << EOF
85 gcc -msse conftest.c > /dev/null 2>&1
87 if [ -x a.out ]; then HAVE_GCC=y; else HAVE_GCC=n; fi
89 rm -f a.out conftest.c
91 if [ $HAVE_GCC = n ]; then
92 echo " *** GCC 3.2.2 or greater is required. Download it from gcc.gnu.org";
100 cat > conftest.c << EOF
102 #include <GL/glext.h>
111 gcc conftest.c -lGL -lGLU > /dev/null 2>&1
113 if [ -x a.out ]; then HAVE_GL=y; else HAVE_GL=n; fi
115 rm -f a.out conftest.c
118 # probe for libraries
119 if [ $STATIC_LIBRARIES = 0 ]; then
120 sed -e "s/^STATIC_LIBRARIES := .*/STATIC_LIBRARIES := n/" -i global_config
121 cd thirdparty && ./configure shared && cd ..
123 sed -e "s/^STATIC_LIBRARIES := .*/STATIC_LIBRARIES := y/" -i global_config
124 cd thirdparty && ./configure static && cd ..
126 if [ $? -ne 0 ]; then
127 echo "Error in thirdparty configuration."
131 echo CONFIGURING LIBZMPEG3
132 cd libzmpeg3* && ./configure && cd ..
133 if [ $? -ne 0 ]; then
134 echo "Error in libzmpeg3 configuration."
140 echo "Configured successfully."
141 echo "Type 'make' to build me."
142 echo "If all ok, 'make install'";