source: rtems/configure.in @ fc56b90c

4.104.114.84.95
Last change on this file since fc56b90c was 2bb990f, checked in by Joel Sherrill <joel.sherrill@…>, on 02/11/98 at 21:20:43

Fixed hppa1.1 configuration.

  • Property mode set to 100644
File size: 11.8 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2dnl
3dnl  $Id$
4
5AC_PREREQ(2.12)
6AC_INIT(README)
7
8dnl Checks for programs.
9AC_PROG_MAKE_SET
10AC_CANONICAL_SYSTEM
11AC_ARG_WITH(cross-host,[  --with-cross-host=HOST      host (cygnus)], \
12host=$withval)
13
14AC_ARG_ENABLE(gmake-print-directory, \
15[  --enable-gmake-print-directory    enable GNU Make's print directory], \
16[case "${enableval}" in
17  yes) RTEMS_USE_OWN_PDIR=no ;;
18  no) RTEMS_USE_OWN_PDIR=yes ;;
19  *)  AC_MSG_ERROR(bad value ${enableval} for gmake-print-directory option) ;;
20esac],[RTEMS_USE_OWN_PDIR=yes])
21
22AC_ARG_ENABLE(posix, \
23[  --enable-posix                   enable posix interface], \
24[case "${enableval}" in
25  yes) RTEMS_HAS_POSIX_API=yes ;;
26  no) RTEMS_HAS_POSIX_API=no ;;
27  *)  AC_MSG_ERROR(bad value ${enableval} for enable-posix option) ;;
28esac],[RTEMS_HAS_POSIX_API=yes])
29
30AC_ARG_ENABLE(ka9q, \
31[  --enable-ka9q                enable KA9Q TCP/IP stack], \
32[case "${enableval}" in
33  yes) RTEMS_HAS_KA9Q=yes ;;
34  no) RTEMS_HAS_KA9Q=no ;;
35  *)  AC_MSG_ERROR(bad value ${enableval} for enable-ka9q option) ;;
36esac],[RTEMS_HAS_KA9Q=yes])
37
38AC_ARG_ENABLE(rtems-inlines, \
39[  --enable-rtems-inlines           enable RTEMS inline functions (use macros)], \
40[case "${enableval}" in
41  yes) RTEMS_USE_MACROS=no ;;
42  no) RTEMS_USE_MACROS=yes ;;
43  *)  AC_MSG_ERROR(bad value ${enableval} for disable-rtems-inlines option) ;;
44esac],[RTEMS_USE_MACROS=no])
45
46AC_ARG_ENABLE(cpp, \
47[  --enable-cpp            enable C++ support, and build the rtems++ library], \
48[case "${enableval}" in
49  yes) RTEMS_HAS_CPLUSPLUS=yes ;;
50  no) RTEMS_HAS_CPLUSPLUS=no   ;;
51  *)  AC_MSG_ERROR(bad value ${enableval} for enable-cpp option) ;;
52esac], [RTEMS_HAS_CPLUSPLUS=no])
53
54AC_ARG_ENABLE(gcc28, \
55[  --enable-gcc28                   enable use of gcc 2.8.x features], \
56[case "${enableval}" in
57  yes) RTEMS_USE_GCC272=no ;;
58  no) RTEMS_USE_GCC272=yes ;;
59  *)  AC_MSG_ERROR(bad value ${enableval} for gcc-28 option) ;;
60esac],[RTEMS_USE_GCC272=no])
61
62AC_ARG_ENABLE(libcdir, \
63[  --enable-libcdir=directory       set the directory for the C library], \
64[ RTEMS_LIBC_DIR="${enableval}" ; \
65test -d ${enableval} || AC_MSG_ERROR("$enableval is not a directory" ) ] )
66
67RTEMS_PREFIX=${target_cpu}-${target_vendor}
68
69dnl BEGIN configure.host.in
70
71AC_PATH_PROG(CAT,cat)
72AC_PATH_PROG(RM,rm)
73AC_PATH_PROG(CP,cp)
74AC_PATH_PROG(MV,mv)
75AC_PATH_PROG(LN,ln)
76AC_PROG_LN_S
77AC_PATH_PROG(CHMOD,chmod)
78AC_PATH_PROG(SORT,sort)
79AC_CHECK_FUNCS(strerror)
80
81dnl check mkdir behaviour, try to get mkdir -p -m 0755
82RTEMS_PATH_MKDIR
83RTEMS_PROG_MKDIR_M
84RTEMS_PROG_MKDIR_P
85test "$rtems_cv_prog_MKDIR_P" = "yes" && MKDIR="$MKDIR -p"
86test "$rtems_cv_prog_MKDIR_M" = "yes" && MKDIR="$MKDIR -m 0755"
87
88AC_PATH_PROG(TOUCH,touch)
89AC_PATH_PROG(CMP,cmp)
90
91AC_PATH_PROG(SED,sed)
92AC_PATH_PROGS(M4,gm4 m4)
93
94dnl NOTE: prefer bash over ksh over sh
95AC_PATH_PROGS(KSH,bash ksh sh)
96
97if test -z "$KSH"; then
98dnl NOTE: This cannot happen -- /bin/sh must always exist
99AC_MSG_ERROR(
100[***]
101[    Cannot determine a usable shell bash/ksh/sh]
102[    Please contact your system administrator] );
103fi
104
105dnl END configure.host.in
106
107dnl BEGIN configure.target.in
108
109dnl echo "TARGET"
110dnl echo "    cpu    --> $target_cpu"
111dnl echo "    os     --> $target_os"
112dnl echo "    vendor --> $target_vendor"
113
114dnl canonicalize target name
115dnl NOTE: Most rtems targets do not fullfil autoconf
116dnl targets naming conventions "processor-vendor-os"
117dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
118dnl and we have to fix it for rtems ourselves
119dnl
120dnl The original plan was to do CPU-BSP-rtems or CPU-rtems to
121dnl imply all BSPs.  Eventually we would like to build a collection
122dnl of CPU model specific RTEMS libraries which in conjunction with
123dnl a BSP library would be used to link an application.
124
125RTEMS_HOST=$host_os
126
127case "${target}" in
128  # hpux unix port should go here
129  hppa1.1-*-rtems*)
130        target_cpu=hppa1_1
131        ;;
132  i[[3456]]86-go32-rtems*)
133        target_cpu=i386
134        rtems_bsp="go32 go32_p5"
135        skip_startfiles="yes"
136        RTEMS_HAS_POSIX_API=no
137        ;;
138  i[[3456]]86-pc-linux*)         # unix "simulator" port
139        target_cpu=unix
140        RTEMS_HAS_POSIX_API=no
141        RTEMS_HOST=Linux
142        ;;
143  no_cpu-*rtems*)
144        target_cpu=no_cpu
145        RTEMS_HAS_POSIX_API=no
146        ;;
147  powerpc-*rtems*)
148        target_cpu=ppc
149        ;;
150  sparc-sun-solaris*)             # unix "simulator" port
151        target_cpu=unix
152        RTEMS_HAS_POSIX_API=no
153        RTEMS_HOST=Solaris
154        ;;
155  *)
156        RTEMS_CANONICAL_TARGET_CPU
157        ;;
158esac
159
160# Override the set of BSPs to be built.
161AC_ARG_ENABLE(rtemsbsp, \
162  [  --enable-rtemsbsp=bsp1 bsp2 ..   BSPs to include in build], \
163      rtems_bsp=$enableval \
164)
165
166# Is this a supported CPU?
167AC_MSG_CHECKING([if cpu $target_cpu is supported])
168if test -d "$srcdir/c/src/exec/score/cpu/$target_cpu"; then
169  AC_MSG_RESULT(yes)
170  makefiles="$makefiles c/src/exec/score/cpu/$target_cpu/Makefile"
171else
172  AC_MSG_ERROR(no)
173fi
174
175# find all the Executive Makefiles
176RTEMS_CHECK_MAKEFILE(c/src/exec/score/tools/$target_cpu)
177RTEMS_CHECK_MAKEFILE(c/src/exec/rtems)
178RTEMS_CHECK_MAKEFILE(c/src/exec/sapi)
179
180if test "$RTEMS_HAS_POSIX_API" = "yes"; then
181  RTEMS_CHECK_MAKEFILE(c/src/exec/posix)
182  makefiles="$makefiles c/src/exec/wrapup/posix/Makefile"
183fi
184
185# find all the Makefiles for the BSPs
186if test -d "$srcdir/c/src/lib/libbsp/$target_cpu"; then
187  makefiles="$makefiles c/src/lib/libbsp/$target_cpu/Makefile"
188
189  if test -z "$rtems_bsp"; then
190    AC_MSG_CHECKING([for bsps])
191    files=`ls $srcdir/c/src/lib/libbsp/$target_cpu`
192    for file in $files; do
193      case $file in
194        shared*);;
195        Makefile*);;
196        READ*);;
197        CVS*);;
198        pxfl*);;
199        go32*);;       # so the i386 port can pick up the other Makefiles
200        # Now account for BSPs with build variants
201        gen68360)      rtems_bsp="$rtems_bsp gen68360 gen68360_040";;
202        p4000)         rtems_bsp="$rtems_bsp p4600 p4650";;
203        mvme162)       rtems_bsp="$rtems_bsp mvme162 mvme162lx";;
204        *) rtems_bsp="$rtems_bsp $file";;
205      esac;
206    done
207
208    AC_MSG_RESULT([$rtems_bsp done])
209  fi
210
211  # collect makefiles for each bsp
212  for i in $rtems_bsp; do
213    # make sure there is a make/custom file for the bsp
214    if test ! -r "$srcdir/make/custom/${i}.cfg"; then
215      AC_MSG_ERROR([no make/custom/${i}.cfg file for BSP $i])
216    fi
217 
218    # account for "aliased" bsps which share source code
219    case $i in
220      mvme162lx)    bspdir=mvme162  ;;  # mvme162 board variant
221      gen68360_040) bspdir=gen68360 ;;  # 68360 in companion mode
222      go32_p5)      bspdir=go32     ;;  # go32 on Pentium class CPU
223      p4600)        bspdir=p4000    ;;  # p4000 board with IDT 4600
224      p4650)        bspdir=p4000    ;;  # p4000 board with IDT 4650
225      *)            bspdir=$i;;
226    esac
227
228    # Is there code where there should be for this BSP?
229    if test -d "$srcdir/c/src/lib/libbsp/$target_cpu/$bspdir"; then
230      RTEMS_BSP_LIST="$RTEMS_BSP_LIST $i"
231      # make sure the Makefiles in a bsp directory are only done once
232      echo $bspdirs | grep $bspdir >/dev/null 2>&1
233      if test $? -ne 0 ; then
234        bspdirs="$bspdirs $bspdir"
235        RTEMS_CHECK_MAKEFILE(c/src/lib/libbsp/$target_cpu/$bspdir)
236      fi
237    else
238      AC_MSG_ERROR([unable to find libbsp directory ($bspdir) for  $i])
239    fi
240  done
241fi
242
243# find all the CPU dependent library Makefiles
244RTEMS_CHECK_MAKEFILE(c/src/lib/libcpu/$target_cpu)
245
246dnl Workaround for go32
247if test "$skip_startfiles" != "yes"; then
248  RTEMS_CHECK_MAKEFILE(c/src/lib/start/$target_cpu)
249fi
250
251dnl END configure.target.in
252
253
254#
255#  Target configurations are listed in alphabetical order. 
256#  The BSPs for a target configuration are also listed in alphabetical order.
257#
258
259dnl NOTE: host_os is automatically set by autoconf
260
261if [[ "${program_prefix}" = "NONE" ]] ; then
262  if [[ "${target}" = "${host}" ]] ; then
263    program_prefix=
264  else
265    program_prefix=${target}-
266  fi
267fi
268
269PROJECT_ROOT=`pwd;`
270
271# If RTEMS macros are enabled, then use them.  Otherwise, use inlines.
272if test "$RTEMS_USE_MACROS" = "yes"; then
273  inline_dir=macros
274  if test "$RTEMS_HAS_POSIX_API" = "yes"; then
275    # The problem is that there is currently no code in posix/macros :)
276    AC_MSG_ERROR(Macros are not implemented for the POSIX API)
277  fi
278else
279  inline_dir=inline
280fi
281
282# If the KA9Q TCP/IP stack is enabled, then find all KA9Q Makefiles
283if test "$RTEMS_HAS_KA9Q" = "yes"; then
284  makefiles="$makefiles c/src/lib/libka9q/Makefile"
285fi
286
287# If the C++ support is enabled, then include the Makefiles
288if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then
289  makefiles="$makefiles c/src/lib/librtems++/Makefile"
290fi
291
292# If the tests are enabled, then find all the test suite Makefiles
293AC_MSG_CHECKING([Are the test suites enabled? ])
294tests_enabled=yes
295AC_ARG_ENABLE(tests, \
296[  --enable-tests                   enable tests], \
297  [case "${enableval}" in
298    yes) AC_MSG_RESULT(yes) ;;
299    no)  AC_MSG_RESULT(no) ; tests_enabled=no ;;
300    *)   AC_MSG_ERROR(bad value ${enableval} for tests option) ;;
301  esac],
302AC_MSG_RESULT(yes)
303)
304
305if test "$tests_enabled" = "yes"; then
306   RTEMS_CHECK_MAKEFILE(c/src/tests/tools/$target_cpu)
307   RTEMS_CHECK_MAKEFILE(c/src/tests/libtests)
308   RTEMS_CHECK_MAKEFILE(c/src/tests/sptests)
309   RTEMS_CHECK_MAKEFILE(c/src/tests/tmtests)
310   RTEMS_CHECK_MAKEFILE(c/src/tests/mptests)
311   if test "$RTEMS_HAS_POSIX" = "yes"; then
312     RTEMS_CHECK_MAKEFILE(c/src/tests/psxtests)
313   fi
314fi
315
316# If the HWAPI is enabled, the find the HWAPI Makefiles
317AC_MSG_CHECKING([Is the HWAPI enabled? ])
318AC_ARG_ENABLE(hwapi, \
319[  --enable-hwapi                 enable hardware API library], \
320  [case "${enableval}" in
321    yes) AC_MSG_RESULT(yes)
322         if test -f ${srcdir}/c/src/lib/libhwapi/Makefile.in ; then
323            makefiles="$makefiles c/src/lib/libhwapi/Makefile"
324            RTEMS_CHECK_MAKEFILE(c/src/lib/libhwapi/analog)
325            RTEMS_CHECK_MAKEFILE(c/src/lib/libhwapi/discrete)
326            RTEMS_CHECK_MAKEFILE(c/src/lib/libhwapi/drivers)
327            RTEMS_CHECK_MAKEFILE(c/src/lib/libhwapi/non_volatile_memory)
328            RTEMS_CHECK_MAKEFILE(c/src/lib/libhwapi/serial)
329            RTEMS_CHECK_MAKEFILE(c/src/lib/libhwapi/support)
330            RTEMS_CHECK_MAKEFILE(c/src/lib/libhwapi/wrapup)
331         else
332            AC_MSG_ERROR(No source code found for the HWAPI)
333         fi
334         ;;
335    no)  AC_MSG_RESULT(no) ;;
336    *)  AC_MSG_ERROR(bad value ${enableval} for hwapi option) ;;
337  esac],
338  AC_MSG_RESULT(no)
339)
340
341AC_SUBST(RTEMS_BSP_LIST)
342AC_SUBST(RTEMS_HOST)
343AC_SUBST(RTEMS_LIBC_DIR)
344AC_SUBST(RTEMS_USE_OWN_PDIR)
345AC_SUBST(RTEMS_HAS_POSIX_API)
346AC_SUBST(RTEMS_HAS_KA9Q)
347AC_SUBST(RTEMS_USE_MACROS)
348AC_SUBST(RTEMS_HAS_CPLUSPLUS)
349AC_SUBST(RTEMS_USE_GCC272)
350AC_SUBST(RTEMS_LIBC_DIR)
351AC_SUBST(PROJECT_ROOT)
352AC_SUBST(program_prefix)
353
354# pick up all the Makefiles in required parts of the tree
355RTEMS_CHECK_MAKEFILE(c/build-tools)
356RTEMS_CHECK_MAKEFILE(make)
357RTEMS_CHECK_MAKEFILE(c/src/lib/libmisc)
358RTEMS_CHECK_MAKEFILE(c/src/tests/samples)
359
360AC_CONFIG_HEADER(c/build-tools/src/config.h)
361
362AC_CONFIG_HEADER(c/build-tools/src/config.h)
363
364# try not to explicitly list a Makefile here
365AC_OUTPUT(
366Makefile
367c/Makefile
368c/src/Makefile
369c/src/exec/Makefile
370c/src/exec/score/Makefile
371c/src/exec/score/cpu/Makefile
372c/src/exec/score/headers/Makefile
373c/src/exec/score/${inline_dir}/Makefile
374c/src/exec/score/src/Makefile
375c/src/exec/score/tools/Makefile
376c/src/exec/score/tools/generic/Makefile
377c/src/exec/score/tools/generic/size_rtems
378c/src/exec/wrapup/Makefile
379c/src/exec/wrapup/rtems/Makefile
380c/src/lib/Makefile
381c/src/lib/include/Makefile
382c/src/lib/libbsp/Makefile
383c/src/lib/libbsp/shmdr/Makefile
384c/src/lib/libc/Makefile
385c/src/lib/libcpu/Makefile
386c/src/lib/start/Makefile
387c/src/lib/wrapup/Makefile
388c/src/tests/Makefile
389c/src/tests/support/Makefile
390c/src/tests/support/include/Makefile
391c/src/tests/support/stubdr/Makefile
392c/src/tests/support/wrapup/Makefile
393c/src/tests/tools/Makefile
394c/src/tests/tools/generic/Makefile
395$makefiles
396make/host.cfg
397make/target.cfg
398make/Templates/Makefile.inc
399c/update-tools/Makefile)
400
401echo
402echo target architecture: $target_cpu.
403echo available BSPs: $rtems_bsp.
404echo \'make all\' will build the following BSPs: $RTEMS_BSP_LIST.
405echo other BSPs can be built with \'make RTEMS_BSP=\"bsp1 bsp2 ...\"\'
406echo
Note: See TracBrowser for help on using the repository browser.