1 # Check availability of Salome's KERNEL binary distribution
3 # Author : Jerome Roy (CEA, 2003)
6 AC_DEFUN([CHECK_KERNEL],[
7 AC_REQUIRE([AC_LINKER_OPTIONS])dnl
9 AC_CHECKING(for Kernel)
17 [--with-kernel=DIR root directory path of KERNEL build or installation],
18 [KERNEL_DIR="$withval"],
21 if test "x${KERNEL_DIR}" = "x" ; then
22 AC_MSG_RESULT(for \${KERNEL_ROOT_DIR}: ${KERNEL_ROOT_DIR})
23 # no --with-kernel-dir option used
24 if test "x${KERNEL_ROOT_DIR}" != "x" ; then
25 # KERNEL_ROOT_DIR environment variable defined
26 KERNEL_DIR=${KERNEL_ROOT_DIR}
28 # search Kernel binaries in PATH variable
29 AC_PATH_PROG(TEMP,runSalome)
30 if test "x${TEMP}" != "x" ; then
31 AC_MSG_RESULT(runSalome was found at : ${TEMP})
32 KERNEL_BIN_DIR=`dirname ${TEMP}`
33 KERNEL_DIR=`cd ${KERNEL_BIN_DIR}/../..; pwd`
38 if test -f ${KERNEL_DIR}/bin/salome/runSalome ; then
39 AC_MSG_RESULT(Using Kernel module distribution in ${KERNEL_DIR})
42 if test "x${KERNEL_ROOT_DIR}" = "x" ; then
43 KERNEL_ROOT_DIR=${KERNEL_DIR}
46 if test "x${KERNEL_SITE_DIR}" = "x" ; then
47 KERNEL_SITE_DIR=${KERNEL_ROOT_DIR}
50 AC_SUBST(KERNEL_ROOT_DIR)
51 AC_SUBST(KERNEL_SITE_DIR)
53 KERNEL_LDFLAGS=-L${KERNEL_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
54 KERNEL_CXXFLAGS=-I${KERNEL_DIR}/include/salome
56 AC_SUBST(KERNEL_LDFLAGS)
57 AC_SUBST(KERNEL_CXXFLAGS)
59 AC_MSG_WARN("Cannot find compiled Kernel module distribution")
62 AC_MSG_RESULT(for Kernel: $Kernel_ok)