Fixed configure error if pkg modules aren't available
authorSam Lantinga <slouken@libsdl.org>
Sat, 16 Mar 2019 19:32:59 -0700
changeset 12654cd9fe6a3126c
parent 12652 b3c652757f97
child 12655 370eb0d7a2e6
Fixed configure error if pkg modules aren't available
configure
configure.in
     1.1 --- a/configure	Sat Mar 16 19:08:59 2019 -0700
     1.2 +++ b/configure	Sat Mar 16 19:32:59 2019 -0700
     1.3 @@ -22630,37 +22630,17 @@
     1.4  	# Put the nasty error message in config.log where it belongs
     1.5  	echo "$DBUS_PKG_ERRORS" >&5
     1.6  
     1.7 -	as_fn_error $? "Package requirements (dbus-1) were not met:
     1.8 -
     1.9 -$DBUS_PKG_ERRORS
    1.10 -
    1.11 -Consider adjusting the PKG_CONFIG_PATH environment variable if you
    1.12 -installed software in a non-standard prefix.
    1.13 -
    1.14 -Alternatively, you may set the environment variables DBUS_CFLAGS
    1.15 -and DBUS_LIBS to avoid the need to call pkg-config.
    1.16 -See the pkg-config man page for more details." "$LINENO" 5
    1.17 +	have_dbus=no
    1.18  elif test $pkg_failed = untried; then
    1.19       	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    1.20  $as_echo "no" >&6; }
    1.21 -	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
    1.22 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    1.23 -as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
    1.24 -is in your PATH or set the PKG_CONFIG environment variable to the full
    1.25 -path to pkg-config.
    1.26 -
    1.27 -Alternatively, you may set the environment variables DBUS_CFLAGS
    1.28 -and DBUS_LIBS to avoid the need to call pkg-config.
    1.29 -See the pkg-config man page for more details.
    1.30 -
    1.31 -To get pkg-config, see <http://pkg-config.freedesktop.org/>.
    1.32 -See \`config.log' for more details" "$LINENO" 5; }
    1.33 +	have_dbus=no
    1.34  else
    1.35  	DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS
    1.36  	DBUS_LIBS=$pkg_cv_DBUS_LIBS
    1.37          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    1.38  $as_echo "yes" >&6; }
    1.39 -
    1.40 +	have_dbus=yes
    1.41  fi
    1.42          save_CFLAGS="$CFLAGS"
    1.43          CFLAGS="$save_CFLAGS $DBUS_CFLAGS"
    1.44 @@ -22767,37 +22747,17 @@
    1.45  	# Put the nasty error message in config.log where it belongs
    1.46  	echo "$IBUS_PKG_ERRORS" >&5
    1.47  
    1.48 -	as_fn_error $? "Package requirements (ibus-1.0) were not met:
    1.49 -
    1.50 -$IBUS_PKG_ERRORS
    1.51 -
    1.52 -Consider adjusting the PKG_CONFIG_PATH environment variable if you
    1.53 -installed software in a non-standard prefix.
    1.54 -
    1.55 -Alternatively, you may set the environment variables IBUS_CFLAGS
    1.56 -and IBUS_LIBS to avoid the need to call pkg-config.
    1.57 -See the pkg-config man page for more details." "$LINENO" 5
    1.58 +	have_ibus=no
    1.59  elif test $pkg_failed = untried; then
    1.60       	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    1.61  $as_echo "no" >&6; }
    1.62 -	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
    1.63 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    1.64 -as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
    1.65 -is in your PATH or set the PKG_CONFIG environment variable to the full
    1.66 -path to pkg-config.
    1.67 -
    1.68 -Alternatively, you may set the environment variables IBUS_CFLAGS
    1.69 -and IBUS_LIBS to avoid the need to call pkg-config.
    1.70 -See the pkg-config man page for more details.
    1.71 -
    1.72 -To get pkg-config, see <http://pkg-config.freedesktop.org/>.
    1.73 -See \`config.log' for more details" "$LINENO" 5; }
    1.74 +	have_ibus=no
    1.75  else
    1.76  	IBUS_CFLAGS=$pkg_cv_IBUS_CFLAGS
    1.77  	IBUS_LIBS=$pkg_cv_IBUS_LIBS
    1.78          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    1.79  $as_echo "yes" >&6; }
    1.80 -
    1.81 +	have_ibus=yes
    1.82  fi
    1.83          save_CFLAGS="$CFLAGS"
    1.84          CFLAGS="$save_CFLAGS $IBUS_CFLAGS"
    1.85 @@ -22909,37 +22869,17 @@
    1.86  	# Put the nasty error message in config.log where it belongs
    1.87  	echo "$FCITX_PKG_ERRORS" >&5
    1.88  
    1.89 -	as_fn_error $? "Package requirements (fcitx) were not met:
    1.90 -
    1.91 -$FCITX_PKG_ERRORS
    1.92 -
    1.93 -Consider adjusting the PKG_CONFIG_PATH environment variable if you
    1.94 -installed software in a non-standard prefix.
    1.95 -
    1.96 -Alternatively, you may set the environment variables FCITX_CFLAGS
    1.97 -and FCITX_LIBS to avoid the need to call pkg-config.
    1.98 -See the pkg-config man page for more details." "$LINENO" 5
    1.99 +	have_fcitx=no
   1.100  elif test $pkg_failed = untried; then
   1.101       	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.102  $as_echo "no" >&6; }
   1.103 -	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
   1.104 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
   1.105 -as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
   1.106 -is in your PATH or set the PKG_CONFIG environment variable to the full
   1.107 -path to pkg-config.
   1.108 -
   1.109 -Alternatively, you may set the environment variables FCITX_CFLAGS
   1.110 -and FCITX_LIBS to avoid the need to call pkg-config.
   1.111 -See the pkg-config man page for more details.
   1.112 -
   1.113 -To get pkg-config, see <http://pkg-config.freedesktop.org/>.
   1.114 -See \`config.log' for more details" "$LINENO" 5; }
   1.115 +	have_fcitx=no
   1.116  else
   1.117  	FCITX_CFLAGS=$pkg_cv_FCITX_CFLAGS
   1.118  	FCITX_LIBS=$pkg_cv_FCITX_LIBS
   1.119          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
   1.120  $as_echo "yes" >&6; }
   1.121 -
   1.122 +	have_fcitx=yes
   1.123  fi
   1.124          CFLAGS="$CFLAGS $FCITX_CFLAGS"
   1.125          ac_fn_c_check_header_mongrel "$LINENO" "fcitx/frontend.h" "ac_cv_header_fcitx_frontend_h" "$ac_includes_default"
   1.126 @@ -24195,37 +24135,17 @@
   1.127  	# Put the nasty error message in config.log where it belongs
   1.128  	echo "$LIBUSB_PKG_ERRORS" >&5
   1.129  
   1.130 -	as_fn_error $? "Package requirements (libusb-1.0) were not met:
   1.131 -
   1.132 -$LIBUSB_PKG_ERRORS
   1.133 -
   1.134 -Consider adjusting the PKG_CONFIG_PATH environment variable if you
   1.135 -installed software in a non-standard prefix.
   1.136 -
   1.137 -Alternatively, you may set the environment variables LIBUSB_CFLAGS
   1.138 -and LIBUSB_LIBS to avoid the need to call pkg-config.
   1.139 -See the pkg-config man page for more details." "$LINENO" 5
   1.140 +	have_libusb=no
   1.141  elif test $pkg_failed = untried; then
   1.142       	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.143  $as_echo "no" >&6; }
   1.144 -	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
   1.145 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
   1.146 -as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
   1.147 -is in your PATH or set the PKG_CONFIG environment variable to the full
   1.148 -path to pkg-config.
   1.149 -
   1.150 -Alternatively, you may set the environment variables LIBUSB_CFLAGS
   1.151 -and LIBUSB_LIBS to avoid the need to call pkg-config.
   1.152 -See the pkg-config man page for more details.
   1.153 -
   1.154 -To get pkg-config, see <http://pkg-config.freedesktop.org/>.
   1.155 -See \`config.log' for more details" "$LINENO" 5; }
   1.156 +	have_libusb=no
   1.157  else
   1.158  	LIBUSB_CFLAGS=$pkg_cv_LIBUSB_CFLAGS
   1.159  	LIBUSB_LIBS=$pkg_cv_LIBUSB_LIBS
   1.160          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
   1.161  $as_echo "yes" >&6; }
   1.162 -
   1.163 +	have_libusb=yes
   1.164  fi
   1.165          hidapi_support=no
   1.166          save_CFLAGS="$CFLAGS"
     2.1 --- a/configure.in	Sat Mar 16 19:08:59 2019 -0700
     2.2 +++ b/configure.in	Sat Mar 16 19:32:59 2019 -0700
     2.3 @@ -2549,7 +2549,7 @@
     2.4  AS_HELP_STRING([--enable-dbus], [enable D-Bus support [[default=yes]]]),
     2.5                          , enable_dbus=yes)
     2.6      if test x$enable_dbus = xyes; then
     2.7 -        PKG_CHECK_MODULES([DBUS], [dbus-1])
     2.8 +        PKG_CHECK_MODULES([DBUS], [dbus-1], have_dbus=yes, have_dbus=no)
     2.9          save_CFLAGS="$CFLAGS"
    2.10          CFLAGS="$save_CFLAGS $DBUS_CFLAGS"
    2.11          AC_CHECK_HEADER(dbus/dbus.h,
    2.12 @@ -2583,7 +2583,7 @@
    2.13  AS_HELP_STRING([--enable-ibus], [enable IBus support [[default=yes]]]),
    2.14                    , enable_ibus=yes)
    2.15      if test x$enable_ibus = xyes; then
    2.16 -        PKG_CHECK_MODULES([IBUS], [ibus-1.0])
    2.17 +        PKG_CHECK_MODULES([IBUS], [ibus-1.0], have_ibus=yes, have_ibus=no)
    2.18          save_CFLAGS="$CFLAGS"
    2.19          CFLAGS="$save_CFLAGS $IBUS_CFLAGS"
    2.20          AC_CHECK_HEADER(ibus-1.0/ibus.h,
    2.21 @@ -2619,7 +2619,7 @@
    2.22  AS_HELP_STRING([--enable-fcitx], [enable fcitx support [[default=yes]]]),
    2.23                    , enable_fcitx=yes)
    2.24      if test x$enable_fcitx = xyes; then
    2.25 -        PKG_CHECK_MODULES([FCITX], [fcitx])
    2.26 +        PKG_CHECK_MODULES([FCITX], [fcitx], have_fcitx=yes, have_fcitx=no)
    2.27          CFLAGS="$CFLAGS $FCITX_CFLAGS"
    2.28          AC_CHECK_HEADER(fcitx/frontend.h,
    2.29                          have_fcitx_frontend_h_hdr=yes,
    2.30 @@ -3183,7 +3183,7 @@
    2.31  AS_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[default=no]]]),
    2.32                    , enable_hidapi=no)
    2.33      if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
    2.34 -        PKG_CHECK_MODULES([LIBUSB], [libusb-1.0])
    2.35 +        PKG_CHECK_MODULES([LIBUSB], [libusb-1.0], have_libusb=yes, have_libusb=no)
    2.36          hidapi_support=no
    2.37          save_CFLAGS="$CFLAGS"
    2.38          CFLAGS="$save_CFLAGS $LIBUSB_CFLAGS"