configure.ac 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. #----------------------------------------------------------------
  2. #
  3. # configure.ac
  4. #
  5. # Autoconf source file for Boundary Element MMTL (bem).
  6. # This file, along with aclocal, autoconf, Makefile.am,
  7. # and automake can produce a highly functional configuration
  8. # script and Makefile.
  9. #
  10. # Sharon Zahn, Bob Techentin
  11. # October 3, 2002
  12. #
  13. # Copyright 2002-2004 Mayo Foundation. All Rights Reserved.
  14. # $Id: configure.ac,v 1.10 2004/04/22 20:07:12 techenti Exp $
  15. #
  16. #----------------------------------------------------------------
  17. #----------------------------------------------------------------
  18. # Declare the package name and version.
  19. # All the bouquets and brickbats go to Sharon. :-)
  20. #----------------------------------------------------------------
  21. AC_INIT(BEM, 1.0, zahn.sharon@mayo.edu)
  22. #----------------------------------------------------------------
  23. # Give autoconf a point of reference, and tell it that
  24. # we're going to use automake later.
  25. #----------------------------------------------------------------
  26. AC_CONFIG_SRCDIR(src/nmmtl.cpp)
  27. AM_INIT_AUTOMAKE
  28. #----------------------------------------------------------------
  29. # Check platform name so we can specify particular
  30. # compilers and switches that we like.
  31. #----------------------------------------------------------------
  32. AC_CANONICAL_HOST
  33. case "${host}" in
  34. *hpux10*)
  35. # On HP-UX 10.0
  36. # Choose native compilers aCC, and f90.
  37. # Also use the FORTRAN_UNDERBARS mode, to avoid
  38. # conflicts with NSWC's FMIN and C runtime fmin().
  39. # Undefine "inline" macro, because we will get
  40. # thousands of duplicates from math.h on this
  41. # older aCC compiler.
  42. CC=cc
  43. CXX=aCC
  44. AM_CXXFLAGS="+O2 -DFORTRAN_UNDERBARS -Uinline"
  45. F77=f90
  46. AM_FFLAGS="+ppu -O2"
  47. ;;
  48. *hpux11*)
  49. # On HP-UX 11.0
  50. # Choose native compilers aCC, and f90.
  51. # Also use the FORTRAN_UNDERBARS mode, to avoid
  52. # conflicts with NSWC's FMIN and C runtime fmin().
  53. CC=cc
  54. CXX=aCC
  55. AM_CXXFLAGS="+O2 -DFORTRAN_UNDERBARS"
  56. F77=f90
  57. AM_FFLAGS="+ppu -O2"
  58. ;;
  59. *cygwin*)
  60. # On Windows using Cygwin
  61. # Use the GNU compilers, but not the cygwin.dll,
  62. # which would infect our code with the GPL.
  63. # Note that we must also specify the gcc compiler,
  64. # as the -mno-cygwin switch makes it behave differently
  65. # for many of the configure tests.
  66. CC="gcc -mno-cygwin"
  67. CXX="g++ -mno-cygwin"
  68. F77="g77 -mno-cygwin"
  69. AM_CXXFLAGS="-DFORTRAN_UNDERBARS"
  70. ;;
  71. *linux*)
  72. # For Linux, all flavors...
  73. # Use the GNU compilers for C++ and FORTRAN.
  74. CXX="g++"
  75. F77="g77"
  76. AM_CXXFLAGS="-DFORTRAN_UNDERBARS"
  77. ;;
  78. esac
  79. AC_SUBST(AM_CXXFLAGS)
  80. AC_SUBST(AM_FFLAGS)
  81. #----------------------------------------------------------------
  82. # Portabiliy checks were, for the most part, generated by
  83. # an initial 'autoscan' of the source code. The configure
  84. # script checks the system for features and generates the
  85. # compile commands with flags like -DHAVE_STDLIB_H=1, but
  86. # the nmmtl source code does not (as of this writing) take
  87. # complete advantage of those flags.
  88. #----------------------------------------------------------------
  89. #----------------------------------------------------------------
  90. # Checks for programs.
  91. #----------------------------------------------------------------
  92. AC_PROG_CXX
  93. AC_PROG_F77
  94. #----------------------------------------------------------------
  95. # Checks for header files.
  96. #----------------------------------------------------------------
  97. AC_HEADER_STDC
  98. AC_CHECK_HEADERS([fcntl.h float.h limits.h malloc.h stddef.h stdlib.h string.h unistd.h pwd.h])
  99. #----------------------------------------------------------------
  100. # Checks for typedefs, structures, and compiler characteristics.
  101. #----------------------------------------------------------------
  102. AC_C_CONST
  103. AC_TYPE_UID_T
  104. AC_C_INLINE
  105. AC_TYPE_MODE_T
  106. AC_TYPE_SIZE_T
  107. AC_STRUCT_TM
  108. AC_F77_WRAPPERS
  109. #----------------------------------------------------------------
  110. # Checks for library functions.
  111. #----------------------------------------------------------------
  112. AC_F77_LIBRARY_LDFLAGS
  113. AC_FUNC_GETGROUPS
  114. AC_FUNC_MALLOC
  115. AC_FUNC_STAT
  116. AC_FUNC_STRFTIME
  117. AC_FUNC_VPRINTF
  118. AC_CHECK_FUNCS([getcwd getlogin pow rmdir sqrt strchr strdup strrchr strstr])
  119. AC_CONFIG_FILES([Makefile])
  120. AC_OUTPUT