configure.ac 7.91 KB
Newer Older
1
AC_PREREQ(2.57)
2
AC_INIT(PolyORB-HI/Ada, 2017.x)
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
AC_CONFIG_SRCDIR(src)
AC_CONFIG_AUX_DIR(support)

##########################################
# Initialization.
##########################################

AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE([1.9 tar-pax] foreign)

##########################################
# Check fo various programs.
##########################################

AC_CHECK_PROG(MV, mv, mv)
AC_CHECK_PROG(RM, rm, rm)
AC_CHECK_PROG(CP, cp, cp)
AC_CHECK_PROG(GREP, grep, grep)
AC_CHECK_PROG(CHMOD, chmod, chmod)
AC_CHECK_PROG(TEX, tex, tex)
AC_CHECK_PROG(BIBTEX, bibtex, bibtex)
AC_PROG_RANLIB
AC_EXEEXT

##########################################
# Check for GNU Make
##########################################

AM_GNU_MAKE

##########################################
# Check for various GNAT installations
##########################################

# The user must have at least an operation native GNAT Ada compiler

AM_PROG_WORKING_ADA

AM_PROG_GNATMAKE
AM_PROG_WORKING_ADA
AC_CHECK_PROG(GNATCLEAN, gnatclean, gnatclean)

# Chech for GNAT for LEON and GNAT for ERC32. Since they are two
# different targets, we cannot use the configure --target flag that
# enable to specify a unique target platform. We cannot use
# AM_CROSS_PROG_GNATMAKE either fro the same reasons.

TAB="   "

AC_CHECK_PROG(GNATMAKE_FOR_LEON, sparc-elf-gnatmake, sparc-elf-gnatmake)
AC_CHECK_PROG(GNATCLEAN_FOR_LEON, sparc-elf-gnatclean, sparc-elf-gnatclean)
AC_CHECK_PROG(TSIM_FOR_LEON, tsim-leon, tsim-leon)
AC_CHECK_PROG(GNATMAKE_FOR_LEON_GNAT, leon-elf-gnatmake, leon-elf-gnatmake)
AC_CHECK_PROG(GNATCLEAN_FOR_LEON_GNAT, leon-elf-gnatclean, leon-elf-gnatclean)
AC_SUBST(GNATMAKE_FOR_LEON)
AC_SUBST(GNATCLEAN_FOR_LEON)
AC_SUBST(TSIM_FOR_LEON)
AC_SUBST(GNATMAKE_FOR_LEON_GNAT)
AC_SUBST(GNATCLEAN_FOR_LEON_GNAT)
AM_CONDITIONAL(HAS_GNATMAKE_FOR_LEON, [test ! "x$GNATMAKE_FOR_LEON" = "x"])
AM_CONDITIONAL(HAS_TSIM_FOR_LEON, [test ! "x$TSIM_FOR_LEON" = "x"])
AM_CONDITIONAL(HAS_GNATMAKE_FOR_LEON_GNAT, [test ! "x$GNATMAKE_FOR_LEON_GNAT" = "x"])

if test "x$GNATMAKE_FOR_LEON" = "x"; then
   AC_MSG_WARN([
68 69
${TAB}${TAB}${TAB} GNAT for LEON target has not been found.
${TAB}${TAB}${TAB} All examples using this platform will
70 71 72 73 74
${TAB}${TAB}${TAB} be disabled.])
fi

if test "x$GNATMAKE_FOR_LEON_GNAT" = "x"; then
   AC_MSG_WARN([
75 76
${TAB}${TAB}${TAB} GNATPRO for LEON target has not been found.
${TAB}${TAB}${TAB} All examples using this platform will
77 78 79 80 81 82 83 84 85 86 87 88 89 90
${TAB}${TAB}${TAB} be disabled.])
fi

AC_CHECK_PROG(GNATMAKE_FOR_ERC32, erc32-elf-gnatmake, erc32-elf-gnatmake)
AC_CHECK_PROG(GNATCLEAN_FOR_ERC32, erc32-elf-gnatclean, erc32-elf-gnatclean)
AC_CHECK_PROG(TSIM_FOR_ERC32, tsim-erc32, tsim-erc32)
AC_SUBST(GNATMAKE_FOR_ERC32)
AC_SUBST(GNATCLEAN_FOR_ERC32)
AC_SUBST(TSIM_FOR_ERC32)
AM_CONDITIONAL(HAS_GNATMAKE_FOR_ERC32, [test ! "x$GNATMAKE_FOR_ERC32" = "x"])
AM_CONDITIONAL(HAS_TSIM_FOR_ERC32, [test ! "x$TSIM_FOR_ERC32" = "x"])

if test "x$GNATMAKE_FOR_ERC32" = "x"; then
   AC_MSG_WARN([
91 92
${TAB}${TAB}${TAB} GNAT for ERC32 target has not been found.
${TAB}${TAB}${TAB} All examples using this platform will
93 94 95 96 97 98 99 100 101
${TAB}${TAB}${TAB} be disabled.])
fi

AC_CHECK_PROG(GNATMAKE_FOR_MARTE, mgnatmake, mgnatmake)
AC_SUBST(GNATMAKE_FOR_MARTE)
AM_CONDITIONAL(HAS_GNATMAKE_FOR_MARTE, [test ! "x$GNATMAKE_FOR_MARTE" = "x"])

if test "x$GNATMAKE_FOR_MARTE" = "x"; then
   AC_MSG_WARN([
102 103
${TAB}${TAB}${TAB} GNAT for MARTE target has not been found.
${TAB}${TAB}${TAB} All examples using this platform will
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
${TAB}${TAB}${TAB} be disabled.])
fi

##########################################
# Check for Ocarina
##########################################

