Fix quoting and typos. Also set gl_dlopen_path before using it. --- configure.ac.orig 2020-09-01 21:37:12.000000000 -0500 +++ configure.ac 2020-09-01 23:48:58.000000000 -0500 @@ -76,7 +76,7 @@ dnl to avoid misleading error messages later AS_IF([ test "x${PKG_CONFIG}" = x ], - [AC_MSG_ERROR([required pkg-config utility not found.])], + [AC_MSG_ERROR([required pkg-config utility not found])], []) # @@ -118,6 +118,19 @@ AC_DEFINE_UNQUOTED([CPUSTRING], "${host_cpu}", [Canonical CPU identification]) AC_DEFINE_UNQUOTED([BUILDSTRING], "${host_os}", [Canonical OS identification]) +dnl ---- Darwin search for OpenGL library +dnl (ref: dlopen(3) for Mac OS X.) +dnl See Darwin notes above. +gl_dlopen_path=default +AS_IF([ test "x${unix_host}" = xdarwin ],[ + AC_MSG_CHECKING([for GL_LIBDIR (location of libGL.dylib)]) + AC_ARG_VAR( GL_LIBDIR, [directory containing libGL.dylib]) + AC_MSG_RESULT([${GL_LIBDIR}]) + AS_IF([ test "x${GL_LIBDIR}" = x ],[ + gl_dlopen_path=${x_libraries}],[ + gl_dlopen_path=${GL_LIBDIR}]) +]) + dnl dnl Set names of dlopened libraries for config.h dnl The Darwin configuration attempts to conform to MacPorts. @@ -137,7 +150,7 @@ ]) AC_DEFINE_UNQUOTED([OPENAL_DRIVER], ["@PREFIX@/lib/libopenal.dylib"], - [OpenAl dynamic lib path]) + [OpenAL dynamic lib path]) ],[ AC_DEFINE_UNQUOTED([OPENGL_DRIVER], ["libGL.so.1"],[OpenGL shared lib name]) @@ -229,27 +242,14 @@ dnl ---- pthread (client) AX_PTHREAD([], [AC_MSG_ERROR( - ["Required pthreads support not found (or invalid CFLAGS)."])]) + [required pthreads support not found (or invalid CFLAGS)])]) dnl This might be a workaround for DSO missing pthread library error: AS_IF([ test "x${PTHREAD_LIBS}" = x ],[PTHREAD_LIBS="-pthread"]) -dnl ---- Darwin search for OpenGL library -dnl (ref: dlopen(3) for Mac OS X.) -dnl See Darwin notes above. -gl_dlopen_path=default -AS_IF([ test "x${unix_host}" = xdarwin ],[ - AC_MSG_CHECKING([for GL_LIBDIR (location of libGL.dylib)]) - AC_ARG_VAR( GL_LIBDIR, [directory containing libGL.dylib]) - AC_MSG_RESULT([${GL_LIBDIR}]) - AS_IF([ test "x${GL_LIBDIR}" = x ],[ - gl_dlopen_path=${x_libraries}],[ - gl_dlopen_path=${GL_LIBDIR}]) -]) - dnl ---- X11 (client) PKG_CHECK_MODULES([X11],[x11],,[ - AC_MSG_ERROR(["Required Xll library not found"]) + AC_MSG_ERROR([required X11 library not found]) ]) dnl ---- xf86vm (client) @@ -338,26 +338,26 @@ dnl ---- libjpeg (client) AC_SEARCH_LIBS([jpeg_read_header],[jpeg],,[ - AC_MSG_ERROR(["Required jpeg library not found"]) + AC_MSG_ERROR([required jpeg library not found]) ]) dnl ---- libcurl (client) PKG_CHECK_MODULES([LIBCURL],[libcurl],,[ - AC_MSG_ERROR(["Required cURL library not found"]) + AC_MSG_ERROR([required cURL library not found]) ]) dnl ---- ogg, vorbis, vorbisfile (client) PKG_CHECK_MODULES([OGG],[ogg],,[ - AC_MSG_ERROR(["Required Ogg libraries not found"]) + AC_MSG_ERROR([required Ogg libraries not found]) ]) PKG_CHECK_MODULES([VORBIS],[vorbis vorbisfile],,[ - AC_MSG_ERROR(["Required Vorbis libraries not found"]) + AC_MSG_ERROR([required Vorbis libraries not found]) ]) dnl ---- freetype2 (client) PKG_CHECK_MODULES([FREETYPE2],[freetype2],,[ - AC_MSG_ERROR(["Required FreeType2 library not found"]) + AC_MSG_ERROR([required FreeType2 library not found]) ]) dnl @@ -442,29 +442,29 @@ jpeglib_h_found=no AC_CHECK_HEADERS([jpeglib.h jpeg/jpeglib.h],[ jpeglib_h_found=yes ]) AS_IF([ test "x${jpeglib_h_found}" = xno ], - [AC_MSG_ERROR("Required JPEG header file, jpeglib.h, not found.")]) + [AC_MSG_ERROR([required JPEG header file, jpeglib.h, not found])]) dnl ---- OpenAL (client) openal_h_found=no AC_CHECK_HEADERS([AL/al.h al.h OpenAL/al.h],[ openal_h_found=yes ]) AS_IF([ test "x${openal_h_found}" = xno ], - [AC_MSG_ERROR("Required OpenAL header file, al.h, not found.")]) + [AC_MSG_ERROR([required OpenAL header file, al.h, not found])]) openalc_h_found=no AC_CHECK_HEADERS([AL/alc.h alc.h OpenAL/alc.h],[ openalc_h_found=yes ]) AS_IF([ test "x${openalc_h_found}" = xno ], - [AC_MSG_ERROR("Required OpenAL header file, alc.h, not found.")]) + [AC_MSG_ERROR([required OpenAL header file, alc.h, not found])]) dnl ---- OpenGL (client) AC_CHECK_HEADERS([GL/gl.h],, - [AC_MSG_ERROR("Required OpenGL header file, gl.h, not found.")]) + [AC_MSG_ERROR([required OpenGL header file, gl.h, not found])]) AC_CHECK_HEADERS([GL/glx.h],, - [AC_MSG_ERROR("Required OpenGL header file, glx.h, not found.")]) + [AC_MSG_ERROR([required OpenGL header file, glx.h, not found])]) dnl ---- ODE (client) AS_IF([ test "x$system_libode" = "xyes"],[ AC_CHECK_HEADERS([ode/ode.h],, - [AC_MSG_ERROR("with-system-libode: Required ODE header file, ode.h, not found.")] + [AC_MSG_ERROR([with-system-libode: required ODE header file, ode.h, not found])] [], [ #define dDOUBLE