[configure.ac] Fix inadvertently invoking X server (#4792)
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Thu, 4 May 2017 22:04:43 +0000 (00:04 +0200)
committerGitHub <noreply@github.com>
Thu, 4 May 2017 22:04:43 +0000 (00:04 +0200)
I noticed this when I cleaned my Mono repo and reran autogen.sh.
I suddenly got a popup from XQuartz about "Unrecognized option: =".

Turns out this was introduced in 9e967f00b3073671b340c1a4e3da7253d5213668,
the second half of the if is missing `test`, so it actually runs
`x = xyes` which starts XQuartz :D

Also cleaned up the USE_NLS checking since that ran immediately
before this and just printed "no" before which confused me.

configure.ac

index 8be5513adce089829731a928695ebebaebbdf6aa..25c905871588f56aceb8e91bbb1a38ef4d5e5798 100644 (file)
@@ -1031,20 +1031,20 @@ AC_SUBST(DEFAULT_PROFILE)
 
 if test x$USE_NLS = xprofile_default; then
 
-if test x$host_darwin = xyes; then
-# We make the default value for USE_NLS
-# "no" on OSX because it isn't available on most
-# default OSX installs. The most common configurations will
-# all disable it, so this saves us typing.
-  USE_NLS=no
-  AC_SUBST([USE_NLS])
-  AC_MSG_RESULT([$USE_NLS])
-else
-  USE_NLS=yes
-  AC_SUBST([USE_NLS])
-  AC_MSG_RESULT([$USE_NLS])
-fi
+       AC_MSG_CHECKING([NLS used])
+
+       # We make the default value for USE_NLS
+       # "no" on OSX because it isn't available on most
+       # default OSX installs. The most common configurations will
+       # all disable it, so this saves us typing.
+       if test x$host_darwin = xyes; then
+               USE_NLS=no;
+       else
+               USE_NLS=yes;
+       fi
 
+       AC_SUBST([USE_NLS])
+       AC_MSG_RESULT([$USE_NLS])
 fi
 
 AC_ARG_ENABLE(minimal, [  --enable-minimal=LIST      drop support for LIST subsystems.
@@ -1171,7 +1171,7 @@ if test "x$mono_feature_disable_normalization" = "xyes"; then
 fi
 
 #TODO: remove assembly_remapping feature name once everyone is using desktop_loader
-if test "x$mono_feature_disable_assembly_remapping" = "xyes" || "x$mono_feature_disable_desktop_loader" = "xyes"; then
+if test "x$mono_feature_disable_assembly_remapping" = "xyes" || test "x$mono_feature_disable_desktop_loader" = "xyes"; then
        AC_DEFINE(DISABLE_DESKTOP_LOADER, 1, [Disable desktop assembly loader semantics.])
        AC_MSG_NOTICE([Disabled desktop assembly loader semantics.])
 fi