comparison configure @ 2988:a1860b3a33c9

more debugging in configure.log [temporary] (calls ldd to debug dependencies for [future] static support) $_ld_x11 contains now $_ld_sock improved x11 C test libGL is no longer OS dependent (bsd) but depends on 2 compil' tests preliminary support for -static: -static requires any test succeeds with that flag missing -logg for vorbis (triggered by -static) NB: It still can't compile in static [undefined reference to... errors :/ ]
author pl
date Mon, 19 Nov 2001 00:38:41 +0000
parents 669fd46ac0d0
children 53a98d2feb8a
comparison
equal deleted inserted replaced
2987:669fd46ac0d0 2988:a1860b3a33c9
24 ############################################################################# 24 #############################################################################
25 25
26 # Prefer these macros to full length text ! 26 # Prefer these macros to full length text !
27 # These macros only return an error code - NO display is done 27 # These macros only return an error code - NO display is done
28 cc_check() { 28 cc_check() {
29 echo >> "$TMPLOG"
29 cat "$TMPC" >> "$TMPLOG" 30 cat "$TMPC" >> "$TMPLOG"
30 echo >> "$TMPLOG" 31 echo >> "$TMPLOG"
31 echo "$_cc $TMPC -o $TMPO $@" >> "$TMPLOG" 32 echo "$_cc $_inc_extra $_ld_static $_ld_extra $TMPC -o $TMPO $@" >> "$TMPLOG"
32 ( "$_cc" $_inc_extra $_ld_extra "$TMPC" -o "$TMPO" "$@" ) >> "$TMPLOG" 2>&1 33 ( "$_cc" $_inc_extra $_ld_static $_ld_extra "$TMPC" -o "$TMPO" "$@" ) >> "$TMPLOG" 2>&1
33 return "$?" 34 TMP="$?"
35 echo >> "$TMPLOG"
36 echo "ldd $TMPO" >> "$TMPLOG"
37 ( ldd "$TMPO" ) >> "$TMPLOG" 2>&1
38 echo >> "$TMPLOG"
39 return "$TMP"
34 } 40 }
35 41
36 # Display error message, flushes tempfile, exit 42 # Display error message, flushes tempfile, exit
37 die () { 43 die () {
38 echo 44 echo
160 Use these options if autodetection fails: 166 Use these options if autodetection fails:
161 --with-extraincdir=DIR extra headers (png, dvb, mad, sdl, css, ...) in DIR 167 --with-extraincdir=DIR extra headers (png, dvb, mad, sdl, css, ...) in DIR
162 --with-extralibdir=DIR extra library files (png, SDL, ...) in DIR 168 --with-extralibdir=DIR extra library files (png, SDL, ...) in DIR
163 --with-x11incdir=DIR X headers in DIR 169 --with-x11incdir=DIR X headers in DIR
164 --with-x11libdir=DIR X library files in DIR 170 --with-x11libdir=DIR X library files in DIR
171 --with-csslibdir=DIR libcss in DIR
172 --with-madlibdir=DIR libmad (libmad shared lib.) in DIR
165 --with-win32libdir=DIR W*ndows DLL files in DIR 173 --with-win32libdir=DIR W*ndows DLL files in DIR
166 --with-xanimlibdir=DIR XAnim DLL files in DIR 174 --with-xanimlibdir=DIR XAnim DLL files in DIR
167 --with-csslibdir=DIR 'libcss.so' in DIR
168 --with-sdl-config=PATH path to sdl*-config (e.g.: /opt/bin/sdl-config) 175 --with-sdl-config=PATH path to sdl*-config (e.g.: /opt/bin/sdl-config)
169 --with-gtk-config=PATH path to gtk*-config (e.g.: /opt/bin/gtk-config) 176 --with-gtk-config=PATH path to gtk*-config (e.g.: /opt/bin/gtk-config)
170 --with-glib-config=PATH path to glib*-config (e.g.: /opt/bin/glib-config) 177 --with-glib-config=PATH path to glib*-config (e.g.: /opt/bin/glib-config)
171 --with-madlibdir=DIR 'libmad.so' (libmad shared lib.) in DIR
172 178
173 EOF 179 EOF
174 exit 0 180 exit 0
175 fi 181 fi
176 done # for parm in ... 182 done # for parm in ...
191 --as=*) 197 --as=*)
192 _as=`echo $ac_option | cut -d '=' -f 2` 198 _as=`echo $ac_option | cut -d '=' -f 2`
193 ;; 199 ;;
194 --disable-gcc-checking) 200 --disable-gcc-checking)
195 _skip_cc_check=yes 201 _skip_cc_check=yes
202 ;;
203 --enable-static)
204 _ld_static='-static'
205 ;;
206 --disable-static)
207 _ld_static=''
208 ;;
209 --enable-static=*)
210 _ld_static="-static `echo $ac_option | cut -d '=' -f 2`"
196 ;; 211 ;;
197 --with-extraincdir=*) 212 --with-extraincdir=*)
198 _inc_extra=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'` 213 _inc_extra=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
199 ;; 214 ;;
200 --with-extralibdir=*) 215 --with-extralibdir=*)
655 # Skip 1st pass 670 # Skip 1st pass
656 --target=*) ;; 671 --target=*) ;;
657 --cc=*) ;; 672 --cc=*) ;;
658 --as=*) ;; 673 --as=*) ;;
659 --disable-gcc-checking) ;; 674 --disable-gcc-checking) ;;
675 --enable-static) ;;
676 --disable-static*) ;;
660 --with-extraincdir=*) ;; 677 --with-extraincdir=*) ;;
661 --with-extralibdir=*) ;; 678 --with-extralibdir=*) ;;
679
662 680
663 # Real 2nd pass 681 # Real 2nd pass
664 --enable-x11) _x11=yes ;; 682 --enable-x11) _x11=yes ;;
665 --disable-x11) _x11=no ;; 683 --disable-x11) _x11=no ;;
666 --enable-dga) _dga=yes ;; 684 --enable-dga) _dga=yes ;;
743 --disable-vo2) _vo2=no ;; 761 --disable-vo2) _vo2=no ;;
744 762
745 --enable-select) _def_select='#define HAVE_AUDIO_SELECT' ;; 763 --enable-select) _def_select='#define HAVE_AUDIO_SELECT' ;;
746 --disable-select) _def_select='#undef HAVE_AUDIO_SELECT' ;; 764 --disable-select) _def_select='#undef HAVE_AUDIO_SELECT' ;;
747 765
748 --enable-static) _ld_static='-static' ;;
749 --disable-static) _ld_static='' ;;
750 --enable-static=*)
751 _ld_static="-static `echo $ac_option | cut -d '=' -f 2`"
752 ;;
753 766
754 --language=*) 767 --language=*)
755 LINGUAS=`echo $ac_option | cut -d '=' -f 2` 768 LINGUAS=`echo $ac_option | cut -d '=' -f 2`
756 ;; 769 ;;
757 770
1186 fi 1199 fi
1187 if test -z "$_x11libdir" ; then 1200 if test -z "$_x11libdir" ; then
1188 _x11=no 1201 _x11=no
1189 echores "not found" 1202 echores "not found"
1190 fi 1203 fi
1191 _ld_x11="-L$_x11libdir -lX11 -lXext" 1204 _ld_x11="-L$_x11libdir -lX11 -lXext $_ld_sock"
1192 1205
1193 1206
1194 ######### 1207 #########
1195 # VIDEO # 1208 # VIDEO #
1196 ######### 1209 #########
1197 1210
1198 echocheck "X11" 1211 echocheck "X11"
1199 if test "$_x11" = auto ; then 1212 if test "$_x11" = auto ; then
1200 cat > $TMPC <<EOF 1213 cat > $TMPC <<EOF
1201 int main(void) { return 0; } 1214 #include <X11/Xlib.h>
1215 #include <X11/Xutil.h>
1216 int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
1202 EOF 1217 EOF
1203 _x11=no 1218 _x11=no
1204 cc_check $_inc_x11 $_ld_x11 -lXext $_ld_sock && _x11=yes 1219 cc_check $_inc_x11 $_ld_x11 && _x11=yes
1205 fi 1220 fi
1206 if test "$_x11" = yes ; then 1221 if test "$_x11" = yes ; then
1207 _def_x11='#define HAVE_X11 1' 1222 _def_x11='#define HAVE_X11 1'
1208 _vosrc="$_vosrc vo_x11.c" 1223 _vosrc="$_vosrc vo_x11.c"
1209 else 1224 else
1221 #include <X11/Xutil.h> 1236 #include <X11/Xutil.h>
1222 #include <X11/Xatom.h> 1237 #include <X11/Xatom.h>
1223 #include <X11/extensions/dpms.h> 1238 #include <X11/extensions/dpms.h>
1224 int main(void) { return 0; } 1239 int main(void) { return 0; }
1225 EOF 1240 EOF
1226 cc_check $_inc_x11 $_ld_x11 -lXdpms $_ld_sock && _xdpms3=yes 1241 cc_check $_inc_x11 $_ld_x11 -lXdpms && _xdpms3=yes
1227 fi 1242 fi
1228 _xdpms4=no 1243 _xdpms4=no
1229 if test "$_x11" = yes ; then 1244 if test "$_x11" = yes ; then
1230 cat > $TMPC <<EOF 1245 cat > $TMPC <<EOF
1231 #include <X11/Xmd.h> 1246 #include <X11/Xmd.h>
1257 if test "$_x11" = yes && test "$_xv" = auto ; then 1272 if test "$_x11" = yes && test "$_xv" = auto ; then
1258 cat > $TMPC <<EOF 1273 cat > $TMPC <<EOF
1259 int main(void) { return 0; } 1274 int main(void) { return 0; }
1260 EOF 1275 EOF
1261 _xv=no 1276 _xv=no
1262 cc_check $_inc_x11 $_ld_x11 -lXv $_ld_sock && _xv=yes 1277 cc_check $_inc_x11 $_ld_x11 -lXv && _xv=yes
1263 else 1278 else
1264 _xv=no 1279 _xv=no
1265 fi 1280 fi
1266 if test "$_xv" = yes ; then 1281 if test "$_xv" = yes ; then
1267 _def_xv='#define HAVE_XV 1' 1282 _def_xv='#define HAVE_XV 1'
1277 if test "$_x11" = yes && test "$_xinerama" = auto ; then 1292 if test "$_x11" = yes && test "$_xinerama" = auto ; then
1278 cat > $TMPC <<EOF 1293 cat > $TMPC <<EOF
1279 int main(void) { return 0; } 1294 int main(void) { return 0; }
1280 EOF 1295 EOF
1281 _xinerama=no 1296 _xinerama=no
1282 cc_check $_inc_x11 $_ld_x11 -lXinerama $_ld_sock && _xinerama=yes 1297 cc_check $_inc_x11 $_ld_x11 -lXinerama && _xinerama=yes
1283 else 1298 else
1284 _xinerama=no 1299 _xinerama=no
1285 fi 1300 fi
1286 if test "$_xinerama" = yes ; then 1301 if test "$_xinerama" = yes ; then
1287 _def_xinerama='#define HAVE_XINERAMA 1' 1302 _def_xinerama='#define HAVE_XINERAMA 1'
1301 if test "$_x11" = yes && test "$_vm" = auto ; then 1316 if test "$_x11" = yes && test "$_vm" = auto ; then
1302 cat > $TMPC <<EOF 1317 cat > $TMPC <<EOF
1303 int main(void) { return 0; } 1318 int main(void) { return 0; }
1304 EOF 1319 EOF
1305 _vm=no 1320 _vm=no
1306 cc_check $_inc_x11 $_ld_x11 -lXxf86vm $_ld_sock && _vm=yes 1321 cc_check $_inc_x11 $_ld_x11 -lXxf86vm && _vm=yes
1307 else 1322 else
1308 _vm=no 1323 _vm=no
1309 fi 1324 fi
1310 if test "$_vm" = yes ; then 1325 if test "$_vm" = yes ; then
1311 _def_vm='#define HAVE_XF86VM 1' 1326 _def_vm='#define HAVE_XF86VM 1'
1346 #include <X11/Xlib.h> 1361 #include <X11/Xlib.h>
1347 #include <X11/extensions/xf86dga.h> 1362 #include <X11/extensions/xf86dga.h>
1348 int main (void) { XDGAMode mode; XDGADevice device; return 0; } 1363 int main (void) { XDGAMode mode; XDGADevice device; return 0; }
1349 EOF 1364 EOF
1350 _dga2=no 1365 _dga2=no
1351 cc_check $_inc_x11 $_ld_x11 -lXxf86dga -lXxf86vm $_ld_sock && _dga2=yes 1366 cc_check $_inc_x11 $_ld_x11 -lXxf86dga -lXxf86vm && _dga2=yes
1352 else 1367 else
1353 _dga2=no 1368 _dga2=no
1354 fi 1369 fi
1355 if test "$_dga2" = yes ; then 1370 if test "$_dga2" = yes ; then
1356 _def_dga2='#define HAVE_DGA2 1' 1371 _def_dga2='#define HAVE_DGA2 1'
1366 cat > $TMPC << EOF 1381 cat > $TMPC << EOF
1367 #include <GL/gl.h> 1382 #include <GL/gl.h>
1368 int main(void) { return 0; } 1383 int main(void) { return 0; }
1369 EOF 1384 EOF
1370 _gl=no 1385 _gl=no
1371 if bsd ; then 1386 if cc_check $_inc_x11 $_ld_x11 -lGL -lm ; then
1372 cc_check $_inc_x11 $_ld_x11 -lGL -lm $_ld_pthread $_ld_sock && _gl=yes 1387 _gl=yes
1388 _ld_gl="-lGL -lm"
1389 elif cc_check $_inc_x11 $_ld_x11 -lGL -lm $_ld_pthread ; then
1390 _gl=yes
1391 _ld_gl="-lGL -lm $_ld_pthread"
1373 else 1392 else
1374 cc_check $_inc_x11 $_ld_x11 -lGL -lm $_ld_sock && _gl=yes 1393 _gl=no
1394 cc_check $_inc_x11 $_ld_x11 -lGL -lm && _gl=yes
1375 fi 1395 fi
1376 fi 1396 fi
1377 if test "$_gl" = yes ; then 1397 if test "$_gl" = yes ; then
1378 _ld_gl='-lGL' 1398 #FIXME ?? : bsd && test -r /usr/X11R6/bin/XFree86 && _ld_gl="-lGL $_ld_pthread"
1379 # FIXME check this for OpenBSD & BSD/OS
1380 # Under XFree86 4.x GL port is poorly designed
1381 bsd && test -r /usr/X11R6/bin/XFree86 && _ld_gl="-lGL $_ld_pthread"
1382 _def_gl='#define HAVE_GL 1' 1399 _def_gl='#define HAVE_GL 1'
1383 _vosrc="$_vosrc vo_gl.c vo_gl2.c" 1400 _vosrc="$_vosrc vo_gl.c vo_gl2.c"
1384 else 1401 else
1385 _def_gl='#undef HAVE_GL' 1402 _def_gl='#undef HAVE_GL'
1386 fi 1403 fi
1786 _mad=no 1803 _mad=no
1787 cat > $TMPC << EOF 1804 cat > $TMPC << EOF
1788 #include <mad.h> 1805 #include <mad.h>
1789 int main(void) { return 0; } 1806 int main(void) { return 0; }
1790 EOF 1807 EOF
1791 cc_check $_madlibdir -lmad && _mad=yes 1808 cc_check $_madlibdir -lmad && _mad=yes
1792 fi 1809 fi
1793 if test "$_mad" = yes ; then 1810 if test "$_mad" = yes ; then
1794 _def_mad='#define USE_LIBMAD 1' 1811 _def_mad='#define USE_LIBMAD 1'
1795 _ld_mad='-lmad' 1812 _ld_mad='-lmad'
1796 else 1813 else
1804 _vorbis=no 1821 _vorbis=no
1805 cat > $TMPC << EOF 1822 cat > $TMPC << EOF
1806 #include <vorbis/codec.h> 1823 #include <vorbis/codec.h>
1807 int main(void) { return 0; } 1824 int main(void) { return 0; }
1808 EOF 1825 EOF
1809 cc_check -lvorbis -lm && _vorbis=yes 1826 cc_check -lvorbis -logg -lm && _vorbis=yes
1810 fi 1827 fi
1811 if test "$_vorbis" = yes ; then 1828 if test "$_vorbis" = yes ; then
1812 _def_vorbis='#define HAVE_OGGVORBIS 1' 1829 _def_vorbis='#define HAVE_OGGVORBIS 1'
1813 _ld_vorbis='-lvorbis -lm' 1830 _ld_vorbis='-lvorbis -logg -lm'
1814 else 1831 else
1815 _def_vorbis='#undef HAVE_OGGVORBIS' 1832 _def_vorbis='#undef HAVE_OGGVORBIS'
1816 fi 1833 fi
1817 echores "$_vorbis" 1834 echores "$_vorbis"
1818 1835
2123 exitvar=1; 2140 exitvar=1;
2124 XCloseDisplay(wsDisplay); 2141 XCloseDisplay(wsDisplay);
2125 return exitvar; 2142 return exitvar;
2126 } 2143 }
2127 EOF 2144 EOF
2128 cc_check $_inc_x11 $_ld_x11 $_ld_sock && _xshape=yes 2145 cc_check $_inc_x11 $_ld_x11 && _xshape=yes
2129 fi 2146 fi
2130 if test "$_xshape" = yes ; then 2147 if test "$_xshape" = yes ; then
2131 _def_xshape='#define HAVE_XSHAPE 1' 2148 _def_xshape='#define HAVE_XSHAPE 1'
2132 else 2149 else
2133 die "the GUI requires the X11 extension XShape (which was not found)" 2150 die "the GUI requires the X11 extension XShape (which was not found)"
2266 STREAMING = $_streaming 2283 STREAMING = $_streaming
2267 2284
2268 VO2 = $_vo2 2285 VO2 = $_vo2
2269 2286
2270 X11_INC = $_inc_x11 2287 X11_INC = $_inc_x11
2271 X11DIR = $_ld_x11 2288 X11DIR = $_ld_static $_ld_x11
2272 X_LIBS = $_ld_x11 $_ld_extra $_ld_gl $_ld_ggi $_ld_dxr3 $_ld_sdl $_ld_dga $_ld_xv $_ld_vm $_ld_svga $_ld_png $_ld_sock $_ld_aa $_ld_vorbis $_ld_xinerama $_ld_mad $_ld_zlib 2289 X_LIBS = $_ld_static $_ld_x11 $_ld_extra $_ld_gl $_ld_ggi $_ld_dxr3 $_ld_sdl $_ld_dga $_ld_xv $_ld_vm $_ld_svga $_ld_png $_ld_sock $_ld_aa $_ld_vorbis $_ld_xinerama $_ld_mad $_ld_zlib
2273 2290
2274 TERMCAP_LIB = $_ld_termcap 2291 TERMCAP_LIB = $_ld_static $_ld_termcap
2275 LIRC_LIBS = $_ld_lirc 2292 LIRC_LIBS = $_ld_static $_ld_lirc
2276 CSS_USE = $_css 2293 CSS_USE = $_css
2277 CSS_LIB = $_ld_css 2294 CSS_LIB = $_ld_static $_ld_css
2278 SDL_INC = $_inc_sdl 2295 SDL_INC = $_inc_sdl
2279 W32_DEP = $_dep_win32 2296 W32_DEP = $_dep_win32
2280 W32_LIB = $_ld_win32 2297 W32_LIB = $_ld_static $_ld_win32
2281 DS_DEP = $_dep_dshow 2298 DS_DEP = $_dep_dshow
2282 DS_LIB = $_ld_dshow 2299 DS_LIB = $_ld_static $_ld_dshow
2283 AV_DEP = $_dep_libavcodec 2300 AV_DEP = $_dep_libavcodec
2284 AV_LIB = $_ld_libavcodec 2301 AV_LIB = $_ld_static $_ld_libavcodec
2285 ALSA_LIB = $ld__alsa 2302 ALSA_LIB = $ld__alsa
2286 SGI_AUDIO_LIB = $_ld_sgiaudio 2303 SGI_AUDIO_LIB = $_ld_sgiaudio
2287 ARCH_LIBS = $_ld_arch $_ld_iconv 2304 ARCH_LIBS = $_ld_static $_ld_arch $_ld_iconv
2288 DIVX4LINUX = $_divx4linux 2305 DIVX4LINUX = $_ld_static $_divx4linux
2289 DECORE_LIBS = $_ld_decore 2306 DECORE_LIBS = $_ld_static $_ld_decore
2290 ENCORE_LIBS = $_ld_encore 2307 ENCORE_LIBS = $_ld_static $_ld_encore
2291 HAVE_MLIB = $_mlib 2308 HAVE_MLIB = $_mlib
2292 MLIB_INC = $_inc_mlib 2309 MLIB_INC = $_inc_mlib
2293 MLIB_LIB = $_ld_mlib 2310 MLIB_LIB = $_ld_static $_ld_mlib
2294 MADLIB_LIB = $_madlibdir 2311 MADLIB_LIB = $_madlibdir
2295 STATIC = $_ld_static 2312 STATIC = $_ld_static
2296 2313
2297 # --- Some stuff for autoconfigure ---- 2314 # --- Some stuff for autoconfigure ----
2298 $_target_arch 2315 $_target_arch
2305 TARGET_SSE = $_sse 2322 TARGET_SSE = $_sse
2306 2323
2307 BINUTILS = $_binutils 2324 BINUTILS = $_binutils
2308 2325
2309 # --- GUI stuff --- 2326 # --- GUI stuff ---
2310 GTKLIB = $_ld_gtk 2327 GTKLIB = $_ld_static $_ld_gtk
2311 GLIBLIB = $_ld_glib 2328 GLIBLIB = $_ld_static $_ld_glib
2312 GUI_LIBS = $_ld_gui 2329 GUI_LIBS = $_ld_static $_ld_gui
2313 GUI = $_gui 2330 GUI = $_gui
2314 DEBUG = -DDEBUG 2331 DEBUG = -DDEBUG
2315 2332
2316 EOF 2333 EOF
2317 2334