source: rtems/contrib/crossrpms/configure.ac @ 4cf3275

4.8
Last change on this file since 4cf3275 was 229c0470, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/26/08 at 05:33:51

Add rtems_api.

  • Property mode set to 100644
File size: 4.1 KB
RevLine 
[ee8a1ec]1## $Id$
2
[a59a751b]3m4_define([RTEMS_API],[4.8])
[0707f583]4
[161e2739]5AC_PREREQ(2.60)
6AC_INIT([crossrpms],[0.20070226.1],[http://www.rtems.org/bugzilla])
[ee8a1ec]7AC_CONFIG_SRCDIR([binutils/binutils.add])
8AC_CONFIG_AUX_DIR(.)
9
10AC_CANONICAL_HOST
[0ce942a]11
[0707f583]12AC_PREFIX_DEFAULT([/opt/rtems-][RTEMS_API])
[ee8a1ec]13
[255d476]14AM_INIT_AUTOMAKE([1.9])
[f05d8c9]15
[15fcf913]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=
[26bdc875]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"
[15fcf913]31  done
32  cd $savdir
33  ;;
34all )
35  savdir=`pwd`
36  cd $srcdir
37  targets=
[26bdc875]38  for d in rtems*/*/Makefile.am; do
[15fcf913]39      o=`echo $d | sed -e 's,/.*,,'`
[26bdc875]40      a=`echo $d | sed -e 's,/Makefile\.am,,;s,.*/,,'`
[15fcf913]41      targets="$targets $a-$o"
42  done
[26bdc875]43  for d in freebsd*/*/Makefile.am \
44    cygwin*/*/Makefile.am \
[22f187d0]45    mingw*/*/Makefile.am; \
[26bdc875]46  do
[15fcf913]47      o=`echo $d | sed -e 's,/.*,,'`
[26bdc875]48      a=`echo $d | sed -e 's,/Makefile\.am,,;s,.*/,,'`
[15fcf913]49      targets="$targets $a-pc-$o"
50  done
[22f187d0]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
[15fcf913]57  cd $savdir
58  ;;
59esac
60
[4d3e4476]61case "$prefix" in
62/usr)
[900ae6fd]63  sysdirpattern="/%sysdir/d"
[4d3e4476]64  rpmprefix=
[1d17363]65  host_subdirs=
[4d3e4476]66  ;;
67/usr/local)
[900ae6fd]68  sysdirpattern="/%sysdir/d"
[4d3e4476]69  rpmprefix="local-"
[1d17363]70  host_subdirs=autotools
[4d3e4476]71  ;;
72/opt/rtems)
[e39da00d]73  sysdirpattern="s/^%sysdir/%dir/g"
[4d3e4476]74  rpmprefix="rtems-"
[1d17363]75  host_subdirs=autotools
[4d3e4476]76  ;;
[77cd26d]77NONE|${ac_default_prefix}) # Default prefix
[e39da00d]78  sysdirpattern="s/^%sysdir/%dir/g"
[4d3e4476]79  rpmprefix="[rtems-]RTEMS_API[-]"
[1d17363]80  host_subdirs=autotools
[4d3e4476]81  ;;
[e39da00d]82*)
83  sysdirpattern="s/^%sysdir/%dir/g"
84  rpmprefix="custom-"
[1d17363]85  host_subdirs=autotools
[e39da00d]86  ;;
[4d3e4476]87esac
[900ae6fd]88AC_SUBST(sysdirpattern)
[1d17363]89AC_SUBST(HOST_SUBDIRS,$host_subdirs)
[4d3e4476]90
[0707f583]91AC_ARG_ENABLE([rpmprefix],
92[  --enable-rpmprefix=<rpmprefix>      prefix rpms],[
[4d3e4476]93  case "$enable_rpmprefix" in
94  yes) # ignore, use default
[0707f583]95    ;;
[4d3e4476]96  no) rpmprefix=
[0707f583]97    ;;
[4d3e4476]98  *) # presume user knows what he is doing
99    rpmprefix=$enable_rpmprefix;;
[0707f583]100  esac
101])
102AC_SUBST(rpmprefix)
103
[c29d0a21]104SPECSTRIP_OPTS=
105
[4d3e4476]106AC_ARG_ENABLE([infos],
107[  --enable-infos                      enable building infos],[
108  case "$enable_infos" in
109  yes)
[c29d0a21]110    SPECSTRIP_OPTS="$SPECSTRIP_OPTS --enable-infos";;
[4d3e4476]111  no)
[c29d0a21]112    SPECSTRIP_OPTS="$SPECSTRIP_OPTS --disable-infos";;
[4d3e4476]113  *)
114    AC_MSG_ERROR([Invalid argument to --enable-infos])
115  esac
116])
[c29d0a21]117AC_SUBST(SPECSTRIP_OPTS)
[4d3e4476]118
[f05d8c9]119AS_IF([test "${host}" != "${build}"],[
[ee8a1ec]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 ;;
[c4d4e15]126  i?86-*freebsd6.0)     RPM_OS=freebsd6.0 ;;
127  i?86-*freebsd6.1)     RPM_OS=freebsd6.1 ;;
[ee8a1ec]128  *)
129    AC_MSG_ERROR([Unsupported host ${host}])
130    ;;
131esac
132AC_MSG_RESULT($RPM_OS)
[f05d8c9]133])
[ee8a1ec]134AC_SUBST(RPM_OS)
135
[15fcf913]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)
[229c0470]147AC_SUBST(rtems_api,RTEMS_API)
[15fcf913]148
[ee8a1ec]149AC_CONFIG_FILES([Makefile])
150
151AC_CONFIG_FILES([cygwin/Makefile])
[4fea6f06]152AC_CONFIG_FILES([cygwin/i686/Makefile])
153
[ee8a1ec]154AC_CONFIG_FILES([mingw32/Makefile])
[4fea6f06]155AC_CONFIG_FILES([mingw32/i686/Makefile])
156
[ee8a1ec]157AC_CONFIG_FILES([solaris2.7/Makefile])
[4fea6f06]158AC_CONFIG_FILES([solaris2.7/sparc/Makefile])
159
[161e2739]160AC_CONFIG_FILES([freebsd6.2/Makefile])
161AC_CONFIG_FILES([freebsd6.2/i586/Makefile])
162
[3b10616]163AC_CONFIG_FILES([rtems4.8/Makefile])
164AC_CONFIG_FILES([rtems4.8/arm/Makefile])
165AC_CONFIG_FILES([rtems4.8/bfin/Makefile])
166AC_CONFIG_FILES([rtems4.8/h8300/Makefile])
167AC_CONFIG_FILES([rtems4.8/i386/Makefile])
168AC_CONFIG_FILES([rtems4.8/m68k/Makefile])
169AC_CONFIG_FILES([rtems4.8/mips/Makefile])
170AC_CONFIG_FILES([rtems4.8/mipstx39/Makefile])
171AC_CONFIG_FILES([rtems4.8/powerpc/Makefile])
172AC_CONFIG_FILES([rtems4.8/sh/Makefile])
173AC_CONFIG_FILES([rtems4.8/sparc/Makefile])
174
[c45ec73]175AC_CONFIG_FILES([autotools/Makefile])
176
[ee8a1ec]177AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.