configure.ac 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. # Configure script for libada.
  2. # Copyright 2003, 2004, 2009, 2012 Free Software Foundation, Inc.
  3. #
  4. # This file is free software; you can redistribute it and/or modify it
  5. # under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 3 of the License, or
  7. # (at your option) any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful, but
  10. # WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. # General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; see the file COPYING3. If not see
  16. # <http://www.gnu.org/licenses/>.
  17. sinclude(../config/acx.m4)
  18. sinclude(../config/override.m4)
  19. AC_INIT
  20. AC_PREREQ([2.64])
  21. AC_CONFIG_SRCDIR([Makefile.in])
  22. # Command-line options.
  23. # Very limited version of AC_MAINTAINER_MODE.
  24. AC_ARG_ENABLE([maintainer-mode],
  25. [AC_HELP_STRING([--enable-maintainer-mode],
  26. [enable make rules and dependencies not useful (and
  27. sometimes confusing) to the casual installer])],
  28. [case ${enable_maintainer_mode} in
  29. yes) MAINT='' ;;
  30. no) MAINT='#' ;;
  31. *) AC_MSG_ERROR([--enable-maintainer-mode must be yes or no]) ;;
  32. esac
  33. maintainer_mode=${enableval}],
  34. [MAINT='#'])
  35. AC_SUBST([MAINT])dnl
  36. # Start of actual configure tests
  37. AC_PROG_INSTALL
  38. AC_CANONICAL_BUILD
  39. AC_CANONICAL_HOST
  40. AC_CANONICAL_TARGET
  41. ACX_NONCANONICAL_TARGET
  42. # Need to pass this down for now :-P
  43. AC_PROG_LN_S
  44. # Determine what to build for 'gnattools'
  45. if test $build = $target ; then
  46. # Note that build=target is almost certainly the wrong test; FIXME
  47. default_gnattools_target="gnattools-native"
  48. else
  49. default_gnattools_target="gnattools-cross"
  50. fi
  51. AC_SUBST([default_gnattools_target])
  52. # Target-specific stuff (defaults)
  53. TOOLS_TARGET_PAIRS=
  54. AC_SUBST(TOOLS_TARGET_PAIRS)
  55. EXTRA_GNATTOOLS=
  56. AC_SUBST(EXTRA_GNATTOOLS)
  57. # Per-target case statement
  58. # -------------------------
  59. case "${target}" in
  60. *-*-aix*)
  61. TOOLS_TARGET_PAIRS="\
  62. mlib-tgt-specific.adb<mlib-tgt-specific-aix.adb \
  63. indepsw.adb<indepsw-aix.adb"
  64. ;;
  65. *-*-darwin*)
  66. TOOLS_TARGET_PAIRS="\
  67. mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb \
  68. indepsw.adb<indepsw-darwin.adb"
  69. ;;
  70. *-*-freebsd*)
  71. TOOLS_TARGET_PAIRS="\
  72. mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
  73. indepsw.adb<indepsw-gnu.adb"
  74. ;;
  75. *-*-linux*)
  76. TOOLS_TARGET_PAIRS="\
  77. mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
  78. indepsw.adb<indepsw-gnu.adb"
  79. ;;
  80. *-*-solaris*)
  81. TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb"
  82. ;;
  83. *-*-vxworks*)
  84. TOOLS_TARGET_PAIRS="\
  85. mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
  86. indepsw.adb<indepsw-gnu.adb"
  87. ;;
  88. hppa*-hp-hpux10*)
  89. ;;
  90. hppa*-hp-hpux11*)
  91. TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-hpux.adb"
  92. ;;
  93. ia64-hp-hpux11*)
  94. TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-ia64-hpux.adb"
  95. ;;
  96. alpha*-*-vms* | alpha*-*-openvms*)
  97. TOOLS_TARGET_PAIRS="\
  98. mlib-tgt-specific.adb<mlib-tgt-specific-vms-alpha.adb \
  99. symbols.adb<symbols-vms.adb \
  100. symbols-processing.adb<symbols-processing-vms-alpha.adb"
  101. EXTRA_GNATTOOLS='../../gnatlbr$(exeext) ../../gnatsym$(exeext)'
  102. ;;
  103. ia64-*-vms* | ia64-*-openvms*)
  104. TOOLS_TARGET_PAIRS="\
  105. mlib-tgt-specific.adb<mlib-tgt-specific-vms-ia64.adb \
  106. symbols.adb<symbols-vms.adb \
  107. symbols-processing.adb<symbols-processing-vms-ia64.adb"
  108. EXTRA_GNATTOOLS='../../gnatlbr$(exeext) ../../gnatsym$(exeext)'
  109. ;;
  110. *-*-cygwin32* | *-*-mingw32* | *-*-pe)
  111. TOOLS_TARGET_PAIRS="\
  112. mlib-tgt-specific.adb<mlib-tgt-specific-mingw.adb \
  113. indepsw.adb<indepsw-mingw.adb"
  114. EXTRA_GNATTOOLS='../../gnatdll$(exeext)'
  115. ;;
  116. esac
  117. # From user or toplevel makefile.
  118. AC_SUBST(ADA_CFLAGS)
  119. AC_PROG_CC
  120. warn_cflags=
  121. if test "x$GCC" = "xyes"; then
  122. warn_cflags='$(GCC_WARN_CFLAGS)'
  123. fi
  124. AC_SUBST(warn_cflags)
  125. # Output: create a Makefile.
  126. AC_CONFIG_FILES([Makefile])
  127. AC_OUTPUT