AM_PATH_OCARINA(1.1, ,AC_MSG_ERROR([Ocarina 1.1 or later is not installed on your system]))

##########################################
# Check for maintainer (debug) mode.
##########################################

GNATFLAGS=""

define(DEBUG_OPTIONS, [dnl
  GNATFLAGS="-XBUILD=debug"
  WARNINGS_ARE_ERRORS=""
  debug=true])
define(NODEBUG_OPTIONS, [dnl
  GNATFLAGS="-XBUILD=release"
  WARNINGS_ARE_ERRORS="--  "
  debug=false])

AC_ARG_ENABLE(debug,
[  --enable-debug          Turn on debugging options],
[if [[ "$enableval" = "yes" ]]; then
  DEBUG_OPTIONS
else
  NODEBUG_OPTIONS
fi],
[DEBUG_OPTIONS])

AC_SUBST(GNATFLAGS)
AC_SUBST(WARNINGS_ARE_ERRORS)
AM_CONDITIONAL(DEBUG, test x$debug = xtrue)

##########################################
# Windows requires specific targets
##########################################

case "$host_os" in
  cygwin* | mingw*)
    windows=true
    ;;
  *)
    windows=false
    ;;
esac
AM_CONDITIONAL(WINDOWS, test x$windows = xtrue)

############################################
# Set the value corresponding to cygpath -u
############################################

if test x"$CYGPATH_W" = x"echo"; then
   CYGPATH_U="echo"
else
   CYGPATH_U="cygpath -u"
fi
AC_SUBST(CYGPATH_U)

166 167 168 169 170 171 172

##########################################
# Build documentation
##########################################

AC_CHECK_PROGS(TEXI2HTML, texi2html)

hugues's avatar
hugues committed
173
DOC_TARGETS=
174 175 176 177

AC_ARG_ENABLE(doc,
[  --enable-doc            Build documentation [default=no]],
[if [[ "$enableval" = "yes" ]]; then
178
        DOC_TARGETS=docs
179 180 181
fi],
[])

182
AC_SUBST(DOC_TARGETS)
183

184 185 186 187 188 189 190 191 192 193 194 195
###############################################################
# Force the installation prefix to be equal to the Ocarina one
###############################################################

prefix='$(OCARINA_PREFIX)'

##########################################
# Output generated files
##########################################

dnl Important! One file per line, nothing before
dnl or after except whitespace! This section
196
dnl may, one day, be edited automatically to remove
197 198 199 200 201 202 203 204 205 206
dnl some entries.

AC_OUTPUT([
	Makefile
	doc/Makefile
	support/Makefile
	tools/Makefile
	share/Makefile
	share/make/Makefile
	src/Makefile
207
	src/drivers/Makefile
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
	src/polyorb_hi.gpr
	examples/Makefile
	examples/aadlv1/Makefile
	examples/aadlv1/d3.1.3-1_extended/Makefile
	examples/aadlv1/d3.1.3-1/Makefile
	examples/aadlv1/delayed_connections/Makefile
	examples/aadlv1/flight_mgmt/Makefile
	examples/aadlv1/import/Makefile
	examples/aadlv1/mode_switch/Makefile
	examples/aadlv1/mpc/Makefile
	examples/aadlv1/multiple_instances/Makefile
	examples/aadlv1/ping/Makefile
	examples/aadlv1/prime_numbers/Makefile
	examples/aadlv1/producer_consumer/Makefile
	examples/aadlv1/radar/Makefile
	examples/aadlv1/ravenscar_example/Makefile
	examples/aadlv1/rap/Makefile
	examples/aadlv1/rma/Makefile
	examples/aadlv1/some_types/Makefile
	examples/aadlv1/subprogram_ports/Makefile
	examples/aadlv1/sunseeker/Makefile
	examples/aadlv2/Makefile
	examples/aadlv2/rma/Makefile
	examples/aadlv2/ping/Makefile
	examples/aadlv2/ping_overflow/Makefile
	examples/aadlv2/some_types/Makefile
	examples/aadlv2/sunseeker/Makefile
        examples/aadlv2/d3.1.3-1/Makefile
        examples/aadlv2/d3.1.3-1_extended/Makefile
	examples/aadlv2/device_drivers/Makefile
        examples/aadlv2/flight_mgmt/Makefile
        examples/aadlv2/import/Makefile
        examples/aadlv2/mpc/Makefile
        examples/aadlv2/multiple_instances/Makefile
        examples/aadlv2/prime_numbers/Makefile
        examples/aadlv2/producer_consumer/Makefile
        examples/aadlv2/subprogram_ports/Makefile
	examples/aadlv2/radar/Makefile
        examples/aadlv2/rasta/Makefile
        examples/aadlv2/ravenscar_example/Makefile
        examples/aadlv2/mode_switch/Makefile
        examples/aadlv2/delayed_connections/Makefile
	examples/aadlv2/tests_fusion/Makefile
	examples/aadlv2/tests_fusion/test_1/Makefile
	examples/aadlv2/tests_fusion/test_2/Makefile
	examples/aadlv2/tests_fusion/test_3/Makefile
	examples/aadlv2/tests_fusion/test_4/Makefile
	examples/aadlv2/tests_fusion/test_5/Makefile
	examples/aadlv2/tests_fusion/test_6/Makefile
	examples/aadlv2/tests_fusion/test_7/Makefile
	examples/aadlv2/tests_fusion/test_8/Makefile
])

AC_MSG_NOTICE(%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%)
AC_MSG_NOTICE(PolyORB High Integrity configuration is complete!)
AC_MSG_NOTICE(GNU make command name: "$GNU_MAKE")
AC_MSG_NOTICE(%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%)