[PATCH] Require bash shell for symlink-mesa.sh

Dan Nicholson dbn.lists at gmail.com
Fri Mar 7 16:38:01 PST 2008


The symlink-mesa.sh script has a few bashisms, but is currently invoked
through /bin/sh. This is a problem if /bin/sh isn't bash. Instead,
require bash and use it to process symlink-mesa.sh.
---
Dan

 Alan, does this still work for you on Solaris?

 configure.ac |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5417bbb..23dfb82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -813,12 +813,12 @@ if test "x$GLX" = xyes && ! test "x$MESA_SOURCE" = x; then
 	AC_DEFINE(GLXEXT, 1, [Build GLX extension])
 	GLX_LIBS='$(top_builddir)/GL/glx/libglx.la $(top_builddir)/GL/mesa/libGLcore.la'
 	test -d GL || mkdir GL
-	case $host_os in
-	  solaris*) 	
-		SYMLINK_MESA="/usr/bin/bash $srcdir/GL/symlink-mesa.sh"	;;
-	  *)	SYMLINK_MESA=$srcdir/GL/symlink-mesa.sh ;;
-	esac
-	$SYMLINK_MESA $MESA_SOURCE GL/
+
+	# Need bash for symlink-mesa.sh
+	AC_PATH_PROG([BASH], [bash],
+	  [AC_MSG_ERROR([Bash shell needed to symlink Mesa source files])],
+	  [$PATH:/bin:/usr/bin])
+	$BASH $srcdir/GL/symlink-mesa.sh $MESA_SOURCE GL/
 	if test $? -ne 0; then
 		AC_MSG_ERROR([Failed to link Mesa source tree.  Please specify a proper path to Mesa sources, or disable GLX.])
 	fi
-- 
1.5.3.2




More information about the xorg mailing list