Skip to content

Commit

Permalink
Plugins: configure.ac: Be more helpful in absence of autoconf-archive…
Browse files Browse the repository at this point in the history
… and/or pkg.m4

Suggested-by: Eli Schwartz <eschwartz93@gmail.com>
  • Loading branch information
hartwork committed Nov 17, 2024
1 parent 4900c24 commit 9025e94
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions libvisual-plugins/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ fi

dnl Check for libvisual here so that users get told they have the
dnl wrong dependencies as early in the process as possible.
m4_pattern_forbid([^PKG_CHECK_MODULES$])
PKG_CHECK_MODULES([LIBVISUAL], [libvisual_pkg >= libvisual_required_version],
[],
[AC_MSG_ERROR([*** libvisual libvisual_required_version not found.
Expand All @@ -46,6 +47,7 @@ AC_PROG_CXX
dnl Check for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
m4_pattern_forbid([^AX_CXX_COMPILE_STDCXX_11$])
AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])

dnl 'Standard' header files.
Expand Down Expand Up @@ -100,6 +102,7 @@ AC_ARG_ENABLE([pulseaudio], AS_HELP_STRING([--disable-pulseaudio],
[ENABLE_INPUT_PULSEAUDIO=$enableval],
[ENABLE_INPUT_PULSEAUDIO=yes])
if test "$ENABLE_INPUT_PULSEAUDIO" = "yes"; then
m4_pattern_forbid([^PKG_CHECK_MODULES$])
PKG_CHECK_MODULES([LIBPULSE], [libpulse], [HAVE_LIBPULSE="yes"], [HAVE_LIBPULSE="no"])
if test "$HAVE_LIBPULSE" = "yes"; then
build_input_plugins="$build_input_plugins pulseaudio"
Expand All @@ -116,6 +119,7 @@ AC_ARG_ENABLE([jack], AS_HELP_STRING([--disable-jack],
[ENABLE_INPUT_JACK=yes])

if test "$ENABLE_INPUT_JACK" = "yes"; then
m4_pattern_forbid([^PKG_CHECK_MODULES$])
PKG_CHECK_MODULES([LIBJACK], [jack >= jack_required_version], [HAVE_JACK="yes"], [HAVE_JACK="no"])
if test "$HAVE_JACK" = "yes"; then
build_input_plugins="$build_input_plugins jack"
Expand All @@ -131,6 +135,7 @@ AC_ARG_ENABLE([portaudio], AS_HELP_STRING([--disable-portaudio],
[ENABLE_INPUT_PORTAUDIO=$enableval],
[ENABLE_INPUT_PORTAUDIO=yes])
AS_IF([test "$ENABLE_INPUT_PORTAUDIO" = yes], [
m4_pattern_forbid([^PKG_CHECK_MODULES$])
PKG_CHECK_MODULES([PORTAUDIO], [portaudio-2.0], [HAVE_PORTAUDIO="yes"], [HAVE_PORTAUDIO="no"])
AS_IF([test "$HAVE_PORTAUDIO" = yes], [
build_input_plugins="$build_input_plugins portaudio"
Expand All @@ -148,6 +153,7 @@ AC_ARG_ENABLE([gdkpixbuf-plugin],
[ENABLE_PLUGIN_GDKPIXBUF=yes])

if test "$ENABLE_PLUGIN_GDKPIXBUF" = "yes"; then
m4_pattern_forbid([^PKG_CHECK_MODULES$])
PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= gtk_required_version],
[HAVE_GTK="yes"], [HAVE_GTK="no"])

Expand All @@ -169,6 +175,7 @@ AC_ARG_ENABLE([gstreamer-plugin],
[ENABLE_GSTREAMER_PLUGIN=yes])

if test "$ENABLE_GSTREAMER_PLUGIN" = "yes"; then
m4_pattern_forbid([^PKG_CHECK_MODULES$])
PKG_CHECK_MODULES([GSTREAMER], [gstreamer-1.0 >= gst_required_version],
[HAVE_GSTREAMER="yes"], [HAVE_GSTREAMER="no"])

Expand All @@ -189,7 +196,9 @@ AC_ARG_ENABLE([opengl],
[ENABLE_OPENGL_ACTORS=yes])

AS_IF([test "$ENABLE_OPENGL_ACTORS" = "yes"], [
m4_pattern_forbid([^AX_CHECK_GL$])
AX_CHECK_GL([HAVE_OPENGL="yes"], [HAVE_OPENGL="no"])
m4_pattern_forbid([^AX_CHECK_GLU$])
AX_CHECK_GLU([HAVE_GLU="yes"], [HAVE_GLU="no"; HAVE_OPENGL="no"])
AS_IF([test "$HAVE_OPENGL" != "yes"], [
AC_MSG_WARN([*** OpenGL and/or GLU have not been found, see above.
Expand Down

0 comments on commit 9025e94

Please sign in to comment.