Remove checks to see if things returned from pkg-config actually work. If pkg-config is returning garbage then there's something very wrong with the user's setup.

Originally committed to SVN as r6069.
This commit is contained in:
Thomas Goyne 2011-12-22 21:20:15 +00:00
parent b12b3425e1
commit 8f24931e3a

View file

@ -379,46 +379,15 @@ fi
## Freetype ## Freetype
########### ###########
PKG_CHECK_MODULES(FREETYPE, freetype2 >= freetype_required_version, PKG_CHECK_MODULES(FREETYPE, freetype2 >= freetype_required_version,
AC_DEFINE(WITH_FREETYPE2, 1, [Enable FreeType 2 support.]), AC_DEFINE(WITH_FREETYPE2, 1, [Enable FreeType 2 support.]),
[AC_MSG_FAILURE([aegisub requires >= FreeType2 freetype_required_version])]) [AC_MSG_FAILURE([Aegisub requires >= FreeType2 freetype_required_version])])
AC_AGI_COMPILE([Freetype], [freetype], [$FREETYPE_CFLAGS], [$FREETYPE_LIBS],[
#include <ft2build.h>
#include FT_FREETYPE_H
int main(void) {
FT_Library ft;
if (FT_Init_FreeType(&ft)) { return 1; }
return 0;
}])
if test "$agi_cv_with_freetype" = "no"; then
AC_MSG_FAILURE([Please install a working Freetype library.])
fi
############# #############
## Fontconfig ## Fontconfig
############# #############
PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= fontconfig_required_version) PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= fontconfig_required_version,
[AC_DEFINE(WITH_FONTCONFIG, 1, [Enable FontConfig support.])],
AC_AGI_COMPILE([FontConfig], [fontconfig], [$FONTCONFIG_CFLAGS], [$FONTCONFIG_LIBS],[ [AC_MSG_FAILURE([Aegisub requires fontconfig >= fontconfig_required_version])])
#include <fontconfig/fontconfig.h>
int main(void) {
int fc = FcInit();
FcConfig* config;
config = FcConfigGetCurrent();
if ((!config) || (!fc)) { return 1;}
return 0;
}])
if test "$agi_cv_with_fontconfig" = "no"; then
AC_MSG_FAILURE([Please install a working Fontconfig library.])
fi
AC_DEFINE(WITH_FONTCONFIG, 1, [Enable FontConfig support.])
AC_SUBST(FONTCONFIG_CFLAGS)
AC_SUBST(FONTCONFIG_LIBS)
######## ########
## iconv ## iconv
@ -518,22 +487,7 @@ if test "$with_portaudio" != "no"; then
PKG_CHECK_MODULES(PORTAUDIO, portaudio-2.0 >= portaudio_required_version, [with_portaudio="yes"], [with_portaudio="no"]) PKG_CHECK_MODULES(PORTAUDIO, portaudio-2.0 >= portaudio_required_version, [with_portaudio="yes"], [with_portaudio="no"])
fi fi
if test "$with_portaudio" != "no"; then if test "$with_portaudio" = "yes"; then
AC_AGI_COMPILE([PortAudio], [portaudio], [$PORTAUDIO_CFLAGS], [$PORTAUDIO_LIBS],[
#include <portaudio.h>
int main(void) {
PaError err = Pa_Initialize();
if (err != paNoError) return 1;
return 0;
} ])
fi
if test "$agi_cv_with_portaudio" = "no" && test "$with_portaudio" = "yes"; then
AC_MSG_WARN([PortAudio detected, but it doesn't work...])
with_portaudio="no"
fi
if test "$agi_cv_with_portaudio" = "yes" && test "$with_portaudio" = "yes"; then
AC_DEFINE(WITH_PORTAUDIO, 1, [Enable PortAudio v19 support]) AC_DEFINE(WITH_PORTAUDIO, 1, [Enable PortAudio v19 support])
found_audio_player="yes" found_audio_player="yes"
fi fi
@ -551,22 +505,7 @@ if test "$with_pulseaudio" != "no"; then
PKG_CHECK_MODULES(LIBPULSE, libpulse >= pulseaudio_required_version, [with_pulseaudio="yes"], [with_pulseaudio="no"]) PKG_CHECK_MODULES(LIBPULSE, libpulse >= pulseaudio_required_version, [with_pulseaudio="yes"], [with_pulseaudio="no"])
fi fi
if test "$with_pulseaudio" != "no"; then if test "$with_pulseaudio" = "yes"; then
AC_AGI_COMPILE([PuleseAudio], [pulseaudio], [$LIBPULSE_CFLAGS], [$LIBPULSE_LIBS],[
#include <pulse/pulseaudio.h>
int main(void) {
pa_threaded_mainloop *mainloop = pa_threaded_mainloop_new();
if (!mainloop) return 1;
return 0;
} ])
fi
if test "$agi_cv_with_pulseaudio" = "no" && test "$with_pulseaudio" = "yes"; then
AC_MSG_WARN([PulseAudio detected, but it doesn't work...])
with_pulseaudio="no"
fi
if test "$agi_cv_with_pulseaudio" = "yes" && test "$with_pulseaudio" = "yes"; then
AC_DEFINE(WITH_PULSEAUDIO, 1, [Enable PulseAudio support]) AC_DEFINE(WITH_PULSEAUDIO, 1, [Enable PulseAudio support])
found_audio_player="yes" found_audio_player="yes"
fi fi
@ -692,27 +631,14 @@ AC_ARG_WITH(hunspell, [ --without-hunspell build without hunspell support
if test "$with_hunspell" != "no"; then if test "$with_hunspell" != "no"; then
PKG_CHECK_MODULES(HUNSPELL, hunspell >= 1.2.0, [with_hunspell="yes"], [with_hunspell="no"]) PKG_CHECK_MODULES(HUNSPELL, hunspell >= 1.2.0, [with_hunspell="yes"], [with_hunspell="no"])
AC_AGI_COMPILE([Hunspell], [hunspell], [$HUNSPELL_CFLAGS], [$HUNSPELL_LIBS],[
#include <hunspell.hxx>
int main(void) {
return !(new Hunspell(".", "."));
} ])
fi fi
if test "$agi_cv_with_hunspell" = "no" && test "$with_hunspell" = "yes"; then if test "$with_hunspell" = "yes"; then
AC_MSG_WARN([Hunspell detected, but it doesn't work...])
with_hunspell="no"
fi
if test "$agi_cv_with_hunspell" = "yes" && test "$with_hunspell" = "yes"; then
AC_DEFINE(WITH_HUNSPELL, 1, [Enable Hunspell support.]) AC_DEFINE(WITH_HUNSPELL, 1, [Enable Hunspell support.])
fi fi
AC_SUBST(with_hunspell) AC_SUBST(with_hunspell)
############ ############
# Automation # Automation
############ ############