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 # write configuration header
119 echo "Writing hvirtual_config.h"
120 cat > hvirtual_config.h << EOF
121 // Configuration file made by configure. Don't edit.
124 if [ "$HAVE_VIDEO4LINUX2" = "y" ]; then
125 echo "#define HAVE_VIDEO4LINUX2" >> hvirtual_config.h
126 echo "Have Video4Linux 2"
128 echo "Don't have Video4Linux 2"
131 if [ "$HAVE_DVB" = "y" ]; then
132 echo "#define HAVE_DVB" >> hvirtual_config.h
135 echo "Don't have DVB"
139 if [ "$HAVE_GL" = "y" ]; then
140 cat >> hvirtual_config.h << EOF
145 echo "Have OpenGL 2.0"
147 echo "Don't have OpenGL 2.0"
150 # probe for libraries
151 if [ $STATIC_LIBRARIES = 0 ]; then
152 sed -e "s/^STATIC_LIBRARIES := .*/STATIC_LIBRARIES := n/" -i global_config
153 cd thirdparty && ./configure shared && cd ..
155 sed -e "s/^STATIC_LIBRARIES := .*/STATIC_LIBRARIES := y/" -i global_config
156 cd thirdparty && ./configure static && cd ..
158 if [ $? -ne 0 ]; then
159 echo "Error in thirdparty configuration."
164 echo CONFIGURING QUICKTIME
165 cd quicktime* && ./configure && cd ..
166 if [ $? -ne 0 ]; then
167 echo "Error in quicktime configuration."
171 echo CONFIGURING LIBZMPEG3
172 cd libzmpeg3* && ./configure && cd ..
173 if [ $? -ne 0 ]; then
174 echo "Error in libzmpeg3 configuration."
180 echo "Configured successfully."
181 echo "Type 'make' to build me."
182 echo "If all ok, 'make install'";