]> rtime.felk.cvut.cz Git - orte.git/blobdiff - configure.in
CygWin, MSVC hack
[orte.git] / configure.in
index d8cc9f764793ddb93c3cbc415c85e0a69f8fd9db..8ad61c1eb59a2bb8d8c9abda93c5c5a64c27c90b 100644 (file)
@@ -1,6 +1,6 @@
 # Process this file with autoconf to produce a configure script.
 #
-# $Id: configure.in,v 1.3 2004/02/11 00:38:24 ppisa Exp $
+# $Id: configure.in,v 1.6 2004/03/17 22:15:37 smolik Exp $
 
 # autoconf requirement
 
@@ -34,12 +34,23 @@ AC_SUBST(ORTE_VERSION)
 ###############################
 # target
 WIN='no'
+MINGW='no'
+CYGWIN='no'
 UNIX='no'
 case "$target" in
-  *-cygwin* | *-mingw*)
+  *-cygwin*)
     CFLAGS="$CFLAGS"
     WIN='yes'
+    CYGWIN='yes'
     AC_DEFINE([CONFIG_ORTE_WIN],[1],[Define if is target windows])
+    AC_DEFINE([CONFIG_ORTE_CYGWIN],[1],[Define if is target CYGWIN])
+    ;;  
+  *-mingw*)
+    CFLAGS="$CFLAGS"
+    WIN='yes'
+    MINGW='yes'
+    AC_DEFINE([CONFIG_ORTE_WIN],[1],[Define if is target windows])
+    AC_DEFINE([CONFIG_ORTE_MINGW],[1],[Define if is target MINGW])
     ;;
   *)
     # Assume Unix.
@@ -50,6 +61,8 @@ case "$target" in
     ;;
 esac
 AM_CONDITIONAL(CONFIG_ORTE_WIN, test x$WIN = xyes)
+AM_CONDITIONAL(CONFIG_ORTE_CYGWIN, test x$CIGWIN = xyes)
+AM_CONDITIONAL(CONFIG_ORTE_MINGW, test x$MINGW = xyes)
 AM_CONDITIONAL(CONFIG_ORTE_UNIX, test x$UNIX = xyes)
 
 ###############################
@@ -60,16 +73,32 @@ modulePROGRAMS_UNINSTALL="\$(top_builddir)/modtool --uninstall"
 AC_SUBST(moduledir)
 AC_SUBST(modulePROGRAMS_INSTALL)
 
+###############################
+# CFLAGS
+CFLAGS="$CFLAGS -Wall"
+if test ${USE_RTLINUX} == 'yes' ; then
+  CFLAGS="$CFLAGS $RTLINUX_CFLAGS"
+  CC="$RTLINUX_CC"
+else
+  if test ${USE_RTAI} == 'yes' ; then
+    CFLAGS="$CFLAGS $RTAI_CFLAGS $LINUX_CFLAGS"
+  else
+    if test -n ${CONFIG_ORTE_KERNEL} ; then
+      CFLAGS="$CFLAGS $LINUX_CFLAGS"
+    fi
+  fi
+fi
+
 ###############################
 # Checks for programs.
 AC_PROG_CC
 AC_PROG_RANLIB
 
 ###############################
-# Checks for libraries (not for RT)
+# Checks for libraries
 if test -z ${CONFIG_ORTE_RT} ; then
-AC_CHECK_LIB([ws2_32], [main])
-AC_CHECK_LIB([pthread], [main])
+  AC_CHECK_LIB([ws2_32], [main])
+  AC_CHECK_LIB([pthread], [main])
 fi
 
 ###############################
@@ -80,21 +109,6 @@ AH_VERBATIM([_GNU_SOURCE],[
 #endif
 ]) 
 
-###############################
-# CFLAGS
-CFLAGS="$CFLAGS -Wall"
-if test ${USE_RTLINUX} == 'yes' ; then
-  CFLAGS="$CFLAGS $RTLINUX_CFLAGS"
-else
-  if test ${USE_RTAI} == 'yes' ; then
-    CFLAGS="$CFLAGS $RTAI_CFLAGS $LINUX_CFLAGS"
-  else
-    if test -n ${CONFIG_ORTE_KERNEL} ; then
-      CFLAGS="$CFLAGS $LINUX_CFLAGS"
-    fi
-  fi
-fi
-
 ###############################
 # Checks for header files.
 # user space
@@ -204,4 +218,4 @@ Configuration ORTE:
   
   See config.h for further configuration information.
 ------------------------------------------------------------------------"
-           
\ No newline at end of file
+