Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
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
RadioObservatory
LOFAR
Commits
da7076b7
Commit
da7076b7
authored
22 years ago
by
Ger van Diepen
Browse files
Options
Downloads
Patches
Plain Diff
%[BugId: 76]%
Added with-blitz-libdir Added option to make blitz++ mandatory
parent
2f6ccc41
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
autoconf_share/lofar_blitz.m4
+65
-27
65 additions, 27 deletions
autoconf_share/lofar_blitz.m4
with
65 additions
and
27 deletions
autoconf_share/lofar_blitz.m4
+
65
−
27
View file @
da7076b7
...
@@ -25,7 +25,8 @@
...
@@ -25,7 +25,8 @@
#
#
# Macro to check for BLITZ installation
# Macro to check for BLITZ installation
#
#
# lofar_BLITZ([DEFAULT-PREFIX])
# lofar_BLITZ(option, [DEFAULT-PREFIX])
# option 0 means that Blitz++ is optional, otherwise mandatory.
#
#
# e.g. lofar_BLITZ(["/usr/local/blitz"])
# e.g. lofar_BLITZ(["/usr/local/blitz"])
# -------------------------
# -------------------------
...
@@ -33,40 +34,74 @@
...
@@ -33,40 +34,74 @@
AC_DEFUN(lofar_BLITZ,dnl
AC_DEFUN(lofar_BLITZ,dnl
[dnl
[dnl
AC_PREREQ(2.13)dnl
AC_PREREQ(2.13)dnl
ifelse($1, [], define(DEFAULT_BLITZ_PREFIX,[/usr/local/blitz]), define(DEFAULT_BLITZ_PREFIX,$1))
ifelse($1, [], [lfr_option=0], [lfr_option=$1])
ifelse($2, [], define(DEFAULT_BLITZ_PREFIX,[/usr/local]), define(DEFAULT_BLITZ_PREFIX,$2))
AC_ARG_WITH(blitz,
AC_ARG_WITH(blitz,
[ --with-blitz[=PFX] prefix where Blitz is installed (default=]DEFAULT_BLITZ_PREFIX[)],
[ --with-blitz[=PFX] prefix where Blitz is installed (default=]DEFAULT_BLITZ_PREFIX[)],
[with_blitz=$withval],
[with_blitz=$withval],
[with_blitz="no"])
[with_blitz=""])
[
AC_ARG_WITH(blitz-libdir,
if test "$with_blitz" = "no"; then
[ --with-blitz-libdir=PFX prefix where Blitz library is installed],
enable_blitz=no
[with_blitzdir=$withval],
else
[with_blitzdir=""])
if test "$with_blitz" = "yes"; then
blitz_prefix=]DEFAULT_BLITZ_PREFIX
[
[
enable_blitz=no
if test "$lfr_option" = "1"; then
enable_blitz=yes
fi
if test "$with_blitz" != "no"; then
if test "$with_blitz" = ""; then
blitz_prefix=]DEFAULT_BLITZ_PREFIX[
if test "$with_blitzdir" != ""; then
enable_blitz=yes
fi
else
else
blitz_prefix=$withval
if test "$with_blitz" = "yes"; then
blitz_prefix=]DEFAULT_BLITZ_PREFIX[
else
blitz_prefix=$withval
fi
enable_blitz=yes
fi
fi
enable_blitz=yes
]
]
##
##
##
Check in normal location and suggested location
##
Look for header file in suggested location or in its include subdir
##
##
AC_CHECK_FILE([$blitz_prefix/blitz/array.h],
AC_CHECK_FILE([$blitz_prefix/blitz/array.h],
[l
ofar_cv
_header_blitz=
yes
],
[l
fr
_header_blitz=
$blitz_prefix/blitz
],
[l
ofar_cv
_header_blitz=no])dnl
[l
fr
_header_blitz=no])dnl
[
[
if test $lofar_cv_header_blitz = yes ; then
if test "$lfr_header_blitz" != "no" ; then
if test "$with_blitzdir" = ""; then
BLITZ_PATH="$blitz_prefix"
with_blitzdir=$blitz_prefix/blitz/lib
fi
else
]
AC_CHECK_FILE([$blitz_prefix/include/blitz/array.h],
[lfr_header_blitz=$blitz_prefix/include],
[lfr_lib_blitz=no])dnl
[
if test "$lfr_header_blitz" != "no"; then
if test "$with_blitzdir" = ""; then
with_blitzdir=$blitz_prefix/lib
fi
fi
fi
if test "$with_blitzdir" != ""; then
]
AC_CHECK_FILE([$with_blitzdir/libblitz.a],
[lfr_lib_blitz=$with_blitzdir],
[lfr_lib_blitz=no])dnl
[
fi
BLITZ_CPPFLAGS="-I$BLITZ_PATH"
if test "$lfr_header_blitz" != "no" -a "$lfr_lib_blitz" != "no" ; then
BLITZ_CPPFLAGS="-I$lfr_header_blitz"
BLITZ_CXXFLAGS=
BLITZ_CXXFLAGS=
if test "$lofar_compiler" = "gnu"; then
if test "$lofar_compiler" = "gnu"; then
BLITZ_CXXFLAGS="-Wno-unused -ftemplate-depth-30"
BLITZ_CXXFLAGS="-Wno-unused -ftemplate-depth-30"
fi
fi
BLITZ_LDFLAGS="-L$
BLITZ_PATH/lib
"
BLITZ_LDFLAGS="-L$
lfr_lib_blitz
"
BLITZ_LIBS="-lblitz -lm"
BLITZ_LIBS="-lblitz -lm"
CPPFLAGS="$CPPFLAGS $BLITZ_CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BLITZ_CPPFLAGS"
...
@@ -75,16 +110,19 @@ AC_CHECK_FILE([$blitz_prefix/blitz/array.h],
...
@@ -75,16 +110,19 @@ AC_CHECK_FILE([$blitz_prefix/blitz/array.h],
LIBS="$LIBS $BLITZ_LIBS"
LIBS="$LIBS $BLITZ_LIBS"
]
]
dnl
dnl
AC_SUBST(CPPFLAGS)dnl
AC_SUBST(CPPFLAGS)dnl
AC_SUBST(CXXFLAGS)dnl
AC_SUBST(CXXFLAGS)dnl
AC_SUBST(LDFLAGS)dnl
AC_SUBST(LDFLAGS)dnl
AC_SUBST(LIBS)dnl
AC_SUBST(LIBS)dnl
dnl
dnl
AC_DEFINE(HAVE_BLITZ, 1, [Define if Blitz is installed])dnl
AC_DEFINE(HAVE_BLITZ, 1, [Define if Blitz is installed])dnl
[
[
else]
else
AC_MSG_ERROR([Could not find Blitz in $blitz_prefix])
if test "$enable_blitz" = "yes" ; then
]
AC_MSG_ERROR([Could not find Blitz headers or library in $blitz_prefix])
[
[
fi
enable_blitz=no
enable_blitz=no
fi
fi
fi]
fi]
...
...
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