]> SALOME platform Git repositories - plugins/hybridplugin.git/commitdiff
Salome HOME
Initial version
authoreap <eap@opencascade.com>
Mon, 22 Mar 2004 12:39:26 +0000 (12:39 +0000)
committereap <eap@opencascade.com>
Mon, 22 Mar 2004 12:39:26 +0000 (12:39 +0000)
adm_local/unix/config_files/check_Geom.m4 [new file with mode: 0644]
adm_local/unix/config_files/check_SMESH.m4 [new file with mode: 0644]
build_configure [new file with mode: 0755]

diff --git a/adm_local/unix/config_files/check_Geom.m4 b/adm_local/unix/config_files/check_Geom.m4
new file mode 100644 (file)
index 0000000..803ca75
--- /dev/null
@@ -0,0 +1,54 @@
+# Check availability of Geom binary distribution
+#
+# Author : Nicolas REJNERI (OPEN CASCADE, 2003)
+#
+
+AC_DEFUN([CHECK_GEOM],[
+
+AC_CHECKING(for Geom)
+
+Geom_ok=no
+
+AC_ARG_WITH(geom,
+           [  --with-geom=DIR root directory path of GEOM installation ],
+           GEOM_DIR="$withval",GEOM_DIR="")
+
+if test "x$GEOM_DIR" == "x" ; then
+
+# no --with-geom-dir option used
+
+   if test "x$GEOM_ROOT_DIR" != "x" ; then
+
+    # GEOM_ROOT_DIR environment variable defined
+      GEOM_DIR=$GEOM_ROOT_DIR
+
+   else
+
+    # search Geom binaries in PATH variable
+      AC_PATH_PROG(TEMP, libGEOM_Swig.py)
+      if test "x$TEMP" != "x" ; then
+         GEOM_BIN_DIR=`dirname $TEMP`
+         GEOM_DIR=`dirname $GEOM_BIN_DIR`
+      fi
+      
+   fi
+# 
+fi
+
+if test -f ${GEOM_DIR}/bin/salome/libGEOM_Swig.py ; then
+   Geom_ok=yes
+   AC_MSG_RESULT(Using Geom module distribution in ${GEOM_DIR})
+
+   if test "x$GEOM_ROOT_DIR" == "x" ; then
+      GEOM_ROOT_DIR=${GEOM_DIR}
+   fi
+   AC_SUBST(GEOM_ROOT_DIR)
+
+else
+   AC_MSG_WARN("Cannot find compiled Geom module distribution")
+fi
+
+AC_MSG_RESULT(for Geom: $Geom_ok)
+])dnl
diff --git a/adm_local/unix/config_files/check_SMESH.m4 b/adm_local/unix/config_files/check_SMESH.m4
new file mode 100644 (file)
index 0000000..86a8264
--- /dev/null
@@ -0,0 +1,54 @@
+# Check availability of SMesh binary distribution
+#
+# Author : Nicolas REJNERI (OPEN CASCADE, 2003)
+#
+
+AC_DEFUN([CHECK_SMESH],[
+
+AC_CHECKING(for SMesh)
+
+SMesh_ok=no
+
+AC_ARG_WITH(smesh,
+           [  --with-smesh=DIR root directory path of SMESH installation ],
+           SMESH_DIR="$withval",SMESH_DIR="")
+
+if test "x$SMESH_DIR" == "x" ; then
+
+# no --with-smesh option used
+
+   if test "x$SMESH_ROOT_DIR" != "x" ; then
+
+    # SMESH_ROOT_DIR environment variable defined
+      SMESH_DIR=$SMESH_ROOT_DIR
+
+   else
+
+    # search SMESH binaries in PATH variable
+      AC_PATH_PROG(TEMP, libSMESH_Swig.py)
+      if test "x$TEMP" != "x" ; then
+         SMESH_BIN_DIR=`dirname $TEMP`
+         SMESH_DIR=`dirname $SMESH_BIN_DIR`
+      fi
+      
+   fi
+# 
+fi
+
+if test -f ${SMESH_DIR}/bin/salome/libSMESH_Swig.py ; then
+   SMesh_ok=yes
+   AC_MSG_RESULT(Using SMesh module distribution in ${SMESH_DIR})
+
+   if test "x$SMESH_ROOT_DIR" == "x" ; then
+      SMESH_ROOT_DIR=${SMESH_DIR}
+   fi
+   AC_SUBST(SMESH_ROOT_DIR)
+
+else
+   AC_MSG_WARN("Cannot find compiled SMesh module distribution")
+fi
+
+AC_MSG_RESULT(for SMesh: $SMesh_ok)
+])dnl
diff --git a/build_configure b/build_configure
new file mode 100755 (executable)
index 0000000..163b463
--- /dev/null
@@ -0,0 +1,216 @@
+#!/bin/bash
+
+#
+# Tool for updating list of .in file for the SALOME project 
+# and regenerating configure script
+#
+# Author : Marc Tajchman - CEA
+# Date : 10/10/2002
+# $Header$
+#
+
+ORIG_DIR=`pwd`
+CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
+
+########################################################################
+# Test if the KERNEL_ROOT_DIR is set correctly
+
+if test ! -d "${KERNEL_ROOT_DIR}"; then
+    echo "failed : KERNEL_ROOT_DIR variable is not correct !"
+    exit
+fi
+
+# Test if the KERNEL_SRC is set correctly
+
+#if test ! -d "${KERNEL_SRC}"; then
+#    echo "failed : KERNEL_SRC variable is not correct !"
+#    exit
+#fi
+########################################################################
+# find_in - utility function
+#
+# usage :  
+#    find_in directory filename 
+#
+# Finds files following the *.in pattern, recursively in the
+# directory (first argument).
+# Results are appended into the file (second argument)
+#
+# Difference from the standard unix find is that files are tested
+# before directories
+# 
+
+find_in()
+{
+  local i
+  local f=$2
+
+# if the first argument is not a directory, returns
+
+  if [ ! -d "$1" ] ; then 
+     return 
+  fi
+
+# dont look in the CVS directories
+
+  case $1 in
+    */CVS) return ;;
+       */adm_local/*) return ;;
+    *) ;;
+  esac
+
+# for each regular file contained in the directory
+# test if it's a .in file
+
+  for i in "$1"/*
+  do
+     if [ -f "$i" ] ; then
+       case $i in 
+         *.in) echo "  "$i" \\" >> $f;;
+         *) ;;
+        esac
+     fi
+  done
+
+# for each subdirectory of the first argument, proceeds recursively
+
+  for i in "$1"/*
+  do
+     if [ -d "$i" ] ; then
+        find_in "$i" "$f"
+     fi
+  done
+}
+
+
+#######################################################################
+# Generate list of .in files (Makefile.in, config.h.in, etc)
+# appending it in file configure.in
+
+cd ${CONF_DIR}
+ABS_CONF_DIR=`pwd`
+
+#
+# Common part of the configure.in file
+#
+chmod u+w configure.in.base
+if ! \cp -f configure.in.base configure.in_tmp1 
+then
+       echo
+       echo "error : can't create files in" ${CONF_DIR}
+       echo "aborting ..."
+        chmod u-w configure.in.base 
+       exit
+fi
+chmod u-w configure.in.base 
+
+if [ -e "${CONF_DIR}/salome_adm" ] ; then
+    \rm -f ${CONF_DIR}/salome_adm
+fi
+
+# make a link allowing AC_OUTPUT to find the salome_adm/.../*.in  files
+echo "" >> configure.in_tmp1
+echo 'ln -fs ${KERNEL_ROOT_DIR}/salome_adm ${ROOT_SRCDIR}/salome_adm' >> configure.in_tmp1
+
+echo  "" >> configure.in_tmp1
+echo "AC_OUTPUT([ \\" >> configure.in_tmp1
+
+#
+# List of .in files in the adm/unix directory
+# These files MUST be on top of AC_OUTPUT list so we
+# put them "manually"
+#
+
+echo " ./salome_adm/unix/SALOMEconfig.h \\" >> configure.in_tmp1
+echo " ./salome_adm/unix/F77config.h \\" >> configure.in_tmp1
+echo " ./salome_adm/unix/sstream \\" >> configure.in_tmp1
+echo " ./salome_adm/unix/depend \\" >> configure.in_tmp1
+echo " ./adm_local/unix/make_omniorb \\" >> configure.in_tmp1
+echo " ./salome_adm/unix/envScript \\" >> configure.in_tmp1
+echo " ./adm_local/unix/make_commence \\" >> configure.in_tmp1
+echo " ./salome_adm/unix/make_conclude \\" >> configure.in_tmp1
+echo " ./salome_adm/unix/make_module \\" >> configure.in_tmp1
+
+\rm -f configure.in_tmp2 configure.in_tmp3
+touch configure.in_tmp2
+find_in . configure.in_tmp2
+sed -e '/^...salome_adm/d' configure.in_tmp2 >  configure.in_tmp3
+sed -e '/^...adm_local.unix.make_omniorb/d' configure.in_tmp3 configure.in_tmp2
+sed -e '/^...adm_local.unix.make_commence/d' configure.in_tmp2 > configure.in_tmp3
+sed -e '/configure.in/d' configure.in_tmp3 >  configure.in_tmp2
+sed -e 's/.in / /' configure.in_tmp2 >>  configure.in_tmp1
+#sed '/^.salome_adm/d' configure.in_tmp2 >  configure.in_tmp3
+#sed '/configure.in/d' configure.in_tmp3 >  configure.in_tmp2
+#sed 's/.in / /' configure.in_tmp2 >> configure.in_tmp1
+
+echo  "])" >> configure.in_tmp1
+
+# delete the link created for AC_OUTPUT
+echo "" >> configure.in_tmp1
+#echo 'rm -f ${ROOT_SRCDIR}/salome_adm' >> configure.in_tmp1
+\mv configure.in_tmp1 configure.in_new
+\rm  -f configure.in_tmp2 configure.in_tmp3
+
+
+########################################################################
+# Create new (or replace old) configure.in file
+# Print a message if the file is write protected
+#
+
+echo
+if test ! -f configure.in
+then
+       echo -n "Creating new file 'configure.in' ... "
+       if \mv configure.in_new configure.in >& /dev/null
+       then
+               echo "done"
+       else
+               echo "error, check your file permissions"
+       fi
+else
+       echo -n "Updating 'configure.in' file ... "
+       if ! \cp configure.in configure.in_old >& /dev/null
+       then
+               echo
+               echo
+               echo "Can't backup previous configure.in"
+               echo -n "Continue (you will not be able to revert) - (Y/N) ? "
+               read R
+                case "x$R" in
+                   xn*) exit;;
+                   xN*) exit;;
+               esac
+               echo
+               echo -n "                                 "
+       fi
+       if \cp configure.in_new configure.in >& /dev/null
+       then
+               echo "done"
+       else
+               echo
+               echo "error, can't update previous configure.in"
+       fi
+fi
+
+########################################################################
+# Use autoconf to rebuild the configure script
+#
+
+if test -f configure
+then
+       echo -n "Updating 'configure' script ...  "
+else
+       echo -n "Creating 'configure' script ...  "
+fi
+
+aclocal --acdir=adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files
+if autoconf
+then
+       echo "done"
+else
+       echo "failed (check file permissions and/or user quotas ...)"
+fi
+
+cd ${ORIG_DIR}
+
+echo