Commit 44abaa7c authored by Sam Hocevar's avatar Sam Hocevar

  * Added gprof profiling support with --enable-profiling.

    It works at last! configure with --enable-profiling, build, run
 vlc (you may want to add --noaudio, it currently segfaults with sound
 here) and launch "gprof vlc" when finished.

    To make gprof work with multithreaded programs, one needs to set the
 internal ITIMER_PROF timer for each new thread launched. I did this
 through a wrapper in vlc_thread_create (see include/threads.h).
parent cff6378d
......@@ -4,6 +4,7 @@
HEAD
* Added gprof profiling support with --enable-profiling.
* Fully working Windows DVD ioctl support by Jon Lech Johansen.
* DirectX enhancements by Gildas Bazin, such as software rendering.
* Merged dvdcss_init and dvdcss_open into dvdcss_open, and dvdcss_close
......
......@@ -35,6 +35,7 @@ ARCH = @ARCH@
DEBUG = @DEBUG@
STATS = @STATS@
TRACE = @TRACE@
PROFILING = @PROFILING@
OPTIMS = @OPTIMS@
GETOPT = @GETOPT@
......@@ -107,6 +108,10 @@ ifeq ($(TRACE),1)
PROGRAM_OPTIONS += TRACE
DEFINE += -DTRACE
endif
ifeq ($(PROFILING),1)
PROGRAM_OPTIONS += PROFILING
DEFINE += -DPROFILING
endif
ifeq ($(STATS),1)
PROGRAM_OPTIONS += STATS
DEFINE += -DSTATS
......@@ -196,8 +201,10 @@ ifeq ($(OPTIMS),1)
CFLAGS += -O3
CFLAGS += -ffast-math -funroll-loops
ifneq ($(DEBUG),1)
ifneq ($(PROFILING),1)
CFLAGS += -fomit-frame-pointer
endif
endif
# Optimizations for x86 familiy
ifneq (,$(findstring 86,$(ARCH)))
......@@ -259,3 +266,7 @@ ifeq ($(DEBUG),1)
CFLAGS += -g
endif
ifeq ($(PROFILING),1)
CFLAGS += -pg
endif
......@@ -11,24 +11,26 @@
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
--enable-pth Enable GNU Pth support (default disabled)"
ac_help="$ac_help
--disable-ppro Disable PentiumPro optimizations (default enabled for x86)"
ac_help="$ac_help
--disable-mmx Disable MMX optimizations (default enabled for x86)"
ac_help="$ac_help
--enable-altivec Enable altivec optimizations (default disabled since it is broken)"
ac_help="$ac_help
--disable-css Disable DVD CSS decryption (default enabled)"
ac_help="$ac_help
--enable-debug Enable debug mode (default disabled)"
ac_help="$ac_help
--enable-stats Enable printing of statistics (default disabled)"
ac_help="$ac_help
--enable-trace Enable trace mode (default disabled)"
ac_help="$ac_help
--enable-profiling Enable gprof profiling (default disabled)"
ac_help="$ac_help
--disable-optimizations Disable compiler optimizations (default enabled)"
ac_help="$ac_help
--enable-pth Enable GNU Pth support (default disabled)"
ac_help="$ac_help
--disable-css Disable DVD CSS decryption (default enabled)"
ac_help="$ac_help
--disable-dummy dummy module (default enabled)"
ac_help="$ac_help
......@@ -607,7 +609,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:611: checking host system type" >&5
echo "configure:613: checking host system type" >&5
host_alias=$host
case "$host_alias" in
......@@ -636,7 +638,7 @@ VLC_CODENAME=Ourumov
save_CFLAGS="${CFLAGS}"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:640: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo "configure:642: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -665,7 +667,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:669: checking for $ac_word" >&5
echo "configure:671: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -695,7 +697,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:699: checking for $ac_word" >&5
echo "configure:701: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -746,7 +748,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:750: checking for $ac_word" >&5
echo "configure:752: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -778,7 +780,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:782: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
echo "configure:784: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
......@@ -789,12 +791,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
#line 793 "configure"
#line 795 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
......@@ -820,12 +822,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:824: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:826: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:829: checking whether we are using GNU C" >&5
echo "configure:831: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -834,7 +836,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
......@@ -853,7 +855,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:857: checking whether ${CC-cc} accepts -g" >&5
echo "configure:859: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -885,7 +887,7 @@ else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:889: checking how to run the C preprocessor" >&5
echo "configure:891: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
......@@ -900,13 +902,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 904 "configure"
#line 906 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
......@@ -917,13 +919,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 921 "configure"
#line 923 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
......@@ -934,13 +936,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 938 "configure"
#line 940 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
......@@ -967,7 +969,7 @@ echo "$ac_t""$CPP" 1>&6
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:971: checking for $ac_word" >&5
echo "configure:973: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -1007,7 +1009,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:1011: checking for a BSD compatible install" >&5
echo "configure:1013: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -1061,12 +1063,12 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:1065: checking for working const" >&5
echo "configure:1067: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1070 "configure"
#line 1072 "configure"
#include "confdefs.h"
int main() {
......@@ -1115,7 +1117,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
if { (eval echo configure:1119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
......@@ -1138,14 +1140,14 @@ fi
if test x${cross_compiling} != xyes; then
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
echo "configure:1142: checking whether byte ordering is bigendian" >&5
echo "configure:1144: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
#line 1149 "configure"
#line 1151 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
......@@ -1156,11 +1158,11 @@ int main() {
#endif
; return 0; }
EOF
if { (eval echo configure:1160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
#line 1164 "configure"
#line 1166 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
......@@ -1171,7 +1173,7 @@ int main() {
#endif
; return 0; }
EOF
if { (eval echo configure:1175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
......@@ -1191,7 +1193,7 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
#line 1195 "configure"
#line 1197 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
......@@ -1204,7 +1206,7 @@ main () {
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
if { (eval echo configure:1208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:1210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
......@@ -1232,12 +1234,12 @@ fi
for ac_func in gettimeofday select strerror strtod strtol
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1236: checking for $ac_func" >&5
echo "configure:1238: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1241 "configure"
#line 1243 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
......@@ -1260,7 +1262,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:1264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
......@@ -1287,12 +1289,12 @@ done
for ac_func in setenv putenv
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1291: checking for $ac_func" >&5
echo "configure:1293: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1296 "configure"
#line 1298 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
......@@ -1315,7 +1317,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:1319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
......@@ -1340,12 +1342,12 @@ fi
done
echo $ac_n "checking for connect""... $ac_c" 1>&6
echo "configure:1344: checking for connect" >&5
echo "configure:1346: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1349 "configure"
#line 1351 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
......@@ -1368,7 +1370,7 @@ connect();
; return 0; }
EOF
if { (eval echo configure:1372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_connect=yes"
else
......@@ -1387,7 +1389,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
echo "configure:1391: checking for connect in -lsocket" >&5
echo "configure:1393: checking for connect in -lsocket" >&5
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -1395,7 +1397,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1399 "configure"
#line 1401 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -1406,7 +1408,7 @@ int main() {
connect()
; return 0; }
EOF
if { (eval echo configure:1410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -1430,12 +1432,12 @@ fi
fi
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
echo "configure:1434: checking for gethostbyname" >&5
echo "configure:1436: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1439 "configure"
#line 1441 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
......@@ -1458,7 +1460,7 @@ gethostbyname();
; return 0; }
EOF
if { (eval echo configure:1462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gethostbyname=yes"
else
......@@ -1477,7 +1479,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
echo "configure:1481: checking for gethostbyname in -lnsl" >&5
echo "configure:1483: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -1485,7 +1487,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1489 "configure"
#line 1491 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -1496,7 +1498,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
if { (eval echo configure:1500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -1520,12 +1522,12 @@ fi
fi
echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
echo "configure:1524: checking for nanosleep" >&5
echo "configure:1526: checking for nanosleep" >&5
if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1529 "configure"
#line 1531 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char nanosleep(); below. */
......@@ -1548,7 +1550,7 @@ nanosleep();
; return 0; }
EOF
if { (eval echo configure:1552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_nanosleep=yes"
else
......@@ -1567,7 +1569,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
echo "configure:1571: checking for nanosleep in -lrt" >&5
echo "configure:1573: checking for nanosleep in -lrt" >&5
ac_lib_var=`echo rt'_'nanosleep | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -1575,7 +1577,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lrt $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1579 "configure"
#line 1581 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -1586,7 +1588,7 @@ int main() {
nanosleep()
; return 0; }
EOF
if { (eval echo configure:1590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -1606,7 +1608,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
echo "configure:1610: checking for nanosleep in -lposix4" >&5
echo "configure:1612: checking for nanosleep in -lposix4" >&5
ac_lib_var=`echo posix4'_'nanosleep | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -1614,7 +1616,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lposix4 $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1618 "configure"
#line 1620 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -1625,7 +1627,7 @@ int main() {
nanosleep()
; return 0; }
EOF
if { (eval echo configure:1629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -1654,12 +1656,12 @@ fi
for ac_func in usleep
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1658: checking for $ac_func" >&5
echo "configure:1660: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1663 "configure"
#line 1665 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
......@@ -1682,7 +1684,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:1686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
......@@ -1707,12 +1709,12 @@ fi
done
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
echo "configure:1711: checking for inet_aton" >&5
echo "configure:1713: checking for inet_aton" >&5
if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1716 "configure"
#line 1718 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char inet_aton(); below. */
......@@ -1735,7 +1737,7 @@ inet_aton();
; return 0; }
EOF
if { (eval echo configure:1739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_inet_aton=yes"
else
......@@ -1754,7 +1756,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
echo "configure:1758: checking for inet_aton in -lresolv" >&5
echo "configure:1760: checking for inet_aton in -lresolv" >&5
ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -1762,7 +1764,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1766 "configure"
#line 1768 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -1773,7 +1775,7 @@ int main() {
inet_aton()
; return 0; }
EOF
if { (eval echo configure:1777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -1799,12 +1801,12 @@ fi
for ac_func in vasprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1803: checking for $ac_func" >&5
echo "configure:1805: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1808 "configure"
#line 1810 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
......@@ -1827,7 +1829,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:1831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
......@@ -1854,12 +1856,12 @@ done
for ac_func in swab
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1858: checking for $ac_func" >&5
echo "configure:1860: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1863 "configure"
#line 1865 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
......@@ -1882,7 +1884,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:1886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
......@@ -1910,12 +1912,12 @@ done
for ac_func in sigrelse
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1914: checking for $ac_func" >&5
echo "configure:1916: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1919 "configure"
#line 1921 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
......@@ -1938,7 +1940,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:1942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
......@@ -1964,12 +1966,12 @@ done
echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
echo "configure:1968: checking for getopt_long" >&5
echo "configure:1970: checking for getopt_long" >&5
if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1973 "configure"
#line 1975 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char getopt_long(); below. */
......@@ -1992,7 +1994,7 @@ getopt_long();
; return 0; }
EOF
if { (eval echo configure:1996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_getopt_long=yes"
else
......@@ -2014,7 +2016,7 @@ else
echo "$ac_t""no" 1>&6
# FreeBSD has a gnugetopt library for this:
echo $ac_n "checking for getopt_long in -lgnugetopt""... $ac_c" 1>&6
echo "configure:2018: checking for getopt_long in -lgnugetopt" >&5
echo "configure:2020: checking for getopt_long in -lgnugetopt" >&5
ac_lib_var=`echo gnugetopt'_'getopt_long | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -2022,7 +2024,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgnugetopt $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2026 "configure"
#line 2028 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -2033,7 +2035,7 @@ int main() {
getopt_long()
; return 0; }
EOF
if { (eval echo configure:2037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -2065,17 +2067,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2069: checking for $ac_hdr" >&5
echo "configure:2071: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2074 "configure"
#line 2076 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2104,12 +2106,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2108: checking for $ac_func" >&5
echo "configure:2110: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2113 "configure"
#line 2115 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
......@@ -2132,7 +2134,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:2136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
......@@ -2157,7 +2159,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
echo "configure:2161: checking for working mmap" >&5
echo "configure:2163: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -2165,7 +2167,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
#line 2169 "configure"
#line 2171 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
......@@ -2305,7 +2307,7 @@ main()
}
EOF
if { (eval echo configure:2309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
......@@ -2328,12 +2330,12 @@ EOF
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:2332: checking return type of signal handlers" >&5
echo "configure:2334: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2337 "configure"
#line 2339 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
......@@ -2350,7 +2352,7 @@ int main() {
int i;
; return 0; }
EOF
if { (eval echo configure:2354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
......@@ -2369,7 +2371,7 @@ EOF
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:2373: checking for dlopen in -ldl" >&5
echo "configure:2375: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -2377,7 +2379,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2381 "configure"
#line 2383 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -2388,7 +2390,7 @@ int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:2392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -2409,7 +2411,7 @@ else
fi
echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
echo "configure:2413: checking for pow in -lm" >&5
echo "configure:2415: checking for pow in -lm" >&5
ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -2417,7 +2419,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2421 "configure"
#line 2423 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -2428,7 +2430,7 @@ int main() {
pow()
; return 0; }
EOF
if { (eval echo configure:2432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -2454,7 +2456,7 @@ CFLAGS="${CFLAGS} -I/usr/local/include"
PTHREAD_LIBS=error
echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6
echo "configure:2458: checking for pthread_attr_init in -lpthread" >&5
echo "configure:2460: checking for pthread_attr_init in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -2462,7 +2464,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2466 "configure"
#line 2468 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -2473,7 +2475,7 @@ int main() {
pthread_attr_init()
; return 0; }
EOF
if { (eval echo configure:2477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -2495,7 +2497,7 @@ fi
if test "x${THREAD_LIB}" = xerror; then
echo $ac_n "checking for pthread_attr_init in -lpthreads""... $ac_c" 1>&6
echo "configure:2499: checking for pthread_attr_init in -lpthreads" >&5
echo "configure:2501: checking for pthread_attr_init in -lpthreads" >&5
ac_lib_var=`echo pthreads'_'pthread_attr_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -2503,7 +2505,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthreads $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2507 "configure"
#line 2509 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -2514,7 +2516,7 @@ int main() {
pthread_attr_init()
; return 0; }
EOF
if { (eval echo configure:2518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -2537,7 +2539,7 @@ fi
fi
if test "x${THREAD_LIB}" = xerror; then
echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6
echo "configure:2541: checking for pthread_attr_init in -lc_r" >&5
echo "configure:2543: checking for pthread_attr_init in -lc_r" >&5
ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -2545,7 +2547,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lc_r $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2549 "configure"
#line 2551 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -2556,7 +2558,7 @@ int main() {
pthread_attr_init()
; return 0; }
EOF
if { (eval echo configure:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -2580,12 +2582,12 @@ fi
if test "x${THREAD_LIB}" = xerror; then
THREAD_LIBS=""
echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6
echo "configure:2584: checking for pthread_attr_init" >&5
echo "configure:2586: checking for pthread_attr_init" >&5
if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_init'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2589 "configure"
#line 2591 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char pthread_attr_init(); below. */
......@@ -2608,7 +2610,7 @@ pthread_attr_init();
; return 0; }
EOF
if { (eval echo configure:2612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_pthread_attr_init=yes"
else
......@@ -2630,7 +2632,7 @@ fi
fi
cat > conftest.$ac_ext <<EOF
#line 2634 "configure"
#line 2636 "configure"
#include "confdefs.h"
#include <pthread.h>
EOF
......@@ -2646,7 +2648,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
#line 2650 "configure"
#line 2652 "configure"
#include "confdefs.h"
#include <strings.h>
EOF
......@@ -2666,17 +2668,17 @@ for ac_hdr in stddef.h getopt.h strings.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2670: checking for $ac_hdr" >&5
echo "configure:2672: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2675 "configure"
#line 2677 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2706,17 +2708,17 @@ for ac_hdr in sys/sockio.h fcntl.h sys/time.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2710: checking for $ac_hdr" >&5
echo "configure:2712: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2715 "configure"
#line 2717 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2746,17 +2748,17 @@ for ac_hdr in sys/soundcard.h machine/soundcard.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2750: checking for $ac_hdr" >&5
echo "configure:2752: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2755 "configure"
#line 2757 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2786,17 +2788,17 @@ for ac_hdr in dlfcn.h image.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2790: checking for $ac_hdr" >&5
echo "configure:2792: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2795 "configure"
#line 2797 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2826,17 +2828,17 @@ for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2830: checking for $ac_hdr" >&5
echo "configure:2832: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2835 "configure"
#line 2837 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2866,17 +2868,17 @@ for ac_hdr in machine/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2870: checking for $ac_hdr" >&5
echo "configure:2872: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2875 "configure"
#line 2877 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2907,17 +2909,17 @@ for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2911: checking for $ac_hdr" >&5
echo "configure:2913: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2916 "configure"
#line 2918 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2946,9 +2948,9 @@ done
CFLAGS="${save_CFLAGS} -Wall -Werror"
echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
echo "configure:2950: checking for ntohl in sys/param.h" >&5
echo "configure:2952: checking for ntohl in sys/param.h" >&5
cat > conftest.$ac_ext <<EOF
#line 2952 "configure"
#line 2954 "configure"
#include "confdefs.h"
#include <sys/param.h>
void foo() { int meuh; ntohl(meuh); }
......@@ -2956,7 +2958,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:2960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define NTOHL_IN_SYS_PARAM_H 1
......@@ -2973,16 +2975,16 @@ rm -f conftest*
CFLAGS="${save_CFLAGS} -bundle -undefined suppress"
echo $ac_n "checking if \$CC compiles plugins with -bundle -undefined suppress""... $ac_c" 1>&6
echo "configure:2977: checking if \$CC compiles plugins with -bundle -undefined suppress" >&5
echo "configure:2979: checking if \$CC compiles plugins with -bundle -undefined suppress" >&5
cat > conftest.$ac_ext <<EOF
#line 2979 "configure"
#line 2981 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:2986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
PLCFLAGS="${PLCFLAGS} -bundle -undefined suppress"; echo "$ac_t""yes" 1>&6
else
......@@ -2995,16 +2997,16 @@ rm -f conftest*
CFLAGS="${save_CFLAGS} -shared"
echo $ac_n "checking if \$CC compiles plugins with -shared""... $ac_c" 1>&6
echo "configure:2999: checking if \$CC compiles plugins with -shared" >&5
echo "configure:3001: checking if \$CC compiles plugins with -shared" >&5
cat > conftest.$ac_ext <<EOF
#line 3001 "configure"
#line 3003 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:3008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
PLCFLAGS="${PLCFLAGS} -shared"; echo "$ac_t""yes" 1>&6
else
......@@ -3018,9 +3020,9 @@ rm -f conftest*
CFLAGS="${save_CFLAGS}"
echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
echo "configure:3022: checking for boolean_t in sys/types.h" >&5
echo "configure:3024: checking for boolean_t in sys/types.h" >&5
cat > conftest.$ac_ext <<EOF
#line 3024 "configure"
#line 3026 "configure"
#include "confdefs.h"
#include <sys/types.h>
void quux() { boolean_t foo; }
......@@ -3028,7 +3030,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:3032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define BOOLEAN_T_IN_SYS_TYPES_H 1
......@@ -3043,9 +3045,9 @@ else
fi
rm -f conftest*
echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
echo "configure:3047: checking for boolean_t in pthread.h" >&5
echo "configure:3049: checking for boolean_t in pthread.h" >&5
cat > conftest.$ac_ext <<EOF
#line 3049 "configure"
#line 3051 "configure"
#include "confdefs.h"
#include <pthread.h>
void quux() { boolean_t foo; }
......@@ -3053,7 +3055,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:3057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define BOOLEAN_T_IN_PTHREAD_H 1
......@@ -3069,12 +3071,12 @@ fi
rm -f conftest*
echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:3073: checking for working const" >&5
echo "configure:3075: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3078 "configure"
#line 3080 "configure"
#include "confdefs.h"
int main() {
......@@ -3123,7 +3125,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
if { (eval echo configure:3127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
......@@ -3144,12 +3146,12 @@ EOF
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:3148: checking for ANSI C header files" >&5
echo "configure:3150: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3153 "configure"
#line 3155 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
......@@ -3157,7 +3159,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -3174,7 +3176,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 3178 "configure"
#line 3180 "configure"
#include "confdefs.h"
#include <string.h>
EOF
......@@ -3192,7 +3194,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 3196 "configure"
#line 3198 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
......@@ -3213,7 +3215,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 3217 "configure"
#line 3219 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
......@@ -3224,7 +3226,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:3228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
......@@ -3248,12 +3250,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:3252: checking for size_t" >&5
echo "configure:3254: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3257 "configure"
#line 3259 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
......@@ -3281,12 +3283,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:3285: checking whether time.h and sys/time.h may both be included" >&5
echo "configure:3287: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3290 "configure"
#line 3292 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
......@@ -3295,7 +3297,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
if { (eval echo configure:3299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
......@@ -3333,16 +3335,16 @@ case x$host_os in
esac
echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
echo "configure:3337: checking if \$CC groks MMX inline assembly" >&5
echo "configure:3339: checking if \$CC groks MMX inline assembly" >&5
cat > conftest.$ac_ext <<EOF
#line 3339 "configure"
#line 3341 "configure"
#include "confdefs.h"
void quux(){void *p;asm("packuswb %%mm1,%%mm2"::"r"(p));}
int main() {
; return 0; }
EOF
if { (eval echo configure:3346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
echo "$ac_t""yes" 1>&6
......@@ -3355,16 +3357,16 @@ fi
rm -f conftest*
echo $ac_n "checking if \$CC groks MMX EXT or SSE inline assembly""... $ac_c" 1>&6
echo "configure:3359: checking if \$CC groks MMX EXT or SSE inline assembly" >&5
echo "configure:3361: checking if \$CC groks MMX EXT or SSE inline assembly" >&5
cat > conftest.$ac_ext <<EOF
#line 3361 "configure"
#line 3363 "configure"
#include "confdefs.h"
void quux(){void *p;asm("maskmovq %%mm1,%%mm2"::"r"(p));}
int main() {
; return 0; }
EOF
if { (eval echo configure:3368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
echo "$ac_t""yes" 1>&6
......@@ -3381,17 +3383,17 @@ for ac_hdr in winioctl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3385: checking for $ac_hdr" >&5
echo "configure:3387: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3390 "configure"
#line 3392 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -3424,17 +3426,17 @@ for ac_hdr in sys/ioctl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3428: checking for $ac_hdr" >&5
echo "configure:3430: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3433 "configure"
#line 3435 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -3460,17 +3462,17 @@ EOF
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3464: checking for $ac_hdr" >&5
echo "configure:3466: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3469 "configure"
#line 3471 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -3498,7 +3500,7 @@ done
BSD_DVD_STRUCT=0
cat > conftest.$ac_ext <<EOF
#line 3502 "configure"
#line 3504 "configure"
#include "confdefs.h"
#include <sys/dvdio.h>
EOF
......@@ -3516,7 +3518,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
#line 3520 "configure"
#line 3522 "configure"
#include "confdefs.h"
#include <sys/cdio.h>
EOF
......@@ -3540,7 +3542,7 @@ EOF
fi
cat > conftest.$ac_ext <<EOF
#line 3544 "configure"
#line 3546 "configure"
#include "confdefs.h"
#include <linux/cdrom.h>
EOF
......@@ -3563,12 +3565,80 @@ fi
done
# Check whether --enable-ppro or --disable-ppro was given.
if test "${enable_ppro+set}" = set; then
enableval="$enable_ppro"
if test x$enableval = xyes; then ARCH="${ARCH} ppro"; fi
else
if test x${host_cpu} = xi686; then ARCH="${ARCH} ppro"; fi
fi
# Check whether --enable-mmx or --disable-mmx was given.
if test "${enable_mmx+set}" = set; then
enableval="$enable_mmx"
if test x$enableval = xyes; then ARCH="${ARCH} mmx";
BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi
else
if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86 -o x${host_cpu} = xi386; then ARCH="${ARCH} mmx";
BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi
fi
# Check whether --enable-altivec or --disable-altivec was given.
if test "${enable_altivec+set}" = set; then
enableval="$enable_altivec"
if test x$enableval = xyes; then ARCH="${ARCH} altivec";
BUILTINS="${BUILTINS} idctaltivec"
LIB_IDCTALTIVEC="-framework vecLib"
fi
fi
#[ if test -d /System/Library/Frameworks/vecLib.framework; then ARCH="${ARCH} altivec"; PLUGINS="${PLUGINS} idctaltivec"; fi ])
# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
enableval="$enable_debug"
if test x$enableval = xyes; then DEBUG=1; fi
fi
# Check whether --enable-stats or --disable-stats was given.
if test "${enable_stats+set}" = set; then
enableval="$enable_stats"
if test x$enableval = xyes; then STATS=1; fi
fi
# Check whether --enable-trace or --disable-trace was given.
if test "${enable_trace+set}" = set; then
enableval="$enable_trace"
if test x$enableval = xyes; then TRACE=1; fi
fi
# Check whether --enable-profiling or --disable-profiling was given.
if test "${enable_profiling+set}" = set; then
enableval="$enable_profiling"
if test x$enableval = xyes; then PROFILING=1; fi
fi
# Check whether --enable-optimizations or --disable-optimizations was given.
if test "${enable_optimizations+set}" = set; then
enableval="$enable_optimizations"
if test x$enableval = xno; then OPTIMS=0; fi
else
OPTIMS=1
fi
# Check whether --enable-pth or --disable-pth was given.
if test "${enable_pth+set}" = set; then
enableval="$enable_pth"
if test x$enableval = xyes; then
echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
echo "configure:3572: checking for pth_init in -lpth" >&5
echo "configure:3642: checking for pth_init in -lpth" >&5
ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -3576,7 +3646,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpth $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3580 "configure"
#line 3650 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -3587,7 +3657,7 @@ int main() {
pth_init()
; return 0; }
EOF
if { (eval echo configure:3591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -3615,7 +3685,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
#line 3619 "configure"
#line 3689 "configure"
#include "confdefs.h"
#include <pth.h>
EOF
......@@ -3638,37 +3708,6 @@ fi
LIB="${LIB} ${THREAD_LIB}"
# Check whether --enable-ppro or --disable-ppro was given.
if test "${enable_ppro+set}" = set; then
enableval="$enable_ppro"
if test x$enableval = xyes; then ARCH="${ARCH} ppro"; fi
else
if test x${host_cpu} = xi686; then ARCH="${ARCH} ppro"; fi
fi
# Check whether --enable-mmx or --disable-mmx was given.
if test "${enable_mmx+set}" = set; then
enableval="$enable_mmx"
if test x$enableval = xyes; then ARCH="${ARCH} mmx";
BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi
else
if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86 -o x${host_cpu} = xi386; then ARCH="${ARCH} mmx";
BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi
fi
# Check whether --enable-altivec or --disable-altivec was given.
if test "${enable_altivec+set}" = set; then
enableval="$enable_altivec"
if test x$enableval = xyes; then ARCH="${ARCH} altivec";
BUILTINS="${BUILTINS} idctaltivec"
LIB_IDCTALTIVEC="-framework vecLib"
fi
fi
#[ if test -d /System/Library/Frameworks/vecLib.framework; then ARCH="${ARCH} altivec"; PLUGINS="${PLUGINS} idctaltivec"; fi ])
# Check whether --enable-css or --disable-css was given.
if test "${enable_css+set}" = set; then
enableval="$enable_css"
......@@ -3682,51 +3721,21 @@ if test x${CSS} = x1; then cat >> confdefs.h <<\EOF
EOF
fi
# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
enableval="$enable_debug"
if test x$enableval = xyes; then DEBUG=1; fi
fi
# Check whether --enable-stats or --disable-stats was given.
if test "${enable_stats+set}" = set; then
enableval="$enable_stats"
if test x$enableval = xyes; then STATS=1; fi
fi
# Check whether --enable-trace or --disable-trace was given.
if test "${enable_trace+set}" = set; then
enableval="$enable_trace"
if test x$enableval = xyes; then TRACE=1; fi
fi
# Check whether --enable-optimizations or --disable-optimizations was given.
if test "${enable_optimizations+set}" = set; then
enableval="$enable_optimizations"
if test x$enableval = xno; then OPTIMS=0; fi
else
OPTIMS=1
fi
for ac_hdr in videolan/dvdcss.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3720: checking for $ac_hdr" >&5
echo "configure:3729: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3725 "configure"
#line 3734 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -3817,7 +3826,7 @@ if test "${enable_esd+set}" = set; then
# Extract the first word of "esd-config", so it can be a program name with args.
set dummy esd-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3821: checking for $ac_word" >&5
echo "configure:3830: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -3882,17 +3891,17 @@ else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3886: checking for $ac_hdr" >&5
echo "configure:3895: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3891 "configure"
#line 3900 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -3963,17 +3972,17 @@ if test "${with_sdl+set}" = set; then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3967: checking for $ac_hdr" >&5
echo "configure:3976: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3972 "configure"
#line 3981 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -4011,17 +4020,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4015: checking for $ac_hdr" >&5
echo "configure:4024: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4020 "configure"
#line 4029 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -4065,17 +4074,17 @@ if test "${with_directx+set}" = set; then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4069: checking for $ac_hdr" >&5
echo "configure:4078: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4074 "configure"
#line 4083 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -4113,17 +4122,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4117: checking for $ac_hdr" >&5
echo "configure:4126: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4122 "configure"
#line 4131 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -4223,7 +4232,7 @@ if test x$enable_gtk != xno; then
# Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4227: checking for $ac_word" >&5
echo "configure:4236: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -4283,17 +4292,17 @@ if test x$enable_x11 != xno; then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4287: checking for $ac_hdr" >&5
echo "configure:4296: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4292 "configure"
#line 4301 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -4345,17 +4354,17 @@ if test x$enable_xvideo != xno; then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4349: checking for $ac_hdr" >&5
echo "configure:4358: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4354 "configure"
#line 4363 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -4393,17 +4402,17 @@ if test "${enable_alsa+set}" = set; then
enableval="$enable_alsa"
if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
echo "configure:4397: checking for sys/asoundlib.h" >&5
echo "configure:4406: checking for sys/asoundlib.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4402 "configure"
#line 4411 "configure"
#include "confdefs.h"
#include <sys/asoundlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -4420,7 +4429,7 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
echo "configure:4424: checking for main in -lasound" >&5
echo "configure:4433: checking for main in -lasound" >&5
ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -4428,14 +4437,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lasound $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4432 "configure"
#line 4441 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:4439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -4514,6 +4523,7 @@ fi
trap '' 1 2 15
......@@ -4677,6 +4687,7 @@ s%@DEBUG@%$DEBUG%g
s%@STATS@%$STATS%g
s%@ASM@%$ASM%g
s%@TRACE@%$TRACE%g
s%@PROFILING@%$PROFILING%g
s%@OPTIMS@%$OPTIMS%g
s%@CSS@%$CSS%g
s%@MOC@%$MOC%g
......@@ -4942,6 +4953,7 @@ vlc version : ${VLC_VERSION}
debug mode : ${DEBUG}
statistics : ${STATS}
trace mode : ${TRACE}
profiling : ${PROFILING}
need builtin getopt : ${GETOPT}
built-in modules :${BUILTINS}
plugin modules :${PLUGINS}
......
......@@ -217,22 +217,6 @@ AC_CHECK_HEADERS(sys/ioctl.h,[
])
])
dnl
dnl GNU portable threads
dnl
AC_ARG_ENABLE(pth,
[ --enable-pth Enable GNU Pth support (default disabled)],
[ if test x$enableval = xyes; then
AC_CHECK_LIB(pth,pth_init)
AC_EGREP_HEADER(pth_init,pth.h,[
AC_DEFINE(PTH_INIT_IN_PTH_H, 1,
Define if <pth.h> defines pth_init)
THREAD_LIB="-lpth"
fi])
])
LIB="${LIB} ${THREAD_LIB}"
dnl
dnl PentiumPro acceleration
dnl
......@@ -262,14 +246,6 @@ AC_ARG_ENABLE(altivec,
fi ])
#[ if test -d /System/Library/Frameworks/vecLib.framework; then ARCH="${ARCH} altivec"; PLUGINS="${PLUGINS} idctaltivec"; fi ])
dnl
dnl CSS DVD decryption
dnl
AC_ARG_ENABLE(css,
[ --disable-css Disable DVD CSS decryption (default enabled)],
[ if test x$enableval = xyes; then CSS=1; else CSS=0; fi ], [ CSS=1; ])
if test x${CSS} = x1; then AC_DEFINE(HAVE_CSS, 1, Define if you want DVD CSS decryption.) fi
dnl
dnl Debugging mode
dnl
......@@ -291,6 +267,13 @@ AC_ARG_ENABLE(trace,
[ --enable-trace Enable trace mode (default disabled)],
[ if test x$enableval = xyes; then TRACE=1; fi ])
dnl
dnl Trace mode
dnl
AC_ARG_ENABLE(profiling,
[ --enable-profiling Enable gprof profiling (default disabled)],
[ if test x$enableval = xyes; then PROFILING=1; fi ])
dnl
dnl Enable/disable optimizations
dnl
......@@ -299,6 +282,30 @@ AC_ARG_ENABLE(optimizations,
[ if test x$enableval = xno; then OPTIMS=0; fi ],
[ OPTIMS=1 ])
dnl
dnl GNU portable threads
dnl
AC_ARG_ENABLE(pth,
[ --enable-pth Enable GNU Pth support (default disabled)],
[ if test x$enableval = xyes; then
AC_CHECK_LIB(pth,pth_init)
AC_EGREP_HEADER(pth_init,pth.h,[
AC_DEFINE(PTH_INIT_IN_PTH_H, 1,
Define if <pth.h> defines pth_init)
THREAD_LIB="-lpth"
fi])
])
LIB="${LIB} ${THREAD_LIB}"
dnl
dnl CSS DVD decryption
dnl
AC_ARG_ENABLE(css,
[ --disable-css Disable DVD CSS decryption (default enabled)],
[ if test x$enableval = xyes; then CSS=1; else CSS=0; fi ], [ CSS=1; ])
if test x${CSS} = x1; then AC_DEFINE(HAVE_CSS, 1, Define if you want DVD CSS decryption.) fi
dnl
dnl DVD module: check for installed libdvdcss or local libdvdcss
dnl TODO: use user-provided --with-dvdcss flag
......@@ -619,6 +626,7 @@ AC_SUBST(DEBUG)
AC_SUBST(STATS)
AC_SUBST(ASM)
AC_SUBST(TRACE)
AC_SUBST(PROFILING)
AC_SUBST(OPTIMS)
AC_SUBST(CSS)
AC_SUBST(MOC)
......@@ -671,6 +679,7 @@ vlc version : ${VLC_VERSION}
debug mode : ${DEBUG}
statistics : ${STATS}
trace mode : ${TRACE}
profiling : ${PROFILING}
need builtin getopt : ${GETOPT}
built-in modules :${BUILTINS}
plugin modules :${PLUGINS}
......
......@@ -3,7 +3,7 @@
* This header provides a portable threads implementation.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: threads.h,v 1.18 2001/06/14 01:49:44 sam Exp $
* $Id: threads.h,v 1.19 2001/06/14 20:21:04 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
......@@ -25,6 +25,10 @@
#include <stdio.h>
#ifdef PROFILING
# include <sys/time.h>
#endif
#if defined( PTH_INIT_IN_PTH_H ) /* GNU Pth */
# include <pth.h>
......@@ -143,10 +147,8 @@ typedef void *(*vlc_thread_func_t)(void *p_data);
* Prototypes
*****************************************************************************/
static __inline__ int vlc_thread_create ( vlc_thread_t *, char *,
vlc_thread_func_t, void * );
static __inline__ void vlc_thread_exit ( void );
static __inline__ void vlc_thread_join ( vlc_thread_t );
static __inline__ int vlc_threads_init ( void );
static __inline__ int vlc_threads_end ( void );
static __inline__ int vlc_mutex_init ( vlc_mutex_t * );
static __inline__ int vlc_mutex_lock ( vlc_mutex_t * );
......@@ -158,103 +160,78 @@ static __inline__ int vlc_cond_signal ( vlc_cond_t * );
static __inline__ int vlc_cond_wait ( vlc_cond_t *, vlc_mutex_t * );
static __inline__ int vlc_cond_destroy ( vlc_cond_t * );
static __inline__ int vlc_thread_create ( vlc_thread_t *, char *,
vlc_thread_func_t, void * );
static __inline__ void vlc_thread_exit ( void );
static __inline__ void vlc_thread_join ( vlc_thread_t );
#if 0
static __inline__ int vlc_cond_timedwait( vlc_cond_t *, vlc_mutex_t *,
mtime_t );
#endif
/*****************************************************************************
* vlc_thread_create: create a thread
*****************************************************************************/
static __inline__ int vlc_thread_create( vlc_thread_t *p_thread,
char *psz_name, vlc_thread_func_t func,
void *p_data )
{
#if defined( PTH_INIT_IN_PTH_H )
*p_thread = pth_spawn( PTH_ATTR_DEFAULT, func, p_data );
return ( p_thread == NULL );
#ifdef PROFILING
/* Wrapper function for profiling */
static void * vlc_thread_wrapper ( void *p_wrapper );
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
return pthread_create( p_thread, NULL, func, p_data );
#elif defined( HAVE_CTHREADS_H )
*p_thread = cthread_fork( (cthread_fn_t)func, (any_t)p_data );
return 0;
#elif defined( HAVE_KERNEL_SCHEDULER_H )
*p_thread = spawn_thread( (thread_func)func, psz_name,
B_NORMAL_PRIORITY, p_data );
return resume_thread( *p_thread );
typedef struct wrapper_s
{
/* Data lock access */
vlc_mutex_t lock;
vlc_cond_t wait;
#elif defined( WIN32 )
#if 0
DWORD threadID;
/* This method is not recommended when using the MSVCRT C library,
* so we'll have to use _beginthreadex instead */
*p_thread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE) func,
p_data, 0, &threadID);
#endif
unsigned threadID;
/* When using the MSVCRT C library you have to use the _beginthreadex
* function instead of CreateThread, otherwise you'll end up with memory
* leaks and the signal function not working */
*p_thread = (HANDLE)_beginthreadex(NULL, 0, (PTHREAD_START) func,
p_data, 0, &threadID);
/* Data used to spawn the real thread */
vlc_thread_func_t func;
void *p_data;
return( *p_thread ? 0 : 1 );
/* Profiling timer passed to the thread */
struct itimerval itimer;
} wrapper_t;
#endif
}
/*****************************************************************************
* vlc_thread_exit: terminate a thread
* vlc_threads_init: initialize threads system
*****************************************************************************/
static __inline__ void vlc_thread_exit( void )
static __inline__ int vlc_threads_init( void )
{
#if defined( PTH_INIT_IN_PTH_H )
pth_exit( 0 );
return pth_init();
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
pthread_exit( 0 );
return 0;
#elif defined( HAVE_CTHREADS_H )
int result;
cthread_exit( &result );
return 0;
#elif defined( HAVE_KERNEL_SCHEDULER_H )
exit_thread( 0 );
return 0;
#elif defined( WIN32 )
#if 0
ExitThread( 0 );
#endif
/* For now we don't close the thread handles (because of race conditions).
* Need to be looked at. */
_endthreadex(0);
return 0;
#endif
}
/*****************************************************************************
* vlc_thread_join: wait until a thread exits
* vlc_threads_end: stop threads system
*****************************************************************************/
static __inline__ void vlc_thread_join( vlc_thread_t thread )
static __inline__ int vlc_threads_end( void )
{
#if defined( PTH_INIT_IN_PTH_H )
pth_join( thread, NULL );
return pth_kill();
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
pthread_join( thread, NULL );
return 0;
#elif defined( HAVE_CTHREADS_H )
cthread_join( thread );
return 0;
#elif defined( HAVE_KERNEL_SCHEDULER_H )
int32 exit_value;
wait_for_thread( thread, &exit_value );
return 0;
#elif defined( WIN32 )
WaitForSingleObject( thread, INFINITE);
return 0;
#endif
}
......@@ -593,3 +570,151 @@ static __inline__ int vlc_cond_destroy( vlc_cond_t *p_condvar )
#endif
}
/*****************************************************************************
* vlc_thread_create: create a thread
*****************************************************************************/
static __inline__ int vlc_thread_create( vlc_thread_t *p_thread,
char *psz_name, vlc_thread_func_t func,
void *p_data )
{
int i_ret;
#ifdef PROFILING
wrapper_t wrapper;
/* Initialize the wrapper structure */
wrapper.func = func;
wrapper.p_data = p_data;
getitimer( ITIMER_PROF, &wrapper.itimer );
vlc_mutex_init( &wrapper.lock );
vlc_cond_init( &wrapper.wait );
vlc_mutex_lock( &wrapper.lock );
/* Alter user-passed data so that we call the wrapper instead
* of the real function */
p_data = &wrapper;
func = vlc_thread_wrapper;
#endif
#if defined( PTH_INIT_IN_PTH_H )
*p_thread = pth_spawn( PTH_ATTR_DEFAULT, func, p_data );
i_ret = ( p_thread == NULL );
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
i_ret = pthread_create( p_thread, NULL, func, p_data );
#elif defined( HAVE_CTHREADS_H )
*p_thread = cthread_fork( (cthread_fn_t)func, (any_t)p_data );
i_ret = 0;
#elif defined( HAVE_KERNEL_SCHEDULER_H )
*p_thread = spawn_thread( (thread_func)func, psz_name,
B_NORMAL_PRIORITY, p_data );
i_ret = resume_thread( *p_thread );
#elif defined( WIN32 )
#if 0
DWORD threadID;
/* This method is not recommended when using the MSVCRT C library,
* so we'll have to use _beginthreadex instead */
*p_thread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE) func,
p_data, 0, &threadID);
#endif
unsigned threadID;
/* When using the MSVCRT C library you have to use the _beginthreadex
* function instead of CreateThread, otherwise you'll end up with memory
* leaks and the signal function not working */
*p_thread = (HANDLE)_beginthreadex(NULL, 0, (PTHREAD_START) func,
p_data, 0, &threadID);
i_ret = ( *p_thread ? 0 : 1 );
#endif
#ifdef PROFILING
if( i_ret == 0 )
{
vlc_cond_wait( &wrapper.wait, &wrapper.lock );
}
vlc_mutex_unlock( &wrapper.lock );
vlc_mutex_destroy( &wrapper.lock );
vlc_cond_destroy( &wrapper.wait );
#endif
return i_ret;
}
/*****************************************************************************
* vlc_thread_exit: terminate a thread
*****************************************************************************/
static __inline__ void vlc_thread_exit( void )
{
#if defined( PTH_INIT_IN_PTH_H )
pth_exit( 0 );
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
pthread_exit( 0 );
#elif defined( HAVE_CTHREADS_H )
int result;
cthread_exit( &result );
#elif defined( HAVE_KERNEL_SCHEDULER_H )
exit_thread( 0 );
#elif defined( WIN32 )
#if 0
ExitThread( 0 );
#endif
/* For now we don't close the thread handles (because of race conditions).
* Need to be looked at. */
_endthreadex(0);
#endif
}
/*****************************************************************************
* vlc_thread_join: wait until a thread exits
*****************************************************************************/
static __inline__ void vlc_thread_join( vlc_thread_t thread )
{
#if defined( PTH_INIT_IN_PTH_H )
pth_join( thread, NULL );
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
pthread_join( thread, NULL );
#elif defined( HAVE_CTHREADS_H )
cthread_join( thread );
#elif defined( HAVE_KERNEL_SCHEDULER_H )
int32 exit_value;
wait_for_thread( thread, &exit_value );
#elif defined( WIN32 )
WaitForSingleObject( thread, INFINITE);
#endif
}
#ifdef PROFILING
static void *vlc_thread_wrapper( void *p_wrapper )
{
/* Put user data in thread-local variables */
void * p_data = ((wrapper_t*)p_wrapper)->p_data;
vlc_thread_func_t func = ((wrapper_t*)p_wrapper)->func;
/* Set the profile timer value */
setitimer( ITIMER_PROF, &((wrapper_t*)p_wrapper)->itimer, NULL );
/* Tell the calling thread that we don't need its data anymore */
vlc_mutex_lock( &((wrapper_t*)p_wrapper)->lock );
vlc_cond_signal( &((wrapper_t*)p_wrapper)->wait );
vlc_mutex_unlock( &((wrapper_t*)p_wrapper)->lock );
/* Call the real function */
return func( p_data );
}
#endif
......@@ -4,7 +4,7 @@
* and spawn threads.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: main.c,v 1.103 2001/06/14 01:49:44 sam Exp $
* $Id: main.c,v 1.104 2001/06/14 20:21:04 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -252,11 +252,9 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
p_vout_bank = &vout_bank;
/*
* Initialize threads
* Initialize threads system
*/
#if defined( PTH_INIT_IN_PTH_H )
pth_init( );
#endif
vlc_threads_init( );
/*
* Test if our code is likely to run on this CPU
......@@ -399,9 +397,10 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
intf_Msg( "intf: program terminated" );
intf_MsgDestroy();
#if defined( PTH_INIT_IN_PTH_H )
pth_kill( );
#endif
/*
* Stop threads system
*/
vlc_threads_end( );
return 0;
}
......
......@@ -3,7 +3,7 @@
* Functions are prototyped in mtime.h.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: mtime.c,v 1.22 2001/06/14 01:49:44 sam Exp $
* $Id: mtime.c,v 1.23 2001/06/14 20:21:04 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -229,15 +229,15 @@ void msleep( mtime_t delay )
#if defined( HAVE_KERNEL_OS_H )
snooze( delay );
#elif defined( HAVE_USLEEP ) || defined( WIN32 )
usleep( delay );
#elif defined( PTH_INIT_IN_PTH_H )
struct timeval tv_delay;
tv_delay.tv_sec = delay / 1000000;
tv_delay.tv_usec = delay % 1000000;
pth_select( 0, NULL, NULL, NULL, &tv_delay );
#elif defined( HAVE_USLEEP ) || defined( WIN32 )
usleep( delay );
#else
struct timeval tv_delay;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment