configure.ac 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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 (C) Mayo Foundation. All Rights Reserved
  14. #
  15. #----------------------------------------------------------------
  16. #----------------------------------------------------------------
  17. # Declare the package name and version.
  18. # All the bouquets and brickbats go to Sharon. :-)
  19. #----------------------------------------------------------------
  20. AC_INIT([CALCCAP], [1.0], [zahn.sharon@mayo.edu])
  21. #----------------------------------------------------------------
  22. # Give autoconf a point of reference, and tell it that
  23. # we're going to use automake later.
  24. #----------------------------------------------------------------
  25. AC_CONFIG_SRCDIR(src/calcCAP.cpp)
  26. AM_INIT_AUTOMAKE
  27. #----------------------------------------------------------------
  28. # Check platform name so we can specify particular
  29. # compilers and switches that we like.
  30. #----------------------------------------------------------------
  31. AC_CANONICAL_HOST
  32. case "${host}" in
  33. *hpux11*)
  34. CC=cc
  35. CXX=aCC
  36. CXXFLAGS="+O3 -DFORTRAN_UNDERBARS"
  37. F77=f90
  38. FFLAGS="+ppu -O2"
  39. ;;
  40. *cygwin*)
  41. # On Windows using Cygwin
  42. # Use the GNU compilers, but not the cygwin.dll,
  43. # which would infect our code with the GPL.
  44. # Note that we must also specify the gcc compiler,
  45. # as the -mno-cygwin switch makes it behave differently
  46. # for many of the configure tests.
  47. CC="gcc -mno-cygwin"
  48. CXX="g++ -mno-cygwin"
  49. F77="g77 -mno-cygwin"
  50. AM_CXXFLAGS="-DFORTRAN_UNDERBARS"
  51. ;;
  52. esac
  53. #----------------------------------------------------------------
  54. # Portabiliy checks were, for the most part, generated by
  55. # an initial 'autoscan' of the source code. The configure
  56. # script checks the system for features and generates the
  57. # compile commands with flags like -DHAVE_STDLIB_H=1, but
  58. # the nmmtl source code does not (as of this writing) take
  59. # advantage of those flags.
  60. #----------------------------------------------------------------
  61. #----------------------------------------------------------------
  62. # Checks for programs.
  63. #----------------------------------------------------------------
  64. AC_PROG_CXX
  65. AC_PROG_CC
  66. AC_PROG_F77
  67. #----------------------------------------------------------------
  68. # Checks for header files.
  69. #----------------------------------------------------------------
  70. AC_HEADER_STDC
  71. AC_CHECK_HEADERS([fcntl.h float.h limits.h malloc.h stddef.h stdlib.h string.h sys/times.h unistd.h])
  72. #----------------------------------------------------------------
  73. # Checks for typedefs, structures, and compiler characteristics.
  74. #----------------------------------------------------------------
  75. AC_C_CONST
  76. AC_TYPE_UID_T
  77. AC_C_INLINE
  78. AC_TYPE_MODE_T
  79. AC_TYPE_SIZE_T
  80. AC_STRUCT_TM
  81. #----------------------------------------------------------------
  82. # Checks for library functions.
  83. #----------------------------------------------------------------
  84. AC_FUNC_GETGROUPS
  85. AC_FUNC_MALLOC
  86. AC_FUNC_STAT
  87. AC_FUNC_STRFTIME
  88. AC_FUNC_VPRINTF
  89. AC_CHECK_FUNCS([getcwd pow rmdir sqrt strchr strdup strrchr strstr])
  90. AC_CONFIG_FILES([Makefile])
  91. AC_OUTPUT