source: rtems/contrib/crossrpms/configure.ac @ 7a057b1

4.104.11
Last change on this file since 7a057b1 was 7a057b1, checked in by Ralf Corsepius <ralf.corsepius@…>, on Nov 30, 2009 at 10:48:22 AM

Abandon freebsd7.0, freebsd7.1

  • Property mode set to 100644
File size: 4.6 KB
Line 
1## $Id$
2
3m4_define([RTEMS_API],[4.10])
4
5AC_PREREQ(2.61)
6AC_INIT([crossrpms],[0.20091130.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 freebsd*/*/Makefile.am \
44    cygwin*/*/Makefile.am \
45    mingw*/*/Makefile.am; \
46  do
47      o=`echo $d | sed -e 's,/.*,,'`
48      a=`echo $d | sed -e 's,/Makefile\.am,,;s,.*/,,'`
49      targets="$targets $a-pc-$o"
50  done
51  for d in solaris*/*/Makefile.am; \
52  do
53      o=`echo $d | sed -e 's,/.*,,'`
54      a=`echo $d | sed -e 's,/Makefile\.am,,;s,.*/,,'`
55      targets="$targets $a-sun-$o"
56  done
57  cd $savdir
58  ;;
59esac
60
61case "$prefix" in
62/usr)
63  sysdirpattern="/%sysdir/d"
64  rpmprefix=
65  host_subdirs=
66  ;;
67/usr/local)
68  sysdirpattern="/%sysdir/d"
69  rpmprefix="local-"
70  host_subdirs=autotools
71  ;;
72/opt/rtems)
73  sysdirpattern="s/^%sysdir/%dir/g"
74  rpmprefix="rtems-"
75  host_subdirs=autotools
76  ;;
77NONE|${ac_default_prefix}) # Default prefix
78  sysdirpattern="s/^%sysdir/%dir/g"
79  rpmprefix="[rtems-]RTEMS_API[-]"
80  host_subdirs=autotools
81  ;;
82*)
83  sysdirpattern="s/^%sysdir/%dir/g"
84  rpmprefix="custom-"
85  host_subdirs=autotools
86  ;;
87esac
88AC_SUBST(sysdirpattern)
89AC_SUBST(HOST_SUBDIRS,$host_subdirs)
90
91AC_ARG_ENABLE([rpmprefix],
92[  --enable-rpmprefix=<rpmprefix>      prefix rpms],[
93  case "$enable_rpmprefix" in
94  yes) # ignore, use default
95    ;;
96  no) rpmprefix=
97    ;;
98  *) # presume user knows what he is doing
99    rpmprefix=$enable_rpmprefix;;
100  esac
101])
102AC_SUBST(rpmprefix)
103
104SPECSTRIP_OPTS=
105
106AC_ARG_ENABLE([infos],
107[  --enable-infos                      enable building infos],[
108  case "$enable_infos" in
109  yes)
110    SPECSTRIP_OPTS="$SPECSTRIP_OPTS --enable-infos";;
111  no)
112    SPECSTRIP_OPTS="$SPECSTRIP_OPTS --disable-infos";;
113  *)
114    AC_MSG_ERROR([Invalid argument to --enable-infos])
115  esac
116])
117AC_SUBST(SPECSTRIP_OPTS)
118
119AS_IF([test "${host}" != "${build}"],[
120AC_MSG_CHECKING(for RPM OS)
121case "$host" in
122  i?86-*cygwin*)        RPM_OS=cygwin ;;
123  i?86-*mingw*)         RPM_OS=mingw32 ;;
124  sparc-*solaris*)      RPM_OS=solaris2.7 ;;
125  i?86-*freebsd5*)      RPM_OS=freebsd5.2 ;;
126  i?86-*freebsd6.0)     RPM_OS=freebsd6.0 ;;
127  i?86-*freebsd6.1)     RPM_OS=freebsd6.1 ;;
128  *)
129    AC_MSG_ERROR([Unsupported host ${host}])
130    ;;
131esac
132AC_MSG_RESULT($RPM_OS)
133])
134AC_SUBST(RPM_OS)
135
136for f in $targets; do
137ac_cv_mytarget=`$SHELL "$ac_aux_dir/config.sub" $f` ||
138  AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $f failed])
139  RTEMS_CANONICAL_SPLIT(mytarget)
140
141  AS_IF([test -d $srcdir/$mytarget_os/$mytarget_cpu],[
142    target_subdirs="$target_subdirs $mytarget_os/$mytarget_cpu"],[
143    AC_MSG_WARN([ignoring unsupported target $f])
144    ])
145done
146AC_SUBST(TARGET_SUBDIRS,$target_subdirs)
147AC_SUBST(rtems_api,RTEMS_API)
148
149AC_CONFIG_FILES([Makefile])
150
151AC_CONFIG_FILES([cygwin/Makefile])
152AC_CONFIG_FILES([cygwin/i686/Makefile])
153
154AC_CONFIG_FILES([mingw32/Makefile])
155AC_CONFIG_FILES([mingw32/i686/Makefile])
156
157AC_CONFIG_FILES([solaris2.7/Makefile])
158AC_CONFIG_FILES([solaris2.7/sparc/Makefile])
159
160AC_CONFIG_FILES([freebsd6.4/Makefile])
161AC_CONFIG_FILES([freebsd6.4/i586/Makefile])
162
163AC_CONFIG_FILES([freebsd7.2/Makefile])
164AC_CONFIG_FILES([freebsd7.2/i586/Makefile])
165
166AC_CONFIG_FILES([freebsd8.0/Makefile])
167AC_CONFIG_FILES([freebsd8.0/i586/Makefile])
168
169AC_CONFIG_FILES([netbsd5.0.1/Makefile])
170AC_CONFIG_FILES([netbsd5.0.1/i386/Makefile])
171
172AC_CONFIG_FILES([rtems4.10/Makefile])
173AC_CONFIG_FILES([rtems4.10/arm/Makefile])
174AC_CONFIG_FILES([rtems4.10/avr/Makefile])
175AC_CONFIG_FILES([rtems4.10/bfin/Makefile])
176AC_CONFIG_FILES([rtems4.10/h8300/Makefile])
177AC_CONFIG_FILES([rtems4.10/i386/Makefile])
178AC_CONFIG_FILES([rtems4.10/lm32/Makefile])
179AC_CONFIG_FILES([rtems4.10/m32c/Makefile])
180AC_CONFIG_FILES([rtems4.10/m32r/Makefile])
181AC_CONFIG_FILES([rtems4.10/m68k/Makefile])
182AC_CONFIG_FILES([rtems4.10/mips/Makefile])
183AC_CONFIG_FILES([rtems4.10/mipstx39/Makefile])
184AC_CONFIG_FILES([rtems4.10/powerpc/Makefile])
185AC_CONFIG_FILES([rtems4.10/sh/Makefile])
186AC_CONFIG_FILES([rtems4.10/sparc/Makefile])
187
188AC_CONFIG_FILES([autotools/Makefile])
189
190AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.