]> rtime.felk.cvut.cz Git - orte.git/blob - admin/jorte.m4
RTEMS: disable use of CLOCK_MONOTONIC for RTEMS.
[orte.git] / admin / jorte.m4
1 # Add --enable-orte-idl option to configure.
2 # From Petr Smolik
3
4 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
5 # Free Software Foundation, Inc.
6
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
11
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 # 02111-1307, USA.
21
22 # serial 3
23
24 AC_DEFUN([AM_JORTE],
25 [AC_MSG_CHECKING([whether to compile jorte])
26
27   AC_ARG_WITH([java],
28         [AC_HELP_STRING([--with-java=DIR],
29         [path to JAVA home directory for jorte compilation])],
30         [JAVA_HOME_DIR="${withval}"],
31         [JAVA_HOME_DIR="no"])
32 #       [JAVA_HOME_DIR="${JAVA_HOME}"])
33
34   USE_JORTE=no
35   if test "${JAVA_HOME_DIR}" != "no" ; then
36       if [[ -e "${JAVA_HOME_DIR}/include/jni.h" ]] ; then 
37             USE_JORTE=yes
38             JNI_INCLUDES="-I$JAVA_HOME_DIR/include"      
39             dnl Strange thing, jni.h requires jni_md.h which is under genunix here..     
40             dnl and under linux here..   
41             test -d "$JAVA_HOME_DIR/include/linux" && 
42                     JNI_INCLUDES="$JNI_INCLUDES -I$JAVA_HOME_DIR/include/linux"          
43             test -d "$JAVA_HOME_DIR/include/genunix" && 
44                     JNI_INCLUDES="$JNI_INCLUDES -I$JAVA_HOME_DIR/include/genunix"
45             test -d "$JAVA_HOME_DIR/include/win32" && 
46                     JNI_INCLUDES="$JNI_INCLUDES -I$JAVA_HOME_DIR/include/win32"
47             CFLAGS="$CFLAGS $JNI_INCLUDES"
48             AC_DEFINE([CONFIG_JORTE],[1],[Define to enable JORTE's compilation])
49       fi
50   fi
51
52   AC_MSG_RESULT([$USE_JORTE])
53
54   AM_CONDITIONAL(CONFIG_JORTE, [test $USE_JORTE = yes])
55   AC_SUBST(CONFIG_JORTE)        
56
57 ]
58 )
59
60 AU_DEFUN([jm_JORTE], [AM_JORTE])