source: rtems/contrib/crossrpms/configure.ac @ 15e12bf6

4.8
Last change on this file since 15e12bf6 was 3568f50, checked in by Ralf Corsepius <ralf.corsepius@…>, on Nov 5, 2008 at 4:43:33 PM

Remove solaris2.7

  • Property mode set to 100644
File size: 3.6 KB
Line 
1## $Id$
2
3m4_define([RTEMS_API],[4.8])
4
5AC_PREREQ(2.60)
6AC_INIT([crossrpms],[0.20080604.1],[http://www.rtems.org/bugzilla])
7AC_CONFIG_SRCDIR([binutils/binutils.add])
8AC_CONFIG_AUX_DIR(.)
9
10AC_CANONICAL_HOST
11
12AC_PREFIX_DEFAULT([/opt/rtems-][RTEMS_API])
13
14AM_INIT_AUTOMAKE([1.9])
15
16AC_ARG_ENABLE([targets],
17  AS_HELP_STRING([--enable-targets=<targets>],[build for targets <targets>]),
18  [targets="$enable_targets"],
19  [targets=rtems]
20)
21
22case $targets in
23rtems )
24  savdir=`pwd`
25  cd $srcdir
26  targets=
27  for d in rtems*/*/Makefile.am; do
28      o=`echo $d | sed -e 's,/.*,,'`
29      a=`echo $d | sed -e 's,/Makefile\.am,,;s,.*/,,'`
30      targets="$targets $a-$o"
31  done
32  cd $savdir
33  ;;
34all )
35  savdir=`pwd`
36  cd $srcdir
37  targets=
38  for d in rtems*/*/Makefile.am; do
39      o=`echo $d | sed -e 's,/.*,,'`
40      a=`echo $d | sed -e 's,/Makefile\.am,,;s,.*/,,'`
41      targets="$targets $a-$o"
42  done
43  for d in solaris*/*/Makefile.am; \
44  do
45      o=`echo $d | sed -e 's,/.*,,'`
46      a=`echo $d | sed -e 's,/Makefile\.am,,;s,.*/,,'`
47      targets="$targets $a-sun-$o"
48  done
49  cd $savdir
50  ;;
51esac
52
53case "$prefix" in
54/usr)
55  sysdirpattern="/%sysdir/d"
56  rpmprefix=
57  host_subdirs=
58  ;;
59/usr/local)
60  sysdirpattern="/%sysdir/d"
61  rpmprefix="local-"
62  host_subdirs=autotools
63  ;;
64/opt/rtems)
65  sysdirpattern="s/^%sysdir/%dir/g"
66  rpmprefix="rtems-"
67  host_subdirs=autotools
68  ;;
69NONE|${ac_default_prefix}) # Default prefix
70  sysdirpattern="s/^%sysdir/%dir/g"
71  rpmprefix="[rtems-]RTEMS_API[-]"
72  host_subdirs=autotools
73  ;;
74*)
75  sysdirpattern="s/^%sysdir/%dir/g"
76  rpmprefix="custom-"
77  host_subdirs=autotools
78  ;;
79esac
80AC_SUBST(sysdirpattern)
81AC_SUBST(HOST_SUBDIRS,$host_subdirs)
82
83AC_ARG_ENABLE([rpmprefix],
84[  --enable-rpmprefix=<rpmprefix>      prefix rpms],[
85  case "$enable_rpmprefix" in
86  yes) # ignore, use default
87    ;;
88  no) rpmprefix=
89    ;;
90  *) # presume user knows what he is doing
91    rpmprefix=$enable_rpmprefix;;
92  esac
93])
94AC_SUBST(rpmprefix)
95
96SPECSTRIP_OPTS=
97
98AC_ARG_ENABLE([infos],
99[  --enable-infos                      enable building infos],[
100  case "$enable_infos" in
101  yes)
102    SPECSTRIP_OPTS="$SPECSTRIP_OPTS --enable-infos";;
103  no)
104    SPECSTRIP_OPTS="$SPECSTRIP_OPTS --disable-infos";;
105  *)
106    AC_MSG_ERROR([Invalid argument to --enable-infos])
107  esac
108])
109AC_SUBST(SPECSTRIP_OPTS)
110
111AS_IF([test "${host}" != "${build}"],[
112AC_MSG_CHECKING(for RPM OS)
113case "$host" in
114  i?86-*cygwin*)        RPM_OS=cygwin ;;
115  i?86-*mingw*)         RPM_OS=mingw32 ;;
116  sparc-*solaris*)      RPM_OS=solaris2.7 ;;
117  *)
118    AC_MSG_ERROR([Unsupported host ${host}])
119    ;;
120esac
121AC_MSG_RESULT($RPM_OS)
122])
123AC_SUBST(RPM_OS)
124
125for f in $targets; do
126ac_cv_mytarget=`$SHELL "$ac_aux_dir/config.sub" $f` ||
127  AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $f failed])
128  RTEMS_CANONICAL_SPLIT(mytarget)
129
130  AS_IF([test -d $srcdir/$mytarget_os/$mytarget_cpu],[
131    target_subdirs="$target_subdirs $mytarget_os/$mytarget_cpu"],[
132    AC_MSG_WARN([ignoring unsupported target $f])
133    ])
134done
135AC_SUBST(TARGET_SUBDIRS,$target_subdirs)
136AC_SUBST(rtems_api,RTEMS_API)
137
138AC_CONFIG_FILES([Makefile])
139
140AC_CONFIG_FILES([cygwin/Makefile])
141AC_CONFIG_FILES([cygwin/i686/Makefile])
142
143AC_CONFIG_FILES([mingw32/Makefile])
144AC_CONFIG_FILES([mingw32/i686/Makefile])
145
146AC_CONFIG_FILES([rtems4.8/Makefile])
147AC_CONFIG_FILES([rtems4.8/arm/Makefile])
148AC_CONFIG_FILES([rtems4.8/bfin/Makefile])
149AC_CONFIG_FILES([rtems4.8/h8300/Makefile])
150AC_CONFIG_FILES([rtems4.8/i386/Makefile])
151AC_CONFIG_FILES([rtems4.8/m68k/Makefile])
152AC_CONFIG_FILES([rtems4.8/mips/Makefile])
153AC_CONFIG_FILES([rtems4.8/mipstx39/Makefile])
154AC_CONFIG_FILES([rtems4.8/powerpc/Makefile])
155AC_CONFIG_FILES([rtems4.8/sh/Makefile])
156AC_CONFIG_FILES([rtems4.8/sparc/Makefile])
157
158AC_CONFIG_FILES([autotools/Makefile])
159
160AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.