Mercurial > mplayer.hg
comparison configure @ 2594:1486c690bece
added macros for weirdos (irix/sunos)
fixed some messages
rewrite OS names if necessary (irix/cygwin)
added mips known type
{sdl,sdl11,gtk,gtk12,glib,glib12}-config autodetection
author | pl |
---|---|
date | Wed, 31 Oct 2001 18:25:28 +0000 |
parents | 125af7039fcb |
children | c54ec3989d4f |
comparison
equal
deleted
inserted
replaced
2593:c9b4394a0675 | 2594:1486c690bece |
---|---|
127 echo >&2 | 127 echo >&2 |
128 rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP" | 128 rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP" |
129 exit 1 | 129 exit 1 |
130 } | 130 } |
131 | 131 |
132 linux() { | 132 linux() { test "$system_name" = "Linux" ; return "$?" ; } |
133 test "$system_name" = "Linux" | 133 sunos() { test "$system_name" = "SunOS" ; return "$?" ; } |
134 return "$?" | 134 irix() { test "$system_name" = "IRIX" ; return "$?" ; } |
135 } | 135 cygwin() { test "$system_name" = "CYGWIN" ; return "$?" ; } |
136 freebsd() { | 136 freebsd() { test "$system_name" = "FreeBSD" ; return "$?" ; } |
137 test "$system_name" = "FreeBSD" | 137 netbsd() { test "$system_name" = "NetBSD" ; return "$?" ; } |
138 return "$?" | 138 bsdos() { test "$system_name" = "BSD/OS" ; return "$?" ; } |
139 } | 139 openbsd() { test "$system_name" = "OpenBSD" ; return "$?" ; } |
140 openbsd() { | 140 bsd() { freebsd || netbsd || bsdos || openbsd ; return "$?" ; } |
141 test "$system_name" = "OpenBSD" | |
142 return "$?" | |
143 } | |
144 bsdos() { | |
145 test "$system_name" = "BSD/OS" | |
146 return "$?" | |
147 } | |
148 bsd() { | |
149 freebsd || openbsd || bsdos | |
150 return "$?" | |
151 } | |
152 irix64() { | |
153 test "$system_name" = "IRIX64" | |
154 return "$?" | |
155 } | |
156 | 141 |
157 | 142 |
158 # Check how echo works in this /bin/sh | 143 # Check how echo works in this /bin/sh |
159 case `echo -n` in | 144 case `echo -n` in |
160 -n) _echo_n= _echo_c='\c';; # seems to be a SysV echo | 145 -n) _echo_n= _echo_c='\c';; # seems to be a SysV echo |
213 --disable-alsa disable alsa sound support [autodetect] | 198 --disable-alsa disable alsa sound support [autodetect] |
214 --disable-esd disable esd sound support [autodetect] | 199 --disable-esd disable esd sound support [autodetect] |
215 --disable-sunaudio disable Sun sound support [autodetect] | 200 --disable-sunaudio disable Sun sound support [autodetect] |
216 --disable-mad disable mad audio support [autodetect] | 201 --disable-mad disable mad audio support [autodetect] |
217 | 202 |
218 Miscellaneous features: | 203 Miscellaneous options: |
219 --cc=COMPILER use this C compiler to build MPlayer [gcc] | 204 --cc=COMPILER use this C compiler to build MPlayer [gcc] |
220 --target=PLATFORM target platform (i386-linux, arm-linux, etc) | 205 --target=PLATFORM target platform (i386-linux, arm-linux, etc) |
221 --language=xx select a language [en] | 206 --language=xx select a language [en] |
222 (Available: $LANGUAGES) | 207 (Available: $LANGUAGES) |
223 --disable-select disable audio select() support (for example, required | 208 --disable-select disable audio select() support (for example, required |
324 | 309 |
325 EOF | 310 EOF |
326 | 311 |
327 # Determine our OS name and CPU architecture | 312 # Determine our OS name and CPU architecture |
328 if test -z "$_target" ; then | 313 if test -z "$_target" ; then |
329 system_name=`uname -s 2>&1` # name of operating system: Linux, FreeBSD, NetBSD, OpenBSD, SunOS | 314 # OS name |
330 host_arch=`uname -p 2>&1` # host's instruction set or processor type | 315 system_name=`( uname -s ) 2>&1` |
331 | 316 case "$system_name" in |
317 Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS) | |
318 : # well-known OSes | |
319 ;; | |
320 IRIX*) | |
321 system_name=IRIX | |
322 ;; | |
323 [cC][yY][gG][wW][iI][nN]*) | |
324 system_name=CYGWIN | |
325 ;; | |
326 *) | |
327 system_name="$system_name-UNKNOWN" | |
328 ;; | |
329 esac | |
330 | |
331 | |
332 # host's CPU/instruction set | |
333 host_arch=`( uname -p ) 2>&1` | |
332 case "$host_arch" in | 334 case "$host_arch" in |
333 i386|sparc|ppc|alpha|arm) | 335 i386|sparc|ppc|alpha|arm|mips) |
334 # fine, uname -p output looks good, it has returned | 336 # fine, uname -p output looks good, it has returned |
335 # something this configure script recognizes | 337 # something this configure script recognizes |
336 ;; | 338 ;; |
337 | 339 |
338 *) # uname -p on Linux returns 'unknown' for the processor type, | 340 *) # uname -p on Linux returns 'unknown' for the processor type, |
366 # Determine OS dependent libs | 368 # Determine OS dependent libs |
367 _confcygwin="TARGET_CYGWIN=no" | 369 _confcygwin="TARGET_CYGWIN=no" |
368 _confwin32= | 370 _confwin32= |
369 if bsd ; then | 371 if bsd ; then |
370 _archlibs="-rdynamic -pthread" | 372 _archlibs="-rdynamic -pthread" |
371 elif test `echo $system_name | sed 's/[cC][yY][gG][wW][iI][nN].*/CYGWIN/'` = "CYGWIN" ; then | 373 elif cygwin ; then |
372 _confcygwin="TARGET_CYGWIN=yes" | 374 _confcygwin="TARGET_CYGWIN=yes" |
373 _confwin32="#define WIN32" | 375 _confwin32="#define WIN32" |
374 _archlibs="-lpthread" | 376 _archlibs="-lpthread" |
375 else | 377 else |
376 _archlibs="-ldl -lpthread" | 378 _archlibs="-ldl -lpthread" |
393 | 395 |
394 # config files | 396 # config files |
395 CCONF='config.h' | 397 CCONF='config.h' |
396 MCONF='config.mak' | 398 MCONF='config.mak' |
397 CHELP='help_mp.h' | 399 CHELP='help_mp.h' |
398 # --- Check for C compiler: | |
399 | 400 |
400 if test -z "$_x11libdir" ; then | 401 if test -z "$_x11libdir" ; then |
401 for I in /usr/X11R6/lib /usr/X11/lib /usr/lib32 /usr/openwin/lib ; do | 402 for I in /usr/X11R6/lib /usr/X11/lib /usr/lib32 /usr/openwin/lib ; do |
402 if test -d "$I" ; then | 403 if test -d "$I" ; then |
403 _x11libdir="-L$I" | 404 _x11libdir="-L$I" |
430 if freebsd ; then | 431 if freebsd ; then |
431 _extralibdir=-L/usr/local/lib | 432 _extralibdir=-L/usr/local/lib |
432 _extraincdir=-I/usr/local/include | 433 _extraincdir=-I/usr/local/include |
433 fi | 434 fi |
434 | 435 |
435 if test -z "$_extralibdir" ; then | 436 test -z "$_extralibdir" && _extralibdir=-L/usr/lib |
436 _extralibdir=-L/usr/lib | 437 test -z "$_extraincdir" && _extraincdir=-I/usr/include |
437 fi | |
438 if test -z "$_extraincdir" ; then | |
439 _extraincdir=-I/usr/include | |
440 fi | |
441 | |
442 if test -z "$_sdlconfig" ; then | |
443 if freebsd ; then | |
444 _sdlconfig='sdl11-config' | |
445 else | |
446 _sdlconfig='sdl-config' | |
447 fi | |
448 fi | |
449 | 438 |
450 # --- | 439 # --- |
451 | 440 |
452 # Checking CC version... | 441 # Checking CC version... |
453 # gcc-3.0 merges optimizations coming from egcs, pgcc, agcc, ... | 442 # gcc-3.0 merges optimizations coming from egcs, pgcc, agcc, ... |
630 esac | 619 esac |
631 | 620 |
632 done | 621 done |
633 | 622 |
634 | 623 |
635 # XXX check codecs presence | 624 # Check for win32 codecs directory |
636 _win32libdir= | 625 _win32libdir= |
637 if test "$_win32" = yes ; then | 626 if test "$_win32" = yes ; then |
638 for I in /usr/local/lib/win32 /usr/lib/win32 ; do | 627 for I in /usr/local/lib/win32 /usr/lib/win32 ; do |
639 if test -d "$I" ; then | 628 if test -d "$I" ; then |
640 _win32libdir="$I" | 629 _win32libdir="$I" |
865 } | 854 } |
866 echo Using ... "$_mp_help" file | 855 echo Using ... "$_mp_help" file |
867 | 856 |
868 cc_check $_extraincdir $_extralibdir -lvgagl -lvga && _svga=yes | 857 cc_check $_extraincdir $_extralibdir -lvgagl -lvga && _svga=yes |
869 | 858 |
859 # Checking for posix threads lib... | |
870 if bsd ; then | 860 if bsd ; then |
871 cc_check -pthread || die "Lib pthread not found." | 861 cc_check -pthread || die "Lib pthread not found." |
872 else | 862 else |
873 cc_check -lpthread || die "Lib pthread not found." | 863 cc_check -lpthread || die "Lib pthread not found." |
864 fi | |
865 | |
866 | |
867 # Checking for SDL ... | |
868 if ( sdl-config --version ) >/dev/null 2>&1 ; then | |
869 _sdlconfig="sdl-config" | |
870 elif ( sdl11-config --version ) >/dev/null 2>&1 ; then | |
871 _sdlconfig="sdl11-config" | |
872 else | |
873 _sdlconfig=false | |
874 fi | 874 fi |
875 | 875 |
876 # Atmosfear: added SDL versioncheck and autodetect; removed warnings. | 876 # Atmosfear: added SDL versioncheck and autodetect; removed warnings. |
877 _sdl=no | 877 _sdl=no |
878 if "$_sdlconfig" --version >/dev/null 2>&1 ; then | 878 if "$_sdlconfig" --version >/dev/null 2>&1 ; then |
911 | 911 |
912 _termcap=no | 912 _termcap=no |
913 cc_check $_extraincdir $_extralibdir -ltermcap && _termcap=yes | 913 cc_check $_extraincdir $_extralibdir -ltermcap && _termcap=yes |
914 | 914 |
915 _png=no | 915 _png=no |
916 if irix64 ; then | 916 if irix ; then |
917 # Don't check for -lpng on irix since it has its own libpng | 917 # Don't check for -lpng on irix since it has its own libpng |
918 # incompatible with the GNU libpng | 918 # incompatible with the GNU libpng |
919 : | 919 : |
920 else | 920 else |
921 cc_check $_extraincdir $_extralibdir -lpng -lz -lm && _png=yes | 921 cc_check $_extraincdir $_extralibdir -lpng -lz -lm && _png=yes |
1793 # write conf files. | 1793 # write conf files. |
1794 | 1794 |
1795 if test "$_gui" = yes ; then | 1795 if test "$_gui" = yes ; then |
1796 # --------------- GUI begin ------------------- | 1796 # --------------- GUI begin ------------------- |
1797 | 1797 |
1798 test -z `which gtk-config` || _gtkconfig="gtk-config" | 1798 |
1799 test -z `which gtk12-config` || _gtkconfig="gtk12-config" | 1799 # Check for GTK: |
1800 test -z $_gtkconfig && die "gtk-config not found" | |
1801 | |
1802 test -z `which glib-config` || _glibconfig="glib-config" | |
1803 test -z `which glib12-config` || _glibconfig="glib12-config" | |
1804 test -z $_glibconfig && die "glib-config not found" | |
1805 | |
1806 echo | 1800 echo |
1807 #echo "gtk-config binary: $_gtkconfig" | |
1808 echo $_echo_n "Checking for gtk version ... $_echo_c" | 1801 echo $_echo_n "Checking for gtk version ... $_echo_c" |
1802 if ( gtk-config --version ) >/dev/null 2>&1 ; then | |
1803 _gtkconfig="gtk-config" | |
1804 elif ( gtk12-config --version ) >/dev/null 2>&1 ; then | |
1805 _gtkconfig="gtk12-config" | |
1806 else | |
1807 die "gtk not found (check for gtk-config or gtk12-config)" | |
1808 fi | |
1809 _gtk=`$_gtkconfig --version 2>&1` | 1809 _gtk=`$_gtkconfig --version 2>&1` |
1810 test -z "$_gtk" && die "gtk not found." | |
1811 echo "$_gtk" | 1810 echo "$_gtk" |
1812 | |
1813 echo $_echo_n "Checking for gtk includes ... $_echo_c" | |
1814 _gtkinc=`$_gtkconfig --cflags 2>&1` | 1811 _gtkinc=`$_gtkconfig --cflags 2>&1` |
1815 test -z "$_gtkinc" && die "gtk not found." | |
1816 echo "done" | |
1817 | |
1818 echo $_echo_n "Checking for gtk libs ... $_echo_c" | |
1819 _gtklib=`$_gtkconfig --libs 2>&1` | 1812 _gtklib=`$_gtkconfig --libs 2>&1` |
1820 test -z "$_gtklib" && die "gtk not found." | 1813 |
1821 echo "done" | 1814 |
1822 | 1815 # Check for GLIB |
1823 echo | 1816 echo |
1824 echo $_echo_n "Checking for glib version ... $_echo_c" | 1817 echo $_echo_n "Checking for glib version ... $_echo_c" |
1818 if ( glib-config --version ) >/dev/null 2>&1 ; then | |
1819 _glibconfig="glib-config" | |
1820 elif ( glib12-config --version ) >/dev/null 2>&1 ; then | |
1821 _glibconfig="glib12-config" | |
1822 else | |
1823 die "glib not found (check for glib-config or glib12-config)" | |
1824 fi | |
1825 _glib=`$_glibconfig --version 2>&1` | 1825 _glib=`$_glibconfig --version 2>&1` |
1826 test -z "$_glib" && die "glib not found." | |
1827 echo "$_glib" | 1826 echo "$_glib" |
1828 | |
1829 echo $_echo_n "Checking for glib includes ... $_echo_c" | |
1830 _glibinc=`$_glibconfig --cflags 2>&1` | 1827 _glibinc=`$_glibconfig --cflags 2>&1` |
1831 test -z "$_glibinc" && die "glib not found." | |
1832 echo "done" | |
1833 | |
1834 echo $_echo_n "Checking for glib libs ... $_echo_c" | |
1835 _gliblib=`$_glibconfig --libs 2>&1` | 1828 _gliblib=`$_glibconfig --libs 2>&1` |
1836 test -z "$_gliblib" && die "glib not found." | |
1837 echo "done" | |
1838 | 1829 |
1839 cat > Gui/config.mak << EOF | 1830 cat > Gui/config.mak << EOF |
1840 | 1831 |
1841 # -------- Generated by ./configure ----------- | 1832 # -------- Generated by ./configure ----------- |
1842 | 1833 |
2772 else | 2763 else |
2773 if test "$_win32libdir" ; then | 2764 if test "$_win32libdir" ; then |
2774 echo "Ok, found Win32 codecs directory at $_win32libdir." | 2765 echo "Ok, found Win32 codecs directory at $_win32libdir." |
2775 else | 2766 else |
2776 cat <<EOF | 2767 cat <<EOF |
2777 Failed to find a WIN32 codecs dir at $_win32libdir! | 2768 Failed to find a WIN32 codecs dir! |
2778 Create it and copy the DLL files there! (You can get them from your windows | 2769 Create it and copy the DLL files there! (You can get them from your windows |
2779 directory or download them from: | 2770 directory or download them from: |
2780 ftp://ftp.MPlayerHQ.hu/MPlayer/releases/w32codec.zip | 2771 ftp://ftp.MPlayerHQ.hu/MPlayer/releases/w32codec.zip |
2781 EOF | 2772 EOF |
2782 fi | 2773 fi |