--- mythtv-0.20/configure 2006-08-28 17:18:08.000000000 +0100 +++ mythtv-0.20/configure 2007-01-16 14:42:18.000000000 +0000 @@ -1225,49 +1225,50 @@ has_library() { - if test -f /etc/ld.so.conf ; then - LIBPATHS=`cat /etc/ld.so.conf | grep -v "#" | grep -v "include"` + lib=`echo $1 | sed 's/^lib//'` + tmpfile=/tmp/conftest.$$ + rm -f $tmpfile $tmpfile.c + cat >$tmpfile.c < /dev/null | head -n 1` != x"" ; then - HAS_IT="yes" - fi - done - expr $HAS_IT : "yes" > /dev/null + rm -f $tmpfile $tmpfile.c + return $result } has_header() { - HPATHS="/usr/local/include /usr/include /usr/include/g++-v3 /usr/X11R6/include" - INCL=`echo $DYLD_LIBRARY_PATH $LD_LIBRARY_PATH | sed s/':'/' '/g` - HPATHS="$HPATHS `echo $INCL | sed s/$libdir_name/include/g` " - - HAS_IT="no" - for HPATH in $HPATHS ; do - if test x`ls $HPATH/$1* 2> /dev/null | head -n 1` != x"" ; then - HAS_IT="yes" - fi - done - expr $HAS_IT : "yes" > /dev/null + header=$1 + tmpfile=/tmp/conftest.$$ + rm -f $tmpfile.o $tmpfile.c + case $header in + X11/*) extra_incs="#include " ;; + *) extra_incs="" ;; + esac + cat >$tmpfile.c < +int main() { return 0; } +EOF + echo "cc=$cc $CPPFLAGS $CFLAGS" + echo -n "checking for <$header>... " + if $cc $CPPFLAGS $CFLAGS -c -o $tmpfile.o $tmpfile.c; then + echo "yes" + result=0 + else + echo "no" + result=1 + fi + rm -f $tmpfile.o $tmpfile.c + return $result } CCONFIG="$CCONFIG $compile_type"