Revert "Merge branch 'master' of https://github.com/mono/mono"
[mono.git] / eglib / configure.ac
index d3e528d55b1843fd4eba41c5512a338fcee6b372..fdbce134b9767857b4641d0991cf384fc9911696 100644 (file)
@@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM
 AC_CANONICAL_HOST
 
 AM_INIT_AUTOMAKE([1.9 dist-bzip2 tar-ustar no-dist-gzip foreign])
-AM_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
 AM_MAINTAINER_MODE
 
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -136,10 +136,16 @@ AC_CHECK_SIZEOF(long)
 AC_CHECK_SIZEOF(long long)
 AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf)
 
+#
+# Mono currently supports 10.6, but strndup is not available prior to 10.7; avoiding
+# the detection of strndup on OS X so Mono built on 10.7+ still runs on 10.6. This can be
+# removed once support for 10.6 is dropped.
 #
 # iOS detection of strndup and getpwuid_r is faulty for some reason so let's simply avoid it
 #
-if test x$target_ios = xno; then
+if test x$target_osx = xyes; then
+AC_CHECK_FUNCS(getpwuid_r)
+elif test x$target_ios = xno; then
 AC_CHECK_FUNCS(strndup getpwuid_r)
 fi