mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 12:02:23 +02:00
Test for the existence of pkg-config, fixes Bugzilla #553.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20548 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
7f3cf0eb14
commit
3495e6cbe7
80
configure
vendored
80
configure
vendored
@ -3646,6 +3646,16 @@ echores "$_macosx_bundle"
|
|||||||
fi #if darwin
|
fi #if darwin
|
||||||
|
|
||||||
|
|
||||||
|
echocheck "pkg-config"
|
||||||
|
_pkg_config=pkg-config
|
||||||
|
if `$_pkg_config 2> /dev/null`; then
|
||||||
|
echores "yes"
|
||||||
|
else
|
||||||
|
_pkg_config=false
|
||||||
|
echores "no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
echocheck "Samba support (libsmbclient)"
|
echocheck "Samba support (libsmbclient)"
|
||||||
if test "$_smbsupport" = yes; then
|
if test "$_smbsupport" = yes; then
|
||||||
_ld_smb="-lsmbclient"
|
_ld_smb="-lsmbclient"
|
||||||
@ -4891,7 +4901,7 @@ fi
|
|||||||
echocheck "Polyp"
|
echocheck "Polyp"
|
||||||
if test "$_polyp" = auto ; then
|
if test "$_polyp" = auto ; then
|
||||||
_polyp=no
|
_polyp=no
|
||||||
if pkg-config --exists 'polyplib >= 0.6 polyplib-error >= 0.6 polyplib-mainloop >= 0.6' ; then
|
if $_pkg_config --exists 'polyplib >= 0.6 polyplib-error >= 0.6 polyplib-mainloop >= 0.6' ; then
|
||||||
|
|
||||||
cat > $TMPC << EOF
|
cat > $TMPC << EOF
|
||||||
#include <polyp/polyplib.h>
|
#include <polyp/polyplib.h>
|
||||||
@ -4899,7 +4909,7 @@ cat > $TMPC << EOF
|
|||||||
#include <polyp/polyplib-error.h>
|
#include <polyp/polyplib-error.h>
|
||||||
int main(void) { return 0; }
|
int main(void) { return 0; }
|
||||||
EOF
|
EOF
|
||||||
cc_check `pkg-config --libs --cflags polyplib polyplib-error polyplib-mainloop` && tmp_run && _polyp=yes
|
cc_check `$_pkg_config --libs --cflags polyplib polyplib-error polyplib-mainloop` && tmp_run && _polyp=yes
|
||||||
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -4909,8 +4919,8 @@ if test "$_polyp" = yes ; then
|
|||||||
_def_polyp='#define USE_POLYP 1'
|
_def_polyp='#define USE_POLYP 1'
|
||||||
_aosrc="$_aosrc ao_polyp.c"
|
_aosrc="$_aosrc ao_polyp.c"
|
||||||
_aomodules="polyp $_aomodules"
|
_aomodules="polyp $_aomodules"
|
||||||
_ld_polyp=`pkg-config --libs polyplib polyplib-error polyplib-mainloop`
|
_ld_polyp=`$_pkg_config --libs polyplib polyplib-error polyplib-mainloop`
|
||||||
_inc_extra="$_inc_extra `pkg-config --cflags polyplib polyplib-error polyplib-mainloop`"
|
_inc_extra="$_inc_extra `$_pkg_config --cflags polyplib polyplib-error polyplib-mainloop`"
|
||||||
else
|
else
|
||||||
_def_polyp='#undef USE_POLYP'
|
_def_polyp='#undef USE_POLYP'
|
||||||
_noaomodules="polyp $_noaomodules"
|
_noaomodules="polyp $_noaomodules"
|
||||||
@ -4927,9 +4937,9 @@ int main(void) { jack_client_new("test"); return 0; }
|
|||||||
EOF
|
EOF
|
||||||
if cc_check -ljack ; then
|
if cc_check -ljack ; then
|
||||||
_ld_jack="-ljack"
|
_ld_jack="-ljack"
|
||||||
elif cc_check `pkg-config --libs --cflags --silence-errors jack` ; then
|
elif cc_check `$_pkg_config --libs --cflags --silence-errors jack` ; then
|
||||||
_ld_jack="`pkg-config --libs jack`"
|
_ld_jack="`$_pkg_config --libs jack`"
|
||||||
_inc_extra="$_inc_extra "`pkg-config --cflags jack`""
|
_inc_extra="$_inc_extra "`$_pkg_config --cflags jack`""
|
||||||
else
|
else
|
||||||
_jack=no
|
_jack=no
|
||||||
fi
|
fi
|
||||||
@ -5295,7 +5305,7 @@ echores "$_cdparanoia"
|
|||||||
|
|
||||||
echocheck "libcdio"
|
echocheck "libcdio"
|
||||||
if test "$_libcdio" = auto && test "$_cdparanoia" = no ; then
|
if test "$_libcdio" = auto && test "$_cdparanoia" = no ; then
|
||||||
if pkg-config --exists libcdio ; then
|
if $_pkg_config --exists libcdio ; then
|
||||||
cat > $TMPC << EOF
|
cat > $TMPC << EOF
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <cdio/version.h>
|
#include <cdio/version.h>
|
||||||
@ -5310,7 +5320,7 @@ int main()
|
|||||||
EOF
|
EOF
|
||||||
_libcdio=no
|
_libcdio=no
|
||||||
for _inc_tmp in "" "-I/usr/include/cdio" "-I/usr/local/include/cdio" ; do
|
for _inc_tmp in "" "-I/usr/include/cdio" "-I/usr/local/include/cdio" ; do
|
||||||
cc_check `pkg-config --cflags --libs libcdio_paranoia` $_inc_tmp $_ld_lm \
|
cc_check `$_pkg_config --cflags --libs libcdio_paranoia` $_inc_tmp $_ld_lm \
|
||||||
&& tmp_run && _libcdio=yes && _inc_extra="$_inc_extra $_inc_tmp" && break
|
&& tmp_run && _libcdio=yes && _inc_extra="$_inc_extra $_inc_tmp" && break
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
@ -5321,8 +5331,8 @@ if test "$_libcdio" = yes && test "$_cdparanoia" = no ; then
|
|||||||
_cdda='yes'
|
_cdda='yes'
|
||||||
_def_libcdio='#define HAVE_LIBCDIO'
|
_def_libcdio='#define HAVE_LIBCDIO'
|
||||||
_def_havelibcdio='yes'
|
_def_havelibcdio='yes'
|
||||||
_inc_extra="$_inc_extra `pkg-config --cflags libcdio`"
|
_inc_extra="$_inc_extra `$_pkg_config --cflags libcdio`"
|
||||||
_ld_libcdio=`pkg-config --libs libcdio_paranoia`
|
_ld_libcdio=`$_pkg_config --libs libcdio_paranoia`
|
||||||
else
|
else
|
||||||
if test "$_cdparanoia" = yes ; then
|
if test "$_cdparanoia" = yes ; then
|
||||||
_res_comment="using cdparanoia"
|
_res_comment="using cdparanoia"
|
||||||
@ -5426,9 +5436,9 @@ EOF
|
|||||||
_ld_fontconfig="-lfontconfig"
|
_ld_fontconfig="-lfontconfig"
|
||||||
elif cc_check -lfontconfig -lexpat -lfreetype ; then
|
elif cc_check -lfontconfig -lexpat -lfreetype ; then
|
||||||
_ld_fontconfig="-lfontconfig -lexpat -lfreetype"
|
_ld_fontconfig="-lfontconfig -lexpat -lfreetype"
|
||||||
elif cc_check `pkg-config --silence-errors --cflags --libs fontconfig` ; then
|
elif cc_check `$_pkg_config --silence-errors --cflags --libs fontconfig` ; then
|
||||||
_inc_extra="$_inc_extra `pkg-config --cflags fontconfig`"
|
_inc_extra="$_inc_extra `$_pkg_config --cflags fontconfig`"
|
||||||
_ld_fontconfig=`pkg-config --libs fontconfig`
|
_ld_fontconfig=`$_pkg_config --libs fontconfig`
|
||||||
else
|
else
|
||||||
_fontconfig=no
|
_fontconfig=no
|
||||||
fi
|
fi
|
||||||
@ -5757,11 +5767,11 @@ int main(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
for _ld_theora in "`pkg-config --silence-errors --libs --cflags theora`" "-ltheora"; do
|
for _ld_theora in "`$_pkg_config --silence-errors --libs --cflags theora`" "-ltheora"; do
|
||||||
cc_check $_ld_theora && _theora=yes && break
|
cc_check $_ld_theora && _theora=yes && break
|
||||||
done
|
done
|
||||||
if test "$_theora" = no && test "$_tremor_internal" = yes; then
|
if test "$_theora" = no && test "$_tremor_internal" = yes; then
|
||||||
for _ld_theora in "`pkg-config --silence-errors --libs --cflags theora`" "-ltheora"; do
|
for _ld_theora in "`$_pkg_config --silence-errors --libs --cflags theora`" "-ltheora"; do
|
||||||
cc_check -I. tremor/bitwise.c $_ld_theora && _theora=yes && break
|
cc_check -I. tremor/bitwise.c $_ld_theora && _theora=yes && break
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@ -6191,9 +6201,9 @@ if test "$_libavutil_so" = auto ; then
|
|||||||
#include <ffmpeg/common.h>
|
#include <ffmpeg/common.h>
|
||||||
int main(void) { ff_gcd(1,1); return 0; }
|
int main(void) { ff_gcd(1,1); return 0; }
|
||||||
EOF
|
EOF
|
||||||
if pkg-config --exists libavutil ; then
|
if $_pkg_config --exists libavutil ; then
|
||||||
_inc_libavutil=`pkg-config --cflags libavutil`
|
_inc_libavutil=`$_pkg_config --cflags libavutil`
|
||||||
_ld_libavutil=`pkg-config --libs libavutil`
|
_ld_libavutil=`$_pkg_config --libs libavutil`
|
||||||
cc_check $_inc_libavutil $_ld_libavutil && _libavutil_so=yes
|
cc_check $_inc_libavutil $_ld_libavutil && _libavutil_so=yes
|
||||||
elif cc_check -lavutil $_ld_lm ; then
|
elif cc_check -lavutil $_ld_lm ; then
|
||||||
_libavutil_so=yes
|
_libavutil_so=yes
|
||||||
@ -6222,9 +6232,9 @@ int main(void) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
if pkg-config --exists libavcodec ; then
|
if $_pkg_config --exists libavcodec ; then
|
||||||
_inc_libavcodec=`pkg-config --cflags libavcodec`
|
_inc_libavcodec=`$_pkg_config --cflags libavcodec`
|
||||||
_ld_libavcodec=`pkg-config --libs libavcodec`
|
_ld_libavcodec=`$_pkg_config --libs libavcodec`
|
||||||
cc_check $_inc_libavcodec $_ld_libavcodec && _libavcodec_so=yes
|
cc_check $_inc_libavcodec $_ld_libavcodec && _libavcodec_so=yes
|
||||||
elif cc_check -lavcodec $_ld_lm ; then
|
elif cc_check -lavcodec $_ld_lm ; then
|
||||||
_libavcodec_so=yes
|
_libavcodec_so=yes
|
||||||
@ -6245,9 +6255,9 @@ if test "$_libavformat_so" = auto ; then
|
|||||||
#include <ffmpeg/opt.h>
|
#include <ffmpeg/opt.h>
|
||||||
int main(void) { av_alloc_format_context(); return 0; }
|
int main(void) { av_alloc_format_context(); return 0; }
|
||||||
EOF
|
EOF
|
||||||
if pkg-config --exists libavformat ; then
|
if $_pkg_config --exists libavformat ; then
|
||||||
_inc_libavformat=`pkg-config --cflags libavformat`
|
_inc_libavformat=`$_pkg_config --cflags libavformat`
|
||||||
_ld_libavformat=`pkg-config --libs libavformat`
|
_ld_libavformat=`$_pkg_config --libs libavformat`
|
||||||
cc_check $_inc_libavformat $_ld_libavformat && _libavformat_so=yes
|
cc_check $_inc_libavformat $_ld_libavformat && _libavformat_so=yes
|
||||||
elif cc_check $_ld_lm -lavformat ; then
|
elif cc_check $_ld_lm -lavformat ; then
|
||||||
_libavformat_so=yes
|
_libavformat_so=yes
|
||||||
@ -7087,17 +7097,17 @@ if test "$_gtk1" = no ; then
|
|||||||
#Check for GTK2 :
|
#Check for GTK2 :
|
||||||
echocheck "GTK+ version"
|
echocheck "GTK+ version"
|
||||||
|
|
||||||
if pkg-config gtk+-2.0 --exists ; then
|
if $_pkg_config gtk+-2.0 --exists ; then
|
||||||
_gtk=`pkg-config gtk+-2.0 --modversion 2>/dev/null`
|
_gtk=`$_pkg_config gtk+-2.0 --modversion 2>/dev/null`
|
||||||
_inc_extra="$_inc_extra `pkg-config gtk+-2.0 --cflags 2>/dev/null`"
|
_inc_extra="$_inc_extra `$_pkg_config gtk+-2.0 --cflags 2>/dev/null`"
|
||||||
_ld_gtk=`pkg-config gtk+-2.0 --libs 2>/dev/null`
|
_ld_gtk=`$_pkg_config gtk+-2.0 --libs 2>/dev/null`
|
||||||
echores "$_gtk"
|
echores "$_gtk"
|
||||||
|
|
||||||
# Check for GLIB2
|
# Check for GLIB2
|
||||||
if pkg-config glib-2.0 --exists ; then
|
if $_pkg_config glib-2.0 --exists ; then
|
||||||
echocheck "glib version"
|
echocheck "glib version"
|
||||||
_glib=`pkg-config glib-2.0 --modversion 2>/dev/null`
|
_glib=`$_pkg_config glib-2.0 --modversion 2>/dev/null`
|
||||||
_ld_glib=`pkg-config glib-2.0 --libs 2>/dev/null`
|
_ld_glib=`$_pkg_config glib-2.0 --libs 2>/dev/null`
|
||||||
echores "$_glib"
|
echores "$_glib"
|
||||||
|
|
||||||
_def_gui='#define HAVE_NEW_GUI 1'
|
_def_gui='#define HAVE_NEW_GUI 1'
|
||||||
@ -7410,12 +7420,12 @@ if test "$_maemo" = auto ; then
|
|||||||
#include <libosso.h>
|
#include <libosso.h>
|
||||||
int main(void) { (void) osso_initialize("", "", 0, NULL); return 0; }
|
int main(void) { (void) osso_initialize("", "", 0, NULL); return 0; }
|
||||||
EOF
|
EOF
|
||||||
cc_check `pkg-config --cflags --libs libosso 2>/dev/null` && _maemo=yes
|
cc_check `$_pkg_config --cflags --libs libosso 2>/dev/null` && _maemo=yes
|
||||||
fi
|
fi
|
||||||
if test "$_maemo" = yes ; then
|
if test "$_maemo" = yes ; then
|
||||||
_def_maemo='#define HAVE_MAEMO 1'
|
_def_maemo='#define HAVE_MAEMO 1'
|
||||||
_inc_extra="$_inc_extra `pkg-config --cflags libosso`"
|
_inc_extra="$_inc_extra `$_pkg_config --cflags libosso`"
|
||||||
_ld_extra="$_ld_extra `pkg-config --libs libosso` -lXsp"
|
_ld_extra="$_ld_extra `$_pkg_config --libs libosso` -lXsp"
|
||||||
else
|
else
|
||||||
_def_maemo='#undef HAVE_MAEMO'
|
_def_maemo='#undef HAVE_MAEMO'
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user