[cig-commits] r9167 - cs/benchmark/cigma/trunk/build/m4
luis at geodynamics.org
luis at geodynamics.org
Mon Jan 28 23:37:08 PST 2008
Author: luis
Date: 2008-01-28 23:37:07 -0800 (Mon, 28 Jan 2008)
New Revision: 9167
Added:
cs/benchmark/cigma/trunk/build/m4/cigma_hdf5.m4
cs/benchmark/cigma/trunk/build/m4/cigma_vtk.m4
Removed:
cs/benchmark/cigma/trunk/build/m4/hdf5.m4
cs/benchmark/cigma/trunk/build/m4/vtk.m4
Log:
Renaming m4 autoconf scripts to prevent possible collisions
Copied: cs/benchmark/cigma/trunk/build/m4/cigma_hdf5.m4 (from rev 9166, cs/benchmark/cigma/trunk/build/m4/hdf5.m4)
===================================================================
--- cs/benchmark/cigma/trunk/build/m4/cigma_hdf5.m4 (rev 0)
+++ cs/benchmark/cigma/trunk/build/m4/cigma_hdf5.m4 2008-01-29 07:37:07 UTC (rev 9167)
@@ -0,0 +1,69 @@
+##############################################################################
+# -*- Autoconf -*-
+#
+#
+
+##############################################################################
+#
+# CIGMA_OPTIONS_HDF5
+#
+AC_DEFUN([CIGMA_OPTIONS_HDF5], [
+ AC_ARG_VAR(HDF5_HOME, [home path to HDF5 library])
+ AC_ARG_WITH([hdf5],
+ [AC_HELP_STRING([--with-hdf5],
+ [enable HDF5 @<:@default=/usr@:>@])],
+ [with_hdf5="$withval"],
+ [with_hdf5="/usr"])
+])
+
+##############################################################################
+#
+# CIGMA_PATH_HDF5([action-if-found], [action-if-not-found])
+#
+AC_DEFUN([CIGMA_PATH_HDF5],[
+
+ if [[ $with_hdf5 = "yes" ]]; then
+
+ dnl in case user wrote --with-hdf5=yes
+ with_hdf5="/usr"
+
+ fi
+
+
+ if [[ $with_hdf5 != "no" ]]; then
+
+ HDF5_PREFIX="$with_hdf5"
+
+ AC_CHECK_FILE([$HDF5_PREFIX/include/hdf5.h],[hdf5Found="OK"])
+ AC_MSG_CHECKING([if HDF5 is installed in $HDF5_PREFIX])
+
+ if [[ -z "$hdf5Found" ]]; then
+
+ dnl HDF5 not found!
+ AC_MSG_RESULT([no])
+ $3
+
+ else
+
+ dnl HDF5 found!
+ AC_MSG_RESULT([yes])
+ HDF5_CFLAGS="-I$HDF5_PREFIX/include"
+ HDF5_CXXFLAGS="$HDF5_CFLAGS"
+ HDF5_LIBS="-lhdf5"
+ HDF5_LDFLAGS="-L$HDF5_PREFIX/lib $HDF5_LIBS -Wl,--rpath -Wl,$HDF5_PREFIX/lib"
+ $2
+
+ fi
+
+ else
+
+ dnl user specified --with-hdf5=no
+ dnl nothing to do?
+ /bin/false
+
+ fi # if [[ $with_hdf5 != "no" ]];
+
+
+])
+
+# vim: syntax=config
Copied: cs/benchmark/cigma/trunk/build/m4/cigma_vtk.m4 (from rev 9166, cs/benchmark/cigma/trunk/build/m4/vtk.m4)
===================================================================
--- cs/benchmark/cigma/trunk/build/m4/cigma_vtk.m4 (rev 0)
+++ cs/benchmark/cigma/trunk/build/m4/cigma_vtk.m4 2008-01-29 07:37:07 UTC (rev 9167)
@@ -0,0 +1,157 @@
+##############################################################################
+# -*- Autoconf -*-
+#
+# Implements the AM_OPTIONS_VTK and AM_PATH_VTK macros.
+# The AM_OPTIONS_VTK macro adds the --with-vtk=path option,
+# and the AM_PATH_VTK macro is used to detect VTK presence,
+# location and version.
+#
+# Modified from http://www.vtk.org/Wiki/VTK_Autoconf
+# Originally by Francesco Montorsi
+#
+
+
+##############################################################################
+#
+# AM_OPTIONS_VTK
+#
+# Adds the --with-vtk=PATH option to the configure options
+#
+AC_DEFUN([AM_OPTIONS_VTK],[
+ AC_ARG_WITH([vtk],
+ [AC_HELP_STRING(
+ [--with-vtk],
+ [The prefix where VTK is installed (default is /usr/local)])],
+ [with_vtk=$withval],
+ [with_vtk="/usr/local"])
+ AC_ARG_WITH([vtk-version],
+ [AC_HELP_STRING(
+ [--with-vtk-version],
+ [VTK's include directory name is vtk-suffix, e.g., vtk-5.0/.
+ What's the suffix? (Default -5.0)])],
+ [vtk_suffix=$withval],
+ [vtk_suffix="-5.0"])
+])
+
+##############################################################################
+#
+# AM_PATH_VTK([minimum-version], [action-if-found], [action-if-not-found])
+#
+# NOTE: [minimum-version] must be in the form [X.Y.Z]
+#
+AC_DEFUN([AM_PATH_VTK],[
+
+ dnl do we want to check for VTK?
+ if [[ $with_vtk = "yes" ]]; then
+ dnl in case user wrote --with-vtk=yes
+ with_vtk="/usr/local"
+ fi
+
+ if [[ $with_vtk != "no" ]]; then
+
+ VTK_PREFIX="$with_vtk"
+
+ AC_CHECK_FILE([$VTK_PREFIX/include/vtk$vtk_suffix/vtkCommonInstantiator.h],
+ [vtkFound="OK"])
+ AC_MSG_CHECKING([if VTK is installed in $VTK_PREFIX])
+
+ if [[ -z "$vtkFound" ]]; then
+
+ dnl VTK not found!
+ AC_MSG_RESULT([no])
+ $3
+
+ else
+
+ dnl VTK found!
+ AC_MSG_RESULT([yes])
+
+ dnl these are the VTK libraries of a default build
+ VTK_LIBS="-lvtkCommon -lvtkFiltering"
+
+ dnl set VTK c,cpp,ld flags
+ VTK_CFLAGS="-I$VTK_PREFIX/include/vtk$vtk_suffix"
+ VTK_CXXFLAGS="$VTK_CFLAGS"
+ VTK_LDFLAGS="-L$VTK_PREFIX/lib/vtk $VTK_LIBS"
+
+ dnl now, eventually check version
+ if [[ -n "$1" ]]; then
+
+ dnl the version of VTK we need
+ maj=`echo $1 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ min=`echo $1 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ rel=`echo $1 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ AC_MSG_CHECKING([if VTK version is at least $maj.$min.$rel])
+
+ dnl in order to be able to compile the following test program,
+ dnl we need to add to the current flags, the VTK settings...
+ OLD_CFLAGS=$CFLAGS
+ OLD_CXXFLAGS=$CXXFLAGS
+ OLD_LDFLAGS=$LDFLAGS
+ CFLAGS="$VTK_CFLAGS $CFLAGS"
+ CXXFLAGS="$VTK_CXXFLAGS $CXXFLAGS"
+ LDFLAGS="$VTK_LDFLAGS $LDFLAGS"
+
+ dnl check if the installed VTK is greater or not
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([
+ #include <vtk/vtkConfigure.h>
+ #include <stdio.h>
+ ],[
+ printf("VTK version is: %d.%d.%d",
+ VTK_MAJOR_VERSION,
+ VTK_MINOR_VERSION,
+ VTK_BUILD_VERSION);
+
+ #if VTK_MAJOR_VERSION < $maj
+ #error Installed VTK is too old!
+ #endif
+
+ #if VTK_MINOR_VERSION < $min
+ #error Installed VTK is too old!
+ #endif
+
+ #if VTK_BUILD_VERSION < $rel
+ #error Installed VTK is too old!
+ #endif
+ ])
+ ], [vtkVersion="OK"])
+
+ if [[ "$vtkVersion" = "OK" ]]; then
+
+ AC_MSG_RESULT([yes])
+
+ $2
+
+ else
+
+ AC_MSG_RESULT([no])
+
+ dnl restore all flags without VTK values
+ CFLAGS=$OLD_CFLAGS
+ CXXFLAGS=$OLD_CXXFLAGS
+ LDFLAGS=$OLD_LDFLAGS
+
+ $3
+ fi # if [[ $vtkVersion = "OK ]];
+
+ else
+
+ dnl if we don't have to check for minimum version
+ dnl (because the user did not set that option),
+ dnl then we can execute here the block action-if-found
+ CFLAGS="$VTK_CFLAGS $CFLAGS"
+ CXXFLAGS="$VTK_CXXFLAGS $CXXFLAGS"
+ LDFLAGS="$VTK_LDFLAGS $LDFLAGS"
+
+ $2
+
+ fi #if [[ -n "$1" ]];
+
+ fi # if [[ -z "$vtkFound" ]];
+ fi # $with_vtk != "no"
+])
+
+
+
+# vim: syntax=config
Deleted: cs/benchmark/cigma/trunk/build/m4/hdf5.m4
===================================================================
--- cs/benchmark/cigma/trunk/build/m4/hdf5.m4 2008-01-29 07:37:05 UTC (rev 9166)
+++ cs/benchmark/cigma/trunk/build/m4/hdf5.m4 2008-01-29 07:37:07 UTC (rev 9167)
@@ -1,69 +0,0 @@
-##############################################################################
-# -*- Autoconf -*-
-#
-#
-
-##############################################################################
-#
-# CIGMA_OPTIONS_HDF5
-#
-AC_DEFUN([CIGMA_OPTIONS_HDF5], [
- AC_ARG_VAR(HDF5_HOME, [home path to HDF5 library])
- AC_ARG_WITH([hdf5],
- [AC_HELP_STRING([--with-hdf5],
- [enable HDF5 @<:@default=/usr@:>@])],
- [with_hdf5="$withval"],
- [with_hdf5="/usr"])
-])
-
-##############################################################################
-#
-# CIGMA_PATH_HDF5([action-if-found], [action-if-not-found])
-#
-AC_DEFUN([CIGMA_PATH_HDF5],[
-
- if [[ $with_hdf5 = "yes" ]]; then
-
- dnl in case user wrote --with-hdf5=yes
- with_hdf5="/usr"
-
- fi
-
-
- if [[ $with_hdf5 != "no" ]]; then
-
- HDF5_PREFIX="$with_hdf5"
-
- AC_CHECK_FILE([$HDF5_PREFIX/include/hdf5.h],[hdf5Found="OK"])
- AC_MSG_CHECKING([if HDF5 is installed in $HDF5_PREFIX])
-
- if [[ -z "$hdf5Found" ]]; then
-
- dnl HDF5 not found!
- AC_MSG_RESULT([no])
- $3
-
- else
-
- dnl HDF5 found!
- AC_MSG_RESULT([yes])
- HDF5_CFLAGS="-I$HDF5_PREFIX/include"
- HDF5_CXXFLAGS="$HDF5_CFLAGS"
- HDF5_LIBS="-lhdf5"
- HDF5_LDFLAGS="-L$HDF5_PREFIX/lib $HDF5_LIBS -Wl,--rpath -Wl,$HDF5_PREFIX/lib"
- $2
-
- fi
-
- else
-
- dnl user specified --with-hdf5=no
- dnl nothing to do?
- /bin/false
-
- fi # if [[ $with_hdf5 != "no" ]];
-
-
-])
-
-# vim: syntax=config
Deleted: cs/benchmark/cigma/trunk/build/m4/vtk.m4
===================================================================
--- cs/benchmark/cigma/trunk/build/m4/vtk.m4 2008-01-29 07:37:05 UTC (rev 9166)
+++ cs/benchmark/cigma/trunk/build/m4/vtk.m4 2008-01-29 07:37:07 UTC (rev 9167)
@@ -1,157 +0,0 @@
-##############################################################################
-# -*- Autoconf -*-
-#
-# Implements the AM_OPTIONS_VTK and AM_PATH_VTK macros.
-# The AM_OPTIONS_VTK macro adds the --with-vtk=path option,
-# and the AM_PATH_VTK macro is used to detect VTK presence,
-# location and version.
-#
-# Modified from http://www.vtk.org/Wiki/VTK_Autoconf
-# Originally by Francesco Montorsi
-#
-
-
-##############################################################################
-#
-# AM_OPTIONS_VTK
-#
-# Adds the --with-vtk=PATH option to the configure options
-#
-AC_DEFUN([AM_OPTIONS_VTK],[
- AC_ARG_WITH([vtk],
- [AC_HELP_STRING(
- [--with-vtk],
- [The prefix where VTK is installed (default is /usr/local)])],
- [with_vtk=$withval],
- [with_vtk="/usr/local"])
- AC_ARG_WITH([vtk-version],
- [AC_HELP_STRING(
- [--with-vtk-version],
- [VTK's include directory name is vtk-suffix, e.g., vtk-5.0/.
- What's the suffix? (Default -5.0)])],
- [vtk_suffix=$withval],
- [vtk_suffix="-5.0"])
-])
-
-##############################################################################
-#
-# AM_PATH_VTK([minimum-version], [action-if-found], [action-if-not-found])
-#
-# NOTE: [minimum-version] must be in the form [X.Y.Z]
-#
-AC_DEFUN([AM_PATH_VTK],[
-
- dnl do we want to check for VTK?
- if [[ $with_vtk = "yes" ]]; then
- dnl in case user wrote --with-vtk=yes
- with_vtk="/usr/local"
- fi
-
- if [[ $with_vtk != "no" ]]; then
-
- VTK_PREFIX="$with_vtk"
-
- AC_CHECK_FILE([$VTK_PREFIX/include/vtk$vtk_suffix/vtkCommonInstantiator.h],
- [vtkFound="OK"])
- AC_MSG_CHECKING([if VTK is installed in $VTK_PREFIX])
-
- if [[ -z "$vtkFound" ]]; then
-
- dnl VTK not found!
- AC_MSG_RESULT([no])
- $3
-
- else
-
- dnl VTK found!
- AC_MSG_RESULT([yes])
-
- dnl these are the VTK libraries of a default build
- VTK_LIBS="-lvtkCommon -lvtkFiltering"
-
- dnl set VTK c,cpp,ld flags
- VTK_CFLAGS="-I$VTK_PREFIX/include/vtk$vtk_suffix"
- VTK_CXXFLAGS="$VTK_CFLAGS"
- VTK_LDFLAGS="-L$VTK_PREFIX/lib/vtk $VTK_LIBS"
-
- dnl now, eventually check version
- if [[ -n "$1" ]]; then
-
- dnl the version of VTK we need
- maj=`echo $1 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- min=`echo $1 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- rel=`echo $1 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- AC_MSG_CHECKING([if VTK version is at least $maj.$min.$rel])
-
- dnl in order to be able to compile the following test program,
- dnl we need to add to the current flags, the VTK settings...
- OLD_CFLAGS=$CFLAGS
- OLD_CXXFLAGS=$CXXFLAGS
- OLD_LDFLAGS=$LDFLAGS
- CFLAGS="$VTK_CFLAGS $CFLAGS"
- CXXFLAGS="$VTK_CXXFLAGS $CXXFLAGS"
- LDFLAGS="$VTK_LDFLAGS $LDFLAGS"
-
- dnl check if the installed VTK is greater or not
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([
- #include <vtk/vtkConfigure.h>
- #include <stdio.h>
- ],[
- printf("VTK version is: %d.%d.%d",
- VTK_MAJOR_VERSION,
- VTK_MINOR_VERSION,
- VTK_BUILD_VERSION);
-
- #if VTK_MAJOR_VERSION < $maj
- #error Installed VTK is too old!
- #endif
-
- #if VTK_MINOR_VERSION < $min
- #error Installed VTK is too old!
- #endif
-
- #if VTK_BUILD_VERSION < $rel
- #error Installed VTK is too old!
- #endif
- ])
- ], [vtkVersion="OK"])
-
- if [[ "$vtkVersion" = "OK" ]]; then
-
- AC_MSG_RESULT([yes])
-
- $2
-
- else
-
- AC_MSG_RESULT([no])
-
- dnl restore all flags without VTK values
- CFLAGS=$OLD_CFLAGS
- CXXFLAGS=$OLD_CXXFLAGS
- LDFLAGS=$OLD_LDFLAGS
-
- $3
- fi # if [[ $vtkVersion = "OK ]];
-
- else
-
- dnl if we don't have to check for minimum version
- dnl (because the user did not set that option),
- dnl then we can execute here the block action-if-found
- CFLAGS="$VTK_CFLAGS $CFLAGS"
- CXXFLAGS="$VTK_CXXFLAGS $CXXFLAGS"
- LDFLAGS="$VTK_LDFLAGS $LDFLAGS"
-
- $2
-
- fi #if [[ -n "$1" ]];
-
- fi # if [[ -z "$vtkFound" ]];
- fi # $with_vtk != "no"
-])
-
-
-
-# vim: syntax=config
More information about the cig-commits
mailing list