Commit dba11183 authored by philipjsg's avatar philipjsg

Add logic to figure out whether strptime is present on the system. If not, then

get it built.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@819 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent c3b65a1b
...@@ -52,6 +52,7 @@ lshared="no" ...@@ -52,6 +52,7 @@ lshared="no"
extralibs="-lm" extralibs="-lm"
simpleidct="yes" simpleidct="yes"
bigendian="no" bigendian="no"
vhook="no"
mpegaudio_hp="yes" mpegaudio_hp="yes"
SHFLAGS=-shared SHFLAGS=-shared
...@@ -94,6 +95,26 @@ if test -z "$source_path" -o "$source_path" = "." ; then ...@@ -94,6 +95,26 @@ if test -z "$source_path" -o "$source_path" = "." ; then
source_path_used="no" source_path_used="no"
fi fi
cat > $TMPC << EOF
#include <dlfcn.h>
int main( void ) { return (int) dlopen("foo", 0); }
EOF
if $cc -o $TMPO $TMPC -ldl 2> /dev/null ; then
: vhook=yes
fi
cat > $TMPC << EOF
#include <X11/Xlib.h>
#include <Imlib2.h>
int main( void ) { return (int) imlib_load_font("foo"); }
EOF
imlib2=no
if $cc -o $TMPO $TMPC -lImlib2 2> /dev/null ; then
imlib2=yes
fi
for opt do for opt do
case "$opt" in case "$opt" in
--prefix=*) prefix=`echo $opt | cut -d '=' -f 2` --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
...@@ -132,6 +153,8 @@ for opt do ...@@ -132,6 +153,8 @@ for opt do
;; ;;
--enable-mp3lame) mp3lame="yes" --enable-mp3lame) mp3lame="yes"
;; ;;
--disable-vhook) vhook="no"
;;
--disable-simple_idct) simpleidct="no" --disable-simple_idct) simpleidct="no"
;; ;;
--enable-win32) win32="yes" --enable-win32) win32="yes"
...@@ -198,6 +221,17 @@ EOF ...@@ -198,6 +221,17 @@ EOF
$cc -o $TMPO $TMPC 2> /dev/null || _memalign=no $cc -o $TMPO $TMPC 2> /dev/null || _memalign=no
fi fi
cat > $TMPC << EOF
#define _GNU_SOURCE
#include <time.h>
int main( void ) { return *strptime("", "", 0); }
EOF
strptime=no
if $cc -o $TMPO $TMPC 2> /dev/null ; then
strptime=yes
fi
if test "$zlib" = "yes"; then if test "$zlib" = "yes"; then
# check for zlib - mmu_man # check for zlib - mmu_man
cat > $TMPC << EOF cat > $TMPC << EOF
...@@ -257,6 +291,7 @@ echo " --disable-v4l disable video4linux grabbing [default=no]" ...@@ -257,6 +291,7 @@ echo " --disable-v4l disable video4linux grabbing [default=no]"
echo " --disable-network disable network support [default=no]" echo " --disable-network disable network support [default=no]"
echo " --disable-zlib disable zlib [default=no]" echo " --disable-zlib disable zlib [default=no]"
echo " --disable-simple_idct disable simple IDCT routines [default=no]" echo " --disable-simple_idct disable simple IDCT routines [default=no]"
# echo " --disable-vhook disable video hooking support"
echo " --enable-gprof enable profiling with gprof [$gprof]" echo " --enable-gprof enable profiling with gprof [$gprof]"
echo " --disable-mpegaudio-hp faster (but less accurate)" echo " --disable-mpegaudio-hp faster (but less accurate)"
echo " mpegaudio decoding [default=no]" echo " mpegaudio decoding [default=no]"
...@@ -277,6 +312,11 @@ echo "zlib enabled $zlib" ...@@ -277,6 +312,11 @@ echo "zlib enabled $zlib"
echo "mp3lame enabled $mp3lame" echo "mp3lame enabled $mp3lame"
echo "a52 support $a52" echo "a52 support $a52"
echo "a52 dlopened $a52bin" echo "a52 dlopened $a52bin"
# echo "Video hooking $vhook"
if test "$vhook" = "yes" ; then
: echo "Imlib2 support $imlib2"
fi
echo "Creating config.mak and config.h" echo "Creating config.mak and config.h"
...@@ -316,6 +356,19 @@ if test "$gprof" = "yes" ; then ...@@ -316,6 +356,19 @@ if test "$gprof" = "yes" ; then
echo "TARGET_GPROF=yes" >> config.mak echo "TARGET_GPROF=yes" >> config.mak
echo "#define HAVE_GPROF 1" >> $TMPH echo "#define HAVE_GPROF 1" >> $TMPH
fi fi
if test "$strptime" = "yes" ; then
echo "#define HAVE_STRPTIME 1" >> $TMPH
else
echo "BUILD_STRPTIME=yes" >> config.mak
fi
if test "$imlib2" = "yes" ; then
echo "HAVE_IMLIB2=yes" >> config.mak
fi
if test "$vhook" = "yes" ; then
echo "BUILD_VHOOK=yes" >> config.mak
echo "#define HAVE_VHOOK 1" >> $TMPH
extralibs="$extralibs -ldl"
fi
if test "$lshared" = "yes" ; then if test "$lshared" = "yes" ; then
echo "BUILD_SHARED=yes" >> config.mak echo "BUILD_SHARED=yes" >> config.mak
echo "PIC=-fPIC" >> config.mak echo "PIC=-fPIC" >> config.mak
......
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