ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/ac-tools/configure.in
(Generate patch)

Comparing trunk/OOPSE-3.0/ac-tools/configure.in (file contents):
Revision 1535 by gezelter, Wed Oct 6 21:22:43 2004 UTC vs.
Revision 2452 by gezelter, Thu Nov 17 20:39:38 2005 UTC

# Line 115 | Line 115 | dnl check for system getopt
115   AC_SUBST(F90_MODULE_NAMES)
116   AC_LANG_POP
117  
118 < dnl check for system getopt
118 > AC_LANG_CPLUSPLUS
119 > dnl Checks for libraries.
120 > AC_CHECK_LIB(m, asin, , exit)
121 >
122   AC_LANG_PUSH(C)
123 + ACX_CHECK_ZLIB
124 + dnl Checks for header files.
125 + AC_CHECK_HEADERS(sys/time.h unistd.h stdlib.h stdio.h conio.h string.h)
126 + AC_CHECK_HEADERS(strstream.h iostream.h fstream.h math.h time.h)
127 + AC_LANG_CPLUSPLUS
128 + AC_CHECK_HEADERS(ctype.h iostream fstream sstream strstream)
129 + AC_LANG_C
130 + AC_CHECK_HEADERS(sys/pstat.h sys/sysmp.h sys/sysinfo.h)
131 + AC_CHECK_HEADERS(sys/table.h sys/param.h sys/sysctl.h sys/sytemcfg.h)
132 + AC_CHECK_HEADERS(machine/hal_sysinfo.h)
133 + AC_CHECK_FUNCS(pstat_getstatic sysmp getsysinfo sysctl table)
134 + # special check for _system_configuration because AIX <4.3.2 do not
135 + # contain the `physmem' member.
136 + AC_MSG_CHECKING([for external symbol _system_configuration])
137 + AC_TRY_COMPILE([#include <sys/systemcfg.h>],
138 +               [double x = _system_configuration.physmem;],
139 +  [AC_MSG_RESULT([yes])
140 +  AC_DEFINE(HAVE__SYSTEM_CONFIGURATION, 1,
141 +            [Define if you have the _system_configuration variable.])],
142 +  [AC_MSG_RESULT([no])])
143 + AC_HEADER_TIME
144 +
145 + dnl Checks for typedefs, structures, and compiler characteristics.
146 + AC_CHECK_TYPES(clock_t)
147 + AC_C_CONST
148 + AC_C_INLINE
149 +
150 + dnl Checks for library functions.
151 + AC_CHECK_FUNCS([rint sranddev])
152 +
153 + dnl check for system getopt
154   adl_FUNC_GETOPT_LONG
155  
156   dnl check for strong optimization options
# Line 137 | Line 171 | AC_CHECK_PROG(AR, ar, ar, NONE)
171   AC_PROG_RANLIB
172   AC_PROG_YACC
173   AC_PROG_LEX
174 + AX_SYS_PERLSHARPBANG
175   AC_CHECK_PROG(AR, ar, ar, NONE)
176   if test "$AR" = "NONE"; then
177    AC_MSG_ERROR(--> Can't find \`ar'!)
# Line 144 | Line 179 | fi
179    exit 1
180   fi
181  
182 + AC_PATH_PROG(PS, ps)
183 + AC_CACHE_CHECK([for POSIX or BSD ps syntax], ac_cv_prog_ps_syntax, [
184 +        if $PS ax -o rss > /dev/null 2>&1; then
185 +                ac_cv_prog_ps_ax=yes
186 +        else
187 +                ac_cv_prog_ps_ax=no
188 +        fi
189 +        if $PS -ef -o rss > /dev/null 2>&1; then
190 +                ac_cv_prog_ps_ef=yes
191 +        else
192 +                ac_cv_prog_ps_ef=no
193 +        fi
194 +        if test "$ac_cv_prog_ps_ax" = yes; then
195 +                ac_cv_prog_ps_syntax=BSD
196 +        else
197 +                if test "$ac_cv_prog_ps_ef" = yes; then
198 +                        ac_cv_prog_ps_syntax=POSIX
199 +                else
200 +                        AC_MSG_ERROR(Could not determine ps syntax)
201 +                fi
202 +        fi
203 + ])
204  
205 + AC_DEFINE_UNQUOTED(PSCOMMAND, $PS, [Path to ps program])
206 + AC_DEFINE([OBAPI], [], [Used to export symbols for DLL / shared library builds])
207 +
208 +
209 + if test "$ac_cv_prog_ps_syntax" = BSD; then
210 +  AC_DEFINE(PSTYPE_IS_BSD, 1)
211 + else
212 +   if test "$ac_cv_prog_ps_syntax" = POSIX; then
213 +       AC_DEFINE(PSTYPE_IS_POSIX, 1)
214 +   else
215 +       AC_MSG_ERROR(Unknown ps syntax type!)
216 +   fi
217 + fi
218 +
219   AC_ARG_WITH(mpi,
220          [AC_HELP_STRING([--with-mpi=<prefix>],
221                  [compile with MPI installed in <prefix> [default=no]])],
# Line 164 | Line 235 | AC_ARG_WITH(sprng,
235   fi
236   AC_SUBST(USE_MPI)
237  
238 < AC_ARG_WITH(sprng,
239 <        [AC_HELP_STRING([--with-sprng=<prefix>],
240 <                [compile with SPRNG installed in <prefix> [default=/usr/local]])],
241 <        with_sprng=$withval,
242 <        with_sprng="/usr/local")
238 > dnl AC_ARG_WITH(sprng,
239 > dnl     [AC_HELP_STRING([--with-sprng=<prefix>],
240 > dnl             [compile with SPRNG installed in <prefix> [default=/usr/local]])],
241 > dnl     with_sprng=$withval,
242 > dnl     with_sprng="/usr/local")
243 > dnl
244 > dnl case "x$with_sprng" in
245 > dnl        xyes | "x")  USE_SPRNG=yes;;
246 > dnl        xno) USE_SPRNG=no ;;
247 > dnl        *) SPRNG="$with_sprng"; USE_SPRNG=yes ;;
248 > dnl esac
249 > dnl if test "$USE_SPRNG" = "yes" -a -z "$with_sprng"; then
250 > dnl        SPRNG="/usr/local"
251 > dnl fi
252 > dnl if test "$USE_SPRNG" = "yes"; then
253 > dnl         ACX_SPRNG
254 > dnl fi
255 > dnl AC_SUBST(USE_SPRNG)
256  
257 < case "x$with_sprng" in
258 <        xyes | "x")  USE_SPRNG=yes;;
259 <        xno) USE_SPRNG=no ;;
176 <        *) SPRNG="$with_sprng"; USE_SPRNG=yes ;;
177 < esac
178 < if test "$USE_SPRNG" = "yes" -a -z "$with_sprng"; then
179 <        SPRNG="/usr/local"
180 < fi
181 < if test "$USE_SPRNG" = "yes"; then
182 <        ACX_SPRNG
183 < fi
184 < AC_SUBST(USE_SPRNG)
257 > dnl ########################################
258 > dnl # Check for CGAL headers and libraries #
259 > dnl ########################################
260  
261 + USE_CGAL=no
262 + cgal_makefile=auto
263 + AC_ARG_WITH(cgal-makefile,[  --with-cgal-makefile=FILE  CGAL makefile that should be used],       cgal_makefile="$withval")
264  
265 < CHECK_MKL
265 > if test "x$cgal_makefile" != xno; then
266 >
267 >  if test "x$cgal_makefile" = xauto -a "x$CGAL_MAKEFILE" != x; then
268 >    cgal_makefile="$CGAL_MAKEFILE"
269 >  fi
270 >
271 >  AC_MSG_CHECKING(for cgal_makefile: $cgal_makefile)
272 >
273 >  if test -f "$cgal_makefile"; then
274 >
275 >    cat >config.tmp.Makefile <<EOF
276 > include $cgal_makefile
277 > default:
278 >        @echo CGAL_OS_COMPILER=\"\${CGAL_OS_COMPILER}\" >config.tmp.cgalvariables
279 >        @echo CGAL_INCLDIR=\"\${CGAL_INCL_DIR}\" >>config.tmp.cgalvariables
280 >        @echo CGAL_INCLCONFDIR=\"\${CGAL_INCL_CONF_DIR}\" >>config.tmp.cgalvariables
281 >        @echo CGAL_LIBDIR=\"\${CGAL_LIB_DIR}/\${CGAL_OS_COMPILER}\" >>config.tmp.cgalvariables
282 >        @echo CGAL_RLIBDIR=\"\${CGAL_LIB_DIR}/\${CGAL_OS_COMPILER}\" >>config.tmp.cgalvariables
283 >        @echo CGAL_CXXFLAGS=\"\${CGAL_CXXFLAGS}\" >>config.tmp.cgalvariables
284 >        @echo GMP_INCLDIR=\"\${GMP_INCL_DIR}\" >>config.tmp.cgalvariables
285 >        @echo GMP_LIBDIR=\"\${GMP_LIB_DIR}\" >>config.tmp.cgalvariables
286 >        @echo GMP_RLIBDIR=\"\${GMP_LIB_DIR}\" >>config.tmp.cgalvariables
287 >        @echo LEDA_INCLDIR=\"\${LEDA_INCL_DIR}\" >>config.tmp.cgalvariables
288 >        @echo LEDA_LIBDIR=\"\${LEDA_LIB_DIR}\" >>config.tmp.cgalvariables
289 >        @echo LEDA_RLIBDIR=\"\${LEDA_LIB_DIR}\" >>config.tmp.cgalvariables
290 > EOF
291 >
292 >    make -s -f config.tmp.Makefile
293 >    . config.tmp.cgalvariables
294 >
295 >    rm -f config.tmp.Makefile config.tmp.cgalvariables
296 >
297 >    if test "x$CGAL_INCLDIR" = "x"; then
298 >      CGAL_INCLDIR=""
299 >    fi
300 >
301 >    if test "x$CGAL_LIBDIR" = "x"; then
302 >      CGAL_LIBDIR=""
303 >    fi
304 >
305 >    if test "x$CGAL_RLIBDIR" = "x"; then
306 >      CGAL_RLIBDIR=""
307 >    fi
308  
309 +    if test "x$LEDA_INCLDIR" = "x"; then
310 +      LEDA_INCLDIR=""
311 +    fi
312  
313 +    if test "x$LEDA_LIBDIR" = "x"; then
314 +      LEDA_LIBDIR=""
315 +    fi
316 +
317 +    if test "x$LEDA_RLIBDIR" = "x"; then
318 +      LEDA_RLIBDIR=""
319 +    fi
320 +
321 +    if test "x$GMP_INCLDIR" = "x"; then
322 +      GMP_INCLDIR=""
323 +    fi
324 +
325 +    if test "x$GMP_LIBDIR" = "x"; then
326 +      GMP_LIBDIR=""
327 +    fi
328 +
329 +    if test "x$GMP_RLIBDIR" = "x"; then
330 +      GMP_RLIBDIR=""
331 +    fi
332 +
333 +    AC_MSG_RESULT(CGAL_OS_COMPILER=   $CGAL_OS_COMPILER)
334 +    AC_MSG_RESULT(CGAL_INCLDIR=       $CGAL_INCLDIR)
335 +    AC_MSG_RESULT(CGAL_INCLCONFDIR=   $CGAL_INCLCONFDIR)
336 +    AC_MSG_RESULT(CGAL_LIBDIR=        $CGAL_LIBDIR)
337 +    AC_MSG_RESULT(CGAL_CXXFLAGS=      $CGAL_CXXFLAGS)
338 +    AC_MSG_RESULT(LEDA_INCLDIR=       $LEDA_INCLDIR)
339 +    AC_MSG_RESULT(LEDA_LIBDIR=        $LEDA_LIBDIR)
340 +    AC_MSG_RESULT(GMP_INCLDIR=        $GMP_INCLDIR)
341 +    AC_MSG_RESULT(GMP_LIBDIR=         $GMP_LIBDIR)
342 +
343 +    AC_LANG_PUSH(C++)
344 +    save_CXXFLAGS="$CXXFLAGS"
345 +    CXXFLAGS="$CXXFLAGS -I$CGAL_INCLDIR -I$CGAL_INCLCONFDIR"
346 +    AC_CHECK_HEADER(CGAL/Cartesian.h, cgal=yes, cgal=no)
347 +    CXXFLAGS="$save_CXXFLAGS"
348 +
349 +    if test "x$cgal" = xyes; then
350 +      AC_MSG_CHECKING([for CGAL version])
351 +      LOCATION=${CGAL_INCLDIR}
352 +      LOCATION=${LOCATION:-/usr/include}
353 +      if test -f $LOCATION/CGAL/version.h; then
354 +        CGAL_VERSION=`grep '#define.*\<CGAL_VERSION\>.*' $LOCATION/CGAL/version.h | sed 's/[^0-9\.]*//g'`
355 +      else
356 +        CGAL_VERSION=`grep '#define.*\<CGAL_VERSION\>.*' $LOCATION/CGAL/config.h | sed 's/[^0-9\.]*//g'`
357 +      fi
358 + changequote({, })dnl
359 +      if echo $CGAL_VERSION | grep -q "^[3456789]"; then
360 + changequote([, ])dnl
361 +        AC_MSG_RESULT([($CGAL_VERSION) yes])
362 +      else
363 +        AC_MSG_RESULT([($CGAL_VERSION) no])
364 +        cgal=no
365 +      fi
366 +    fi
367 +
368 +    if test "x$cgal" = xyes; then
369 +      CGAL_LIBS="-lCGAL"
370 +      AC_MSG_CHECKING([whether CGAL uses LEDA])
371 +      if echo $CGAL_CXXFLAGS | grep -q -- -DCGAL_USE_LEDA; then
372 +        CGAL_USES_LEDA=yes
373 +        AC_MSG_RESULT([yes])
374 +        CGAL_DEFINES="-DCGAL_USE_LEDA -DLEDA_PREFIX"
375 +      else
376 +        AC_MSG_RESULT([no])
377 +        CGAL_USES_LEDA=no
378 +      fi
379 +
380 +      AC_MSG_CHECKING([whether CGAL uses GMP])
381 +      if echo $CGAL_CXXFLAGS | grep -q -- -DCGAL_USE_GMP; then
382 +        CGAL_USES_GMP=yes
383 +        AC_MSG_RESULT([yes])
384 +        CGAL_DEFINES="-DCGAL_USE_GMP $CGAL_DEFINES"
385 +      else
386 +        AC_MSG_RESULT([no])
387 +        CGAL_USES_GMP=no
388 +      fi
389 +
390 +      CGAL_LIBS="$CGAL_LIBS -lm"
391 +
392 +      CGAL_CXXFLAGS="-ftemplate-depth-50"
393 +
394 +      AC_MSG_RESULT(CGAL_USES_LEDA=     $CGAL_USES_LEDA)
395 +      AC_MSG_RESULT(CGAL_USES_GMP =     $CGAL_USES_GMP)
396 +      AC_MSG_RESULT(CGAL_INCLDIR  =     $CGAL_INCLDIR)
397 +      AC_MSG_RESULT(CGAL_LIBDIR   =     $CGAL_LIBDIR)
398 +      AC_MSG_RESULT(CGAL_DEFINES  =     $CGAL_DEFINES)
399 +      AC_MSG_RESULT(CGAL_CXXFLAGS =     $CGAL_CXXFLAGS)
400 +      AC_MSG_RESULT(CGAL_LIBS     =     $CGAL_LIBS)
401 +    fi
402 +
403 +    if test "x$cgal" = xyes; then
404 +      save_LIBS="$LIBS"
405 +      LIBS="$LIBS -L$CGAL_LIBDIR"
406 +      if test "x$CGAL_USES_LEDA" = xyes; then
407 +        LIBS="-lL $LIBS -L$LEDA_LIBDIR"
408 +      fi
409 +      # if test "x$CGAL_USES_GMP" = xyes; then
410 +      #   LIBS="-lgmp $LIBS $GMP_LIBDIR"
411 +      # fi
412 +      AC_CHECK_CXX_LIB(CGAL, ::CGAL::Cartesian<int>::Point_2, [#include <CGAL/Cartesian.h>], [::CGAL::Cartesian<int>::Point_2 P], [cgal=yes], [cgal=no], -I$CGAL_INCLDIR -I$CGAL_INCLCONFDIR)
413 +      LIBS="$save_LIBS"
414 +    fi
415 +
416 +  fi
417 +  AC_LANG_POP()
418 +
419 + fi
420 +
421 + if test "x$cgal" = xyes; then
422 +  USE_CGAL=yes
423 +  AC_DEFINE(HAVE_CGAL, 1, [Is defined if the CGAL library is available.])
424 +  AC_DEFINE_UNQUOTED(CGAL_VERSION, $CGAL_VERSION, [The CGAL version number.])
425 + changequote({, })dnl
426 +  if ! echo $CGAL_VERSION | grep -q "^3.0"; then
427 + changequote([, ])dnl
428 +    AC_MSG_WARN(*****************************************************)
429 +    AC_MSG_WARN(*** Warning: Your CGAL version is newer than the  ***)
430 +    AC_MSG_WARN(*** supported versions. It may still work though. ***)
431 +    AC_MSG_WARN(*****************************************************)
432 +  fi
433 + else
434 +   if test "x$cgal_makefile" != xno; then
435 +    AC_MSG_RESULT(No CGAL support. These are not the droids you want.)
436 +  fi
437 +  CGAL_INCLDIR=
438 +  CGAL_LIBDIR=
439 +  CGAL_RLIBDIR=
440 +  CGAL_DEFINES=
441 +  CGAL_CXXFLAGS=
442 +  CGAL_LIBS=
443 + fi
444 +
445 + AC_SUBST(USE_CGAL)
446 + CGAL_INC_DIR="${CGAL_INCLDIR} ${CGAL_INCLCONFDIR}"
447 + AC_SUBST(CGAL_INC_DIR)
448 + CGAL_LIB_DIR=${CGAL_LIBDIR}
449 + AC_SUBST(CGAL_LIB_DIR)
450 + CGAL_RLIB_DIR=${CGAL_RLIBDIR}
451 + AC_SUBST(CGAL_RLIB_DIR)
452 + AC_SUBST(CGAL_DEFINES)
453 + AC_SUBST(CGAL_CXXFLAGS)
454 + AC_SUBST(CGAL_LIBS)
455 +
456 + dnl CHECK_MKL
457 +
458 + BB_ENABLE_DOXYGEN
459 +
460   AC_EXEEXT
461   AC_OBJEXT
462   OBJEXT=".$OBJEXT"
# Line 247 | Line 517 | AC_CONFIG_FILES([make/Makefile])
517   AC_SUBST(PREPDEFFLAG)
518   AC_SUBST(F90_MODULE_NAMES)
519   AC_CONFIG_HEADER([src/config.h])
520 < AC_CONFIG_FILES([make/Makefile])
520 > AC_CONFIG_FILES([make/Makefile src/utils/Makefile src/applications/nanoRodBuilder/Makefile scripts/filepp], [chmod 0755 scripts/*])
521  
522   AC_OUTPUT

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines