source: rtems/contrib/crossrpms/configure.ac @ 300dce7

4.104.114.84.95
Last change on this file since 300dce7 was 300dce7, checked in by Ralf Corsepius <ralf.corsepius@…>, on Aug 2, 2006 at 3:39:00 AM

Bump version.

  • Property mode set to 100644
File size: 4.2 KB
Line 
1## $Id$
2
3m4_define([RTEMS_API],[4.7])
4
5AC_PREREQ(2.59)
6AC_INIT([crossrpms],[0.20060801.1],[rtems-bugs@rtems.com])
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  ;;
66/usr/local)
67  sysdirpattern="/%sysdir/d"
68  rpmprefix="local-"
69  ;;
70/opt/rtems)
71  sysdirpattern="s/^%sysdir/%dir/g"
72  rpmprefix="rtems-"
73  ;;
74NONE|${ac_default_prefix}) # Default prefix
75  sysdirpattern="s/^%sysdir/%dir/g"
76  rpmprefix="[rtems-]RTEMS_API[-]"
77  ;;
78*)
79  sysdirpattern="s/^%sysdir/%dir/g"
80  rpmprefix="custom-"
81  ;;
82esac
83AC_SUBST(sysdirpattern)
84
85AC_ARG_ENABLE([rpmprefix],
86[  --enable-rpmprefix=<rpmprefix>      prefix rpms],[
87  case "$enable_rpmprefix" in
88  yes) # ignore, use default
89    ;;
90  no) rpmprefix=
91    ;;
92  *) # presume user knows what he is doing
93    rpmprefix=$enable_rpmprefix;;
94  esac
95])
96AC_SUBST(rpmprefix)
97
98SPECSTRIP_OPTS=
99
100AC_ARG_ENABLE([infos],
101[  --enable-infos                      enable building infos],[
102  case "$enable_infos" in
103  yes)
104    SPECSTRIP_OPTS="$SPECSTRIP_OPTS --enable-infos";;
105  no)
106    SPECSTRIP_OPTS="$SPECSTRIP_OPTS --disable-infos";;
107  *)
108    AC_MSG_ERROR([Invalid argument to --enable-infos])
109  esac
110])
111AC_SUBST(SPECSTRIP_OPTS)
112
113AS_IF([test "${host}" != "${build}"],[
114AC_MSG_CHECKING(for RPM OS)
115case "$host" in
116  i?86-*cygwin*)        RPM_OS=cygwin ;;
117  i?86-*mingw*)         RPM_OS=mingw32 ;;
118  sparc-*solaris*)      RPM_OS=solaris2.7 ;;
119  i?86-*freebsd5*)      RPM_OS=freebsd5.2 ;;
120  i?86-*freebsd6.0)     RPM_OS=freebsd6.0 ;;
121  i?86-*freebsd6.1)     RPM_OS=freebsd6.1 ;;
122  *)
123    AC_MSG_ERROR([Unsupported host ${host}])
124    ;;
125esac
126AC_MSG_RESULT($RPM_OS)
127])
128AC_SUBST(RPM_OS)
129
130for f in $targets; do
131ac_cv_mytarget=`$SHELL "$ac_aux_dir/config.sub" $f` ||
132  AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $f failed])
133  RTEMS_CANONICAL_SPLIT(mytarget)
134
135  AS_IF([test -d $srcdir/$mytarget_os/$mytarget_cpu],[
136    target_subdirs="$target_subdirs $mytarget_os/$mytarget_cpu"],[
137    AC_MSG_WARN([ignoring unsupported target $f])
138    ])
139done
140AC_SUBST(TARGET_SUBDIRS,$target_subdirs)
141
142AC_CONFIG_FILES([Makefile])
143
144AC_CONFIG_FILES([cygwin/Makefile])
145AC_CONFIG_FILES([cygwin/i686/Makefile])
146
147AC_CONFIG_FILES([mingw32/Makefile])
148AC_CONFIG_FILES([mingw32/i686/Makefile])
149
150AC_CONFIG_FILES([solaris2.7/Makefile])
151AC_CONFIG_FILES([solaris2.7/sparc/Makefile])
152
153AC_CONFIG_FILES([freebsd5.2/Makefile])
154AC_CONFIG_FILES([freebsd5.2/i586/Makefile])
155
156AC_CONFIG_FILES([freebsd6.0/Makefile])
157AC_CONFIG_FILES([freebsd6.0/i586/Makefile])
158
159AC_CONFIG_FILES([freebsd6.1/Makefile])
160AC_CONFIG_FILES([freebsd6.1/i586/Makefile])
161
162AC_CONFIG_FILES([rtems4.7/Makefile])
163AC_CONFIG_FILES([rtems4.7/arm/Makefile])
164AC_CONFIG_FILES([rtems4.7/avr/Makefile])
165AC_CONFIG_FILES([rtems4.7/h8300/Makefile])
166AC_CONFIG_FILES([rtems4.7/i386/Makefile])
167AC_CONFIG_FILES([rtems4.7/m68k/Makefile])
168AC_CONFIG_FILES([rtems4.7/mips/Makefile])
169AC_CONFIG_FILES([rtems4.7/mipstx39/Makefile])
170AC_CONFIG_FILES([rtems4.7/powerpc/Makefile])
171AC_CONFIG_FILES([rtems4.7/sh/Makefile])
172AC_CONFIG_FILES([rtems4.7/sparc/Makefile])
173AC_CONFIG_FILES([rtems4.7/tic4x/Makefile])
174
175AC_CONFIG_FILES([autotools/Makefile])
176
177AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.