User name and home directory initialization
[mono.git] / eglib / configure.ac
index f8afc2fd4bc5aaa64ba8206ff26e215e634c63d5..26a8e58d3232553412fb5ccff1a44b96c01c49cb 100644 (file)
@@ -7,6 +7,8 @@ AM_MAINTAINER_MODE
 
 AC_PROG_CC
 AM_PROG_LIBTOOL
+# Use dolt (http://dolt.freedesktop.org/) instead of libtool for building.
+DOLT
 CFLAGS="$CFLAGS -O0"
 GNUC_PRETTY=
 GNUC_UNUSED=
@@ -14,9 +16,8 @@ BREAKPOINT="G_STMT_START { raise (SIGTRAP); } G_STMT_END"
 if test x$GCC = xyes; then
    GNUC_UNUSED='__attribute__((__unused__))'
    GNUC_NORETURN='__attribute__((__noreturn__))'
-   echo target_cpu=$target_cpu
-   case $target_cpu in
-     i*86) BREAKPOINT="G_STMT_START { __asm__ (\"int \$03\"); } G_STMT_END" ;;
+   case $host_cpu in
+     i*86|x86_64) BREAKPOINT="G_STMT_START { __asm__ (\"int \$03\"); } G_STMT_END" ;;
    esac
 fi
 AC_SUBST(GNUC_PRETTY)
@@ -38,12 +39,20 @@ CFLAGS="$CFLAGS -g -D_GNU_SOURCE"
 AM_CONDITIONAL(CROSS_COMPILING, [test x$cross_compiling = xyes])
 AC_C_BIGENDIAN([ORDER=G_BIG_ENDIAN],[ORDER=G_LITTLE_ENDIAN])
 
+platform_darwin=no
+
 case $host in
 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
     PATHSEP='\\'
     SEARCHSEP=';'
     OS="WIN32"
     ;;
+*-*darwin*)
+    platform_darwin=yes
+    PATHSEP='/'
+    SEARCHSEP=':'
+    OS="UNIX"
+    ;;
 *)
     PATHSEP='/'
     SEARCHSEP=':'
@@ -77,6 +86,7 @@ AC_SUBST(SEARCHSEP)
 AC_SUBST(OS)
 AM_CONDITIONAL(HOST_WIN32, test x$OS = xWIN32)
 AM_CONDITIONAL(TARGET_WIN32, test x$OS = xWIN32)
+AM_CONDITIONAL(PLATFORM_DARWIN, test x$platform_darwin = xyes)
 
 AC_CHECK_SIZEOF(int)
 AC_CHECK_SIZEOF(void *)
@@ -116,7 +126,7 @@ if test "x$have_iso_varargs" = "xyes"; then
 fi
 AC_SUBST(G_HAVE_ISO_VARARGS)
 
-AC_CHECK_HEADERS(getopt.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h)
+AC_CHECK_HEADERS(getopt.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h localcharset.h)
 
 if test $ac_cv_sizeof_void_p != $ac_cv_sizeof_int; then
    GPOINTER_TO_INT="((gint)(long) (ptr))"