root/juggler/branches/2.0/macros/vpr.m4

Revision 17069, 7.8 kB (checked in by patrickh, 4 years ago)

Use the new macro in Doozer++ 2.0.1 for simplifying non-cached version
comparison tests.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 dnl **************** <VPR heading BEGIN do not edit this line> ****************
2 dnl
3 dnl VR Juggler Portable Runtime
4 dnl
5 dnl Original Authors:
6 dnl   Allen Bierbaum, Patrick Hartling, Kevin Meinert, Carolina Cruz-Neira
7 dnl
8 dnl -----------------------------------------------------------------
9 dnl File:          $RCSfile$
10 dnl Date modified: $Date$
11 dnl Version:       $Revision$
12 dnl -----------------------------------------------------------------
13 dnl
14 dnl ***************** <VPR heading END do not edit this line> *****************
15
16 dnl ************* <auto-copyright.pl BEGIN do not edit this line> *************
17 dnl
18 dnl VR Juggler is (C) Copyright 1998-2005 by Iowa State University
19 dnl
20 dnl Original Authors:
21 dnl   Allen Bierbaum, Christopher Just,
22 dnl   Patrick Hartling, Kevin Meinert,
23 dnl   Carolina Cruz-Neira, Albert Baker
24 dnl
25 dnl This library is free software; you can redistribute it and/or
26 dnl modify it under the terms of the GNU Library General Public
27 dnl License as published by the Free Software Foundation; either
28 dnl version 2 of the License, or (at your option) any later version.
29 dnl
30 dnl This library is distributed in the hope that it will be useful,
31 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
32 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
33 dnl Library General Public License for more details.
34 dnl
35 dnl You should have received a copy of the GNU Library General Public
36 dnl License along with this library; if not, write to the
37 dnl Free Software Foundation, Inc., 59 Temple Place - Suite 330,
38 dnl Boston, MA 02111-1307, USA.
39 dnl
40 dnl ************** <auto-copyright.pl END do not edit this line> **************
41
42 dnl ---------------------------------------------------------------------------
43 dnl VPR_PATH([minimum-version, [action-if-found [, action-if-not-found]]])
44 dnl
45 dnl Test for VPR and then define VPR_CXXFLAGS, VPR_LIBS, and VPR_LIBS_STATIC.
46 dnl ---------------------------------------------------------------------------
47 AC_DEFUN([VPR_PATH],
48 [
49     DPP_PREREQ([2.0.1])
50
51     dnl Get the cflags and libraries from the vpr-config script
52     AC_ARG_WITH(vpr,
53                 [  --with-vpr=<PATH>       Directory where VPR is
54                           installed (optional)            [No default]],
55                 vpr_config_prefix="$withval", vpr_config_prefix="")
56     AC_ARG_WITH(vpr-exec-prefix,
57                 [  --with-vpr-exec-prefix=<PATH>
58                           Exec prefix where VPR is
59                           installed (optional)            [No default]],
60                 vpr_config_exec_prefix="$withval", vpr_config_exec_prefix="")
61
62     if test "x$vpr_config_exec_prefix" != "x" ; then
63         vpr_config_args="$vpr_config_args --exec-prefix=$vpr_config_exec_prefix"
64
65         if test x${VPR_CONFIG+set} != xset ; then
66             VPR_CONFIG="$vpr_config_exec_prefix/bin/vpr-config"
67         fi
68     fi
69
70     if test "x$vpr_config_prefix" != "x" ; then
71         vpr_config_args="$vpr_config_args --prefix=$vpr_config_prefix"
72
73         if test x${VPR_CONFIG+set} != xset ; then
74             VPR_CONFIG="$vpr_config_prefix/bin/vpr-config"
75         fi
76     fi
77
78     if test "x$VPR_BASE_DIR" != "x" ; then
79         vpr_config_args="$vpr_config_args --prefix=$VPR_BASE_DIR"
80
81         if test x${VPR_CONFIG+set} != xset ; then
82             VPR_CONFIG="$VPR_BASE_DIR/bin/vpr-config"
83         fi
84     fi
85
86     AC_PATH_PROG(VPR_CONFIG, vpr-config, no)
87     min_vpr_version=ifelse([$1], ,0.0.1,$1)
88
89     dnl Do a sanity check to ensure that $VPR_CONFIG actually works.
90     if ! (eval $VPR_CONFIG --cxxflags >/dev/null 2>&1) 2>&1 ; then
91         VPR_CONFIG='no'
92     fi
93
94     no_vpr=''
95     if test "x$VPR_CONFIG" = "xno" ; then
96         no_vpr=yes
97     else
98         VPR_CXXFLAGS=`$VPR_CONFIG $vpr_config_args --cxxflags $ABI`
99         VPR_INCLUDES=`$VPR_CONFIG $vpr_config_args --includes`
100         VPR_LIBS_LD="`$VPR_CONFIG $vpr_config_args --libs $ABI --linker`"
101         VPR_LIBS_CC="`$VPR_CONFIG $vpr_config_args --libs $ABI`"
102         VPR_PROF_LIBS_LD="`$VPR_CONFIG $vpr_config_args --libs $ABI --linker --profiled`"
103         VPR_PROF_LIBS_CC="`$VPR_CONFIG $vpr_config_args --libs $ABI --profiled`"
104         VPR_LIBS_STATIC_LD="`$VPR_CONFIG $vpr_config_args --libs $ABI --linker --static`"
105         VPR_LIBS_STATIC_CC="`$VPR_CONFIG $vpr_config_args --libs $ABI --static`"
106         VPR_PROF_LIBS_STATIC_LD="`$VPR_CONFIG $vpr_config_args --libs $ABI --linker --static --profiled`"
107         VPR_PROF_LIBS_STATIC_CC="`$VPR_CONFIG $vpr_config_args --libs $ABI --static --profiled`"
108         VPR_EXTRA_LIBS_CC=`$VPR_CONFIG $vpr_config_args --extra-libs $ABI`
109         VPR_EXTRA_LIBS_LD=`$VPR_CONFIG $vpr_config_args --extra-libs $ABI --linker`
110
111         VPR_CXXFLAGS_MIN=`$VPR_CONFIG $vpr_config_args --cxxflags $ABI --min`
112         VPR_INCLUDES_MIN=`$VPR_CONFIG $vpr_config_args --includes --min`
113         VPR_LIBS_LD_MIN="`$VPR_CONFIG $vpr_config_args --libs $ABI --linker --min`"
114         VPR_LIBS_CC_MIN="`$VPR_CONFIG $vpr_config_args --libs $ABI --min`"
115         VPR_PROF_LIBS_LD_MIN="`$VPR_CONFIG $vpr_config_args --libs $ABI --linker --min --profiled`"
116         VPR_PROF_LIBS_CC_MIN="`$VPR_CONFIG $vpr_config_args --libs $ABI --min --profiled`"
117         VPR_LIBS_STATIC_LD_MIN="`$VPR_CONFIG $vpr_config_args --libs $ABI --linker --static --min`"
118         VPR_LIBS_STATIC_CC_MIN="`$VPR_CONFIG $vpr_config_args --libs $ABI --static --min`"
119         VPR_PROF_LIBS_STATIC_LD_MIN="`$VPR_CONFIG $vpr_config_args --libs $ABI --linker --static --min --profiled`"
120         VPR_PROF_LIBS_STATIC_CC_MIN="`$VPR_CONFIG $vpr_config_args --libs $ABI --static --min --profiled`"
121         VPR_EXTRA_LIBS_CC_MIN=`$VPR_CONFIG $vpr_config_args --extra-libs $ABI --min`
122         VPR_EXTRA_LIBS_LD_MIN=`$VPR_CONFIG $vpr_config_args --extra-libs $ABI --linker --min`
123         VPR_VERSION=`$VPR_CONFIG --version`
124
125         DPP_VERSION_CHECK_MSG_NO_CACHE([VPR], [$VPR_VERSION],
126                                        [$min_vpr_version], [$2], [$3])
127     fi
128
129     if test "x$no_vpr" != x ; then
130         if test "$VPR_CONFIG" = "no" ; then
131             echo "*** The vpr-config script installed by VPR could not be found"
132             echo "*** If VPR was installed in PREFIX, make sure PREFIX/bin is in"
133             echo "*** your path, or set the VPR_CONFIG environment variable to the"
134             echo "*** full path to vpr-config."
135         fi
136
137         VPR_CXXFLAGS=''
138         VPR_LIBS_LD=''
139         VPR_LIBS_CC=''
140         VPR_PROF_LIBS_LD=''
141         VPR_PROF_LIBS_CC=''
142         VPR_LIBS_STATIC_LD=''
143         VPR_LIBS_STATIC_CC=''
144         VPR_PROF_LIBS_STATIC_LD=''
145         VPR_PROF_LIBS_STATIC_CC=''
146         VPR_EXTRA_LIBS_CC=''
147         VPR_EXTRA_LIBS_LD=''
148
149         VPR_CXXFLAGS_MIN=''
150         VPR_INCLUDES_MIN=''
151         VPR_LIBS_LD_MIN=''
152         VPR_LIBS_CC_MIN=''
153         VPR_PROF_LIBS_LD_MIN=''
154         VPR_PROF_LIBS_CC_MIN=''
155         VPR_LIBS_STATIC_LD_MIN=''
156         VPR_LIBS_STATIC_CC_MIN=''
157         VPR_PROF_LIBS_STATIC_LD_MIN=''
158         VPR_PROF_LIBS_STATIC_CC_MIN=''
159         VPR_EXTRA_LIBS_CC_MIN=''
160         VPR_EXTRA_LIBS_LD_MIN=''
161         VPR_VERSION='-1'
162         ifelse([$3], , :, [$3])
163     fi
164
165     AC_SUBST(VPR_CXXFLAGS)
166     AC_SUBST(VPR_INCLUDES)
167     AC_SUBST(VPR_LIBS_LD)
168     AC_SUBST(VPR_LIBS_CC)
169     AC_SUBST(VPR_PROF_LIBS_LD)
170     AC_SUBST(VPR_PROF_LIBS_CC)
171     AC_SUBST(VPR_LIBS_STATIC_LD)
172     AC_SUBST(VPR_LIBS_STATIC_CC)
173     AC_SUBST(VPR_PROF_LIBS_STATIC_LD)
174     AC_SUBST(VPR_PROF_LIBS_STATIC_CC)
175     AC_SUBST(VPR_EXTRA_LIBS_CC)
176     AC_SUBST(VPR_EXTRA_LIBS_LD)
177     AC_SUBST(VPR_CXXFLAGS_MIN)
178
179     AC_SUBST(VPR_CXXFLAGS_MIN)
180     AC_SUBST(VPR_INCLUDES_MIN)
181     AC_SUBST(VPR_LIBS_LD_MIN)
182     AC_SUBST(VPR_LIBS_CC_MIN)
183     AC_SUBST(VPR_PROF_LIBS_LD_MIN)
184     AC_SUBST(VPR_PROF_LIBS_CC_MIN)
185     AC_SUBST(VPR_LIBS_STATIC_LD_MIN)
186     AC_SUBST(VPR_LIBS_STATIC_CC_MIN)
187     AC_SUBST(VPR_PROF_LIBS_STATIC_LD_MIN)
188     AC_SUBST(VPR_PROF_LIBS_STATIC_CC_MIN)
189     AC_SUBST(VPR_EXTRA_LIBS_CC_MIN)
190     AC_SUBST(VPR_EXTRA_LIBS_LD_MIN)
191     AC_SUBST(VPR_VERSION)
192 ])
Note: See TracBrowser for help on using the browser.