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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines