Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
openfpm_numerics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sbalzarini Lab
Software
Parallel Computing
OpenFPM
openfpm_numerics
Commits
1465a106
Commit
1465a106
authored
8 years ago
by
Pietro Incardona
Browse files
Options
Downloads
Patches
Plain Diff
Adding missing macro
parent
8868bc40
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
m4/ax_libhilbert.m4
+143
-0
143 additions, 0 deletions
m4/ax_libhilbert.m4
with
143 additions
and
0 deletions
m4/ax_libhilbert.m4
0 → 100644
+
143
−
0
View file @
1465a106
# ===========================================================================
#
# ===========================================================================
#
# SYNOPSIS
#
# AX_LIB_HILBERT()
#
# DESCRIPTION
#
# This macro provides tests of the availability of libHilbert library.
#
#
# The macro adds a --with-libhilbert option accepting one of three values:
#
# no - do not check for the libhilbert library.
# yes - do check for libhilbert library in standard locations.
# path - complete path to the libhilbert library.
#
# If libhilbert is successfully found, this macro calls
#
# AC_SUBST(LIBHILBERT_INCLUDE)
# AC_SUBST(LIBHILBERT_LIB)
# AC_DEFINE(HAVE_LIBHILBERT)
#
# and sets with_libhilbert="yes"
#
# If libhilbert is disabled or not found, this macros sets with_libhilbert="no"
#
# Your configuration script can test $with_libhilbert to take any further
# actions. LIBHILBERT_{INCLUDE,LIB} may be used when building with C or C++.
#
# To use the macro, one would code one of the following in "configure.ac"
# before AC_OUTPUT:
#
# 1) dnl Check for libhilbert support
# AX_LIB_HILBERT()
#
# One could test $with_libhilbert for the outcome or display it as follows
#
# echo "libhilbert support: $with_libhilbert"
#
# You could also for example, override the default CC in "configure.ac"
#
# LICENSE
#
# Copyright (c) 2009 Timothy Brown <tbrown@freeshell.org>
# Copyright (c) 2010 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. This file is offered as-is, without any
# warranty.
#serial 12
AC_DEFUN([AX_LIB_HILBERT], [
AC_MSG_CHECKING(for libhilbert library)
AC_REQUIRE([AC_PROG_CC])
#
# User hints...
#
AC_ARG_VAR([LIBHILBERT], [Libhilbert library location])
AC_ARG_WITH([libhilbert],
[AC_HELP_STRING([--with-libhilbert],
[user defined path to LIBHILBERT library])],
[
if test -n "$LIBHILBERT" ; then
AC_MSG_RESULT(yes)
with_libhilbert=$LIBHILBERT
elif test "$withval" != no ; then
AC_MSG_RESULT(yes)
with_libhilbert=$withval
else
AC_MSG_RESULT(no)
fi
],
[
if test -n "$PETSC" ; then
with_libhilbert=$PETSC
AC_MSG_RESULT(yes)
else
with_petsc=/usr
if test ! -f "$with_libhilbert/include/hilbertKey.h" ; then
with_libhilbert=/usr/local
if test ! -f "$with_libhilbert/include/hilbertKey.h" ; then
with_libhilbert=""
AC_MSG_RESULT(failed)
else
AC_MSG_RESULT(yes)
fi
else
AC_MSG_RESULT(yes)
fi
fi
])
#
# locate LIBHILBERT library
#
if test -n "$with_libhilbert" ; then
old_CC=$CC
old_CFLAGS=$CFLAGS
old_LDFLAGS=$LDFLAGS
CFLAGS="-I$with_libhilbert/include "
LDFLAGS="-L$with_libhilbert/lib "
CC=$CXX
AC_LANG_SAVE
AC_LANG_C
AC_CHECK_HEADER([hilbertKey.h],libhilbert_h=yes,## Copy LIB and include in the target directory
AC_MSG_WARN([could not find header file hilbertKey.h]))
AC_CHECK_LIB([libhilbert],[getIntCoordFromHKey],libhilbert_lib=yes,AC_MSG_WARN([could not find libhilbert]))
AC_LANG_RESTORE
CFLAGS=$old_CFLAGS
LDFLAGS=$old_LDFLAGS
CC=$old_CC
AC_MSG_CHECKING(LIBHILBERT in $with_libhilbert)
if test x"$libhilbert_lib" = x"yes" -a x"$libhilbert_h" = x"yes" ; then
AC_SUBST(LIBHILBERT_INCLUDE, [-I$with_libhilbert/include])
AC_SUBST(LIBHILBERT_LIB, ["-L$with_libhilbert/lib -llibhilbert"])
AC_MSG_RESULT(ok)
AC_DEFINE(HAVE_LIBHILBERT,1,[Define if you have LIBHILBERT library])
else
AC_MSG_RESULT(failed)
fi
fi
#
#
#
if test x = x"$LIBHILBERT_LIB" ; then
ifelse([$2],,[],[$2])
:
else
ifelse([$1],,[],[$1])
:
fi
])dnl AX_LIB_HILBERT
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment