ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/ac-tools/configure.in
(Generate patch)

Comparing trunk/ac-tools/configure.in (file contents):
Revision 1036 by gezelter, Mon Sep 4 13:37:15 2006 UTC vs.
Revision 1191 by chuckv, Thu Dec 6 19:39:00 2007 UTC

# Line 1 | Line 1 | AC_PREREQ(2.59)
1   dnl **** Process this file with autoconf to produce a configure script.
2   AC_PREREQ(2.59)
3 < AC_INIT(OOPSE, 3.0, gezelter@nd.edu, oopse)
3 > AC_INIT(OOPSE, 4.0, gezelter@nd.edu, oopse)
4   AC_CONFIG_AUX_DIR(ac-tools)
5   AC_CONFIG_SRCDIR([src/applications/oopse/oopse.cpp])
6   AC_CONFIG_HEADER([src/config.h])
# Line 9 | Line 9 | builtin(include, ac-tools/AC_CXX_STD.m4)
9   builtin(include, ac-tools/AC_CXX_HAVE_STL.m4)
10   builtin(include, ac-tools/AC_CXX_NAMESPACES.m4)
11   builtin(include, ac-tools/AC_CXX_STD.m4)
12 + builtin(include, ac-tools/CGAL.m4)
13  
14   # who am i
15   AC_CANONICAL_HOST
# Line 252 | Line 253 | AC_SUBST(USE_MPI)
253          ACX_MPI
254   fi
255   AC_SUBST(USE_MPI)
255
256 dnl ########################################
257 dnl # Check for CGAL headers and libraries #
258 dnl ########################################
259
260 USE_CGAL=no
261 cgal_makefile=auto
262 AC_ARG_WITH(cgal-makefile,[  --with-cgal-makefile=FILE  CGAL makefile that should be used],       cgal_makefile="$withval")
263
264 if test "x$cgal_makefile" != xno; then
265
266  if test "x$cgal_makefile" = xauto -a "x$CGAL_MAKEFILE" != x; then
267    cgal_makefile="$CGAL_MAKEFILE"
268  fi
269
270  AC_MSG_CHECKING(for cgal_makefile: $cgal_makefile)
271
272  if test -f "$cgal_makefile"; then
273
274    cat >config.tmp.Makefile <<EOF
275 include $cgal_makefile
276 default:
277        @echo CGAL_OS_COMPILER=\"\${CGAL_OS_COMPILER}\" >config.tmp.cgalvariables
278        @echo CGAL_INCLDIR=\"\${CGAL_INCL_DIR}\" >>config.tmp.cgalvariables
279        @echo CGAL_INCLCONFDIR=\"\${CGAL_INCL_CONF_DIR}\" >>config.tmp.cgalvariables
280        @echo CGAL_LIBDIR=\"\${CGAL_LIB_DIR}/\${CGAL_OS_COMPILER}\" >>config.tmp.cgalvariables
281        @echo CGAL_RLIBDIR=\"\${CGAL_LIB_DIR}/\${CGAL_OS_COMPILER}\" >>config.tmp.cgalvariables
282        @echo CGAL_CXXFLAGS=\"\${CGAL_CXXFLAGS}\" >>config.tmp.cgalvariables
283        @echo GMP_INCLDIR=\"\${GMP_INCL_DIR}\" >>config.tmp.cgalvariables
284        @echo GMP_LIBDIR=\"\${GMP_LIB_DIR}\" >>config.tmp.cgalvariables
285        @echo GMP_RLIBDIR=\"\${GMP_LIB_DIR}\" >>config.tmp.cgalvariables
286        @echo LEDA_INCLDIR=\"\${LEDA_INCL_DIR}\" >>config.tmp.cgalvariables
287        @echo LEDA_LIBDIR=\"\${LEDA_LIB_DIR}\" >>config.tmp.cgalvariables
288        @echo LEDA_RLIBDIR=\"\${LEDA_LIB_DIR}\" >>config.tmp.cgalvariables
289 EOF
256  
257 <    make -s -f config.tmp.Makefile
258 <    . config.tmp.cgalvariables
293 <
294 <    rm -f config.tmp.Makefile config.tmp.cgalvariables
295 <
296 <    if test "x$CGAL_INCLDIR" = "x"; then
297 <      CGAL_INCLDIR=""
298 <    fi
299 <
300 <    if test "x$CGAL_LIBDIR" = "x"; then
301 <      CGAL_LIBDIR=""
302 <    fi
303 <
304 <    if test "x$CGAL_RLIBDIR" = "x"; then
305 <      CGAL_RLIBDIR=""
306 <    fi
257 > dnl check for CGAL library
258 > ACX_CGAL
259  
260 <    if test "x$LEDA_INCLDIR" = "x"; then
261 <      LEDA_INCLDIR=""
262 <    fi
311 <
312 <    if test "x$LEDA_LIBDIR" = "x"; then
313 <      LEDA_LIBDIR=""
314 <    fi
315 <
316 <    if test "x$LEDA_RLIBDIR" = "x"; then
317 <      LEDA_RLIBDIR=""
318 <    fi
319 <
320 <    if test "x$GMP_INCLDIR" = "x"; then
321 <      GMP_INCLDIR=""
322 <    fi
323 <
324 <    if test "x$GMP_LIBDIR" = "x"; then
325 <      GMP_LIBDIR=""
326 <    fi
327 <
328 <    if test "x$GMP_RLIBDIR" = "x"; then
329 <      GMP_RLIBDIR=""
330 <    fi
331 <
332 <    AC_MSG_RESULT(CGAL_OS_COMPILER=   $CGAL_OS_COMPILER)
333 <    AC_MSG_RESULT(CGAL_INCLDIR=       $CGAL_INCLDIR)
334 <    AC_MSG_RESULT(CGAL_INCLCONFDIR=   $CGAL_INCLCONFDIR)
335 <    AC_MSG_RESULT(CGAL_LIBDIR=        $CGAL_LIBDIR)
336 <    AC_MSG_RESULT(CGAL_CXXFLAGS=      $CGAL_CXXFLAGS)
337 <    AC_MSG_RESULT(LEDA_INCLDIR=       $LEDA_INCLDIR)
338 <    AC_MSG_RESULT(LEDA_LIBDIR=        $LEDA_LIBDIR)
339 <    AC_MSG_RESULT(GMP_INCLDIR=        $GMP_INCLDIR)
340 <    AC_MSG_RESULT(GMP_LIBDIR=         $GMP_LIBDIR)
341 <
342 <    AC_LANG_PUSH(C++)
343 <    save_CXXFLAGS="$CXXFLAGS"
344 <    CXXFLAGS="$CXXFLAGS -I$CGAL_INCLDIR -I$CGAL_INCLCONFDIR"
345 <    AC_CHECK_HEADER(CGAL/Cartesian.h, cgal=yes, cgal=no)
346 <    CXXFLAGS="$save_CXXFLAGS"
347 <
348 <    if test "x$cgal" = xyes; then
349 <      AC_MSG_CHECKING([for CGAL version])
350 <      LOCATION=${CGAL_INCLDIR}
351 <      LOCATION=${LOCATION:-/usr/include}
352 <      if test -f $LOCATION/CGAL/version.h; then
353 <        CGAL_VERSION=`grep '#define.*\<CGAL_VERSION\>.*' $LOCATION/CGAL/version.h | sed 's/[^0-9\.]*//g'`
354 <      else
355 <        CGAL_VERSION=`grep '#define.*\<CGAL_VERSION\>.*' $LOCATION/CGAL/config.h | sed 's/[^0-9\.]*//g'`
356 <      fi
357 < changequote({, })dnl
358 <      if echo $CGAL_VERSION | grep -q "^[3456789]"; then
359 < changequote([, ])dnl
360 <        AC_MSG_RESULT([($CGAL_VERSION) yes])
361 <      else
362 <        AC_MSG_RESULT([($CGAL_VERSION) no])
363 <        cgal=no
364 <      fi
365 <    fi
366 <
367 <    if test "x$cgal" = xyes; then
368 <      CGAL_LIBS="-lCGAL"
369 <      AC_MSG_CHECKING([whether CGAL uses LEDA])
370 <      if echo $CGAL_CXXFLAGS | grep -q -- -DCGAL_USE_LEDA; then
371 <        CGAL_USES_LEDA=yes
372 <        AC_MSG_RESULT([yes])
373 <        CGAL_DEFINES="-DCGAL_USE_LEDA -DLEDA_PREFIX"
374 <      else
375 <        AC_MSG_RESULT([no])
376 <        CGAL_USES_LEDA=no
377 <      fi
378 <
379 <      AC_MSG_CHECKING([whether CGAL uses GMP])
380 <      if echo $CGAL_CXXFLAGS | grep -q -- -DCGAL_USE_GMP; then
381 <        CGAL_USES_GMP=yes
382 <        AC_MSG_RESULT([yes])
383 <        CGAL_DEFINES="-DCGAL_USE_GMP $CGAL_DEFINES"
384 <      else
385 <        AC_MSG_RESULT([no])
386 <        CGAL_USES_GMP=no
387 <      fi
388 <
389 <      CGAL_LIBS="$CGAL_LIBS -lm"
390 <
391 <      CGAL_CXXFLAGS="-ftemplate-depth-50"
392 <
393 <      AC_MSG_RESULT(CGAL_USES_LEDA=     $CGAL_USES_LEDA)
394 <      AC_MSG_RESULT(CGAL_USES_GMP =     $CGAL_USES_GMP)
395 <      AC_MSG_RESULT(CGAL_INCLDIR  =     $CGAL_INCLDIR)
396 <      AC_MSG_RESULT(CGAL_LIBDIR   =     $CGAL_LIBDIR)
397 <      AC_MSG_RESULT(CGAL_DEFINES  =     $CGAL_DEFINES)
398 <      AC_MSG_RESULT(CGAL_CXXFLAGS =     $CGAL_CXXFLAGS)
399 <      AC_MSG_RESULT(CGAL_LIBS     =     $CGAL_LIBS)
400 <    fi
401 <
402 <    if test "x$cgal" = xyes; then
403 <      save_LIBS="$LIBS"
404 <      LIBS="$LIBS -L$CGAL_LIBDIR"
405 <      if test "x$CGAL_USES_LEDA" = xyes; then
406 <        LIBS="-lL $LIBS -L$LEDA_LIBDIR"
407 <      fi
408 <      # if test "x$CGAL_USES_GMP" = xyes; then
409 <      #   LIBS="-lgmp $LIBS $GMP_LIBDIR"
410 <      # fi
411 <      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)
412 <      LIBS="$save_LIBS"
413 <    fi
414 <
415 <  fi
416 <  AC_LANG_POP()
417 <
418 < fi
419 <
420 < if test "x$cgal" = xyes; then
421 <  USE_CGAL=yes
422 <  AC_DEFINE(HAVE_CGAL, 1, [Is defined if the CGAL library is available.])
423 <  AC_DEFINE_UNQUOTED(CGAL_VERSION, $CGAL_VERSION, [The CGAL version number.])
424 < changequote({, })dnl
425 <  if ! echo $CGAL_VERSION | grep -q "^3.0"; then
426 < changequote([, ])dnl
427 <    AC_MSG_WARN(*****************************************************)
428 <    AC_MSG_WARN(*** Warning: Your CGAL version is newer than the  ***)
429 <    AC_MSG_WARN(*** supported versions. It may still work though. ***)
430 <    AC_MSG_WARN(*****************************************************)
431 <  fi
432 < else
433 <   if test "x$cgal_makefile" != xno; then
434 <    AC_MSG_RESULT(No CGAL support. These are not the droids you want.)
435 <  fi
436 <  CGAL_INCLDIR=
437 <  CGAL_LIBDIR=
438 <  CGAL_RLIBDIR=
439 <  CGAL_DEFINES=
440 <  CGAL_CXXFLAGS=
441 <  CGAL_LIBS=
442 < fi
443 <
260 > if test "$acx_cgal_found" == yes; then
261 > USE_CGAL=yes
262 > AC_DEFINE(HAVE_CGAL, 1, [Is defined if the CGAL library is available.])
263   AC_SUBST(USE_CGAL)
445 CGAL_INC_DIR="${CGAL_INCLDIR} ${CGAL_INCLCONFDIR}"
446 AC_SUBST(CGAL_INC_DIR)
447 CGAL_LIB_DIR=${CGAL_LIBDIR}
448 AC_SUBST(CGAL_LIB_DIR)
449 CGAL_RLIB_DIR=${CGAL_RLIBDIR}
450 AC_SUBST(CGAL_RLIB_DIR)
451 AC_SUBST(CGAL_DEFINES)
264   AC_SUBST(CGAL_CXXFLAGS)
265 + AC_SUBST(CGAL_LDFLAGS)
266 + AC_SUBST(CGAL_CPPFLAGS)
267   AC_SUBST(CGAL_LIBS)
268 + fi
269  
270 +
271   BB_ENABLE_DOXYGEN
272  
273   AC_SUBST(EXEEXT)
# Line 468 | Line 284 | AC_SUBST(F90_MODULE_NAMES)
284   AC_SUBST(LDFLAGS)
285   AC_SUBST(PREPDEFFLAG)
286   AC_SUBST(F90_MODULE_NAMES)
287 < AC_CONFIG_FILES([make/Makefile src/utils/Makefile src/applications/nanoRodBuilder/Makefile src/applications/utilities/affineScale src/applications/utilities/waterBoxer scripts/filepp], [chmod 0755 scripts/*])
287 > AC_CONFIG_FILES([make/Makefile src/utils/Makefile src/math/Makefile src/applications/staticProps/Makefile scripts/filepp], [chmod 0755 scripts/*])
288  
289   AC_OUTPUT

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines