summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac41
1 files changed, 32 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 8ddf5e31a7..451902dd38 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,10 +46,14 @@ esac
MKDEP_OPTIONS=-fdepend
dnl Ask gcc where it's keeping its secret headers
if test "x$GCC" = xyes; then
- GCC_INCLUDES=`$CC -print-file-name=include`
- if test "x$GCC_INCLUDES" != x; then
- MKDEP_OPTIONS="$MKDEP_OPTIONS -I$GCC_INCLUDES"
- fi
+ for dir in include include-fixed; do
+ GCC_INCLUDES=`$CC -print-file-name=$dir`
+ if test "x$GCC_INCLUDES" != x && \
+ test "$GCC_INCLUDES" != "$dir" && \
+ test -d "$GCC_INCLUDES"; then
+ MKDEP_OPTIONS="$MKDEP_OPTIONS -I$GCC_INCLUDES"
+ fi
+ done
fi
AC_SUBST([MKDEP_OPTIONS])
@@ -227,11 +231,24 @@ if test "$enable_static" = yes; then
GLW_LIB_NAME='lib$(GLW_LIB).a'
OSMESA_LIB_NAME='lib$(OSMESA_LIB).a'
else
- GL_LIB_NAME='lib$(GL_LIB).so'
- GLU_LIB_NAME='lib$(GLU_LIB).so'
- GLUT_LIB_NAME='lib$(GLUT_LIB).so'
- GLW_LIB_NAME='lib$(GLW_LIB).so'
- OSMESA_LIB_NAME='lib$(OSMESA_LIB).so'
+ case "$host_os" in
+ darwin* )
+ LIB_EXTENSION='dylib' ;;
+ * )
+ LIB_EXTENSION='so' ;;
+ esac
+
+ GL_LIB_NAME='lib$(GL_LIB).'${LIB_EXTENSION}
+ GLU_LIB_NAME='lib$(GLU_LIB).'${LIB_EXTENSION}
+ GLUT_LIB_NAME='lib$(GLUT_LIB).'${LIB_EXTENSION}
+ GLW_LIB_NAME='lib$(GLW_LIB).'${LIB_EXTENSION}
+ OSMESA_LIB_NAME='lib$(OSMESA_LIB).'${LIB_EXTENSION}
+
+ GL_LIB_GLOB='lib$(GL_LIB).*'${LIB_EXTENSION}'*'
+ GLU_LIB_GLOB='lib$(GLU_LIB).*'${LIB_EXTENSION}'*'
+ GLUT_LIB_GLOB='lib$(GLUT_LIB).*'${LIB_EXTENSION}'*'
+ GLW_LIB_GLOB='lib$(GLW_LIB).*'${LIB_EXTENSION}'*'
+ OSMESA_LIB_GLOB='lib$(OSMESA_LIB).*'${LIB_EXTENSION}'*'
fi
AC_SUBST([GL_LIB_NAME])
AC_SUBST([GLU_LIB_NAME])
@@ -239,6 +256,12 @@ AC_SUBST([GLUT_LIB_NAME])
AC_SUBST([GLW_LIB_NAME])
AC_SUBST([OSMESA_LIB_NAME])
+AC_SUBST([GL_LIB_GLOB])
+AC_SUBST([GLU_LIB_GLOB])
+AC_SUBST([GLUT_LIB_GLOB])
+AC_SUBST([GLW_LIB_GLOB])
+AC_SUBST([OSMESA_LIB_GLOB])
+
dnl
dnl Arch/platform-specific settings
dnl