diff options
author | Rhys Ulerich <rhys.ulerich@gmail.com> | 2008-11-07 00:07:19 +0100 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2008-11-07 00:07:19 +0100 |
commit | 3a26712ace5ab2a47ea5e8f17d1aec80f373fdc7 (patch) | |
tree | 0ed92dac4c67c0d22d189c6c6587dfce20e358ca /m4/ax_add_am_trilinos_makefile_export.m4 | |
parent | d3e9b1463db867d2c396e0349fd62169c17f9954 (diff) | |
download | autoconf-archive-3a26712ace5ab2a47ea5e8f17d1aec80f373fdc7.tar.gz |
Updated AX_TRILINOS macros.
Diffstat (limited to 'm4/ax_add_am_trilinos_makefile_export.m4')
-rw-r--r-- | m4/ax_add_am_trilinos_makefile_export.m4 | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/m4/ax_add_am_trilinos_makefile_export.m4 b/m4/ax_add_am_trilinos_makefile_export.m4 new file mode 100644 index 0000000..f95713c --- /dev/null +++ b/m4/ax_add_am_trilinos_makefile_export.m4 @@ -0,0 +1,51 @@ +# =========================================================================== +# http://autoconf-archive.cryp.to/ax_add_am_trilinos_makefile_export.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_ADD_AM_TRILINOS_MAKEFILE_EXPORT(EXPORT_SUFFIX [, ACTION-IF-NOT-FOUND]) +# +# DESCRIPTION +# +# Checks if a file named <Makefile.export.EXPORT_SUFFIX> appears in the +# $TRILINOS_INCLUDE directory. If so, adds an include for it using the +# AX_AM_MACROS framework. +# +# If ACTION-IF-NOT-FOUND is not provided, configure fails. +# +# LAST MODIFICATION +# +# 2008-11-02 +# +# COPYLEFT +# +# Copyright (c) 2008 Rhys Ulerich <rhys.ulerich@gmail.com> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. + +AC_DEFUN([AX_ADD_AM_TRILINOS_MAKEFILE_EXPORT],[ +AC_REQUIRE([AX_TRILINOS_BASE]) +AC_REQUIRE([AX_AM_MACROS]) + +AC_CACHE_CHECK( + [for file ${TRILINOS_INCLUDE}/Makefile.export.$1], + [ax_cv_add_am_trilinos_makefile_export_]translit($1,[. ],[_])[_exists], + [[ax_cv_add_am_trilinos_makefile_export_]translit($1,[. ],[_])[_exists]=no + test -f "${TRILINOS_INCLUDE}/Makefile.export.$1" && dnl + [ax_cv_add_am_trilinos_makefile_export_]translit($1,[. ],[_])[_exists]=yes]) + +if test "${[ax_cv_add_am_trilinos_makefile_export_]translit($1,[. ],[_])[_exists]}" = "yes" +then +AX_ADD_AM_MACRO([ +include ${TRILINOS_INCLUDE}/Makefile.export.$1 +]) +else + ifelse([$2],,AC_MSG_ERROR([Could not find ${TRILINOS_INCLUDE}/Makefile.export.$1. Was Trilinos compiled with --enable-export-makefiles?]),[ + AC_MSG_WARN([Could not find ${TRILINOS_INCLUDE}/Makefile.export.$1. Was Trilinos compiled with --enable-export-makefiles?]) + $2]) +fi + +]) |