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 11/05/08 at 16:43:33

Remove solaris2.7

  • Property mode set to 100644
File size: 3.6 KB
RevLine 
[ee8a1ec]1## $Id$
2
[a59a751b]3m4_define([RTEMS_API],[4.8])
[0707f583]4
[161e2739]5AC_PREREQ(2.60)
[530d307f]6AC_INIT([crossrpms],[0.20080604.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
[22f187d0]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
[15fcf913]49  cd $savdir
50  ;;
51esac
52
[4d3e4476]53case "$prefix" in
54/usr)
[900ae6fd]55  sysdirpattern="/%sysdir/d"
[4d3e4476]56  rpmprefix=
[1d17363]57  host_subdirs=
[4d3e4476]58  ;;
59/usr/local)
[900ae6fd]60  sysdirpattern="/%sysdir/d"
[4d3e4476]61  rpmprefix="local-"
[1d17363]62  host_subdirs=autotools
[4d3e4476]63  ;;
64/opt/rtems)
[e39da00d]65  sysdirpattern="s/^%sysdir/%dir/g"
[4d3e4476]66  rpmprefix="rtems-"
[1d17363]67  host_subdirs=autotools
[4d3e4476]68  ;;
[77cd26d]69NONE|${ac_default_prefix}) # Default prefix
[e39da00d]70  sysdirpattern="s/^%sysdir/%dir/g"
[4d3e4476]71  rpmprefix="[rtems-]RTEMS_API[-]"
[1d17363]72  host_subdirs=autotools
[4d3e4476]73  ;;
[e39da00d]74*)
75  sysdirpattern="s/^%sysdir/%dir/g"
76  rpmprefix="custom-"
[1d17363]77  host_subdirs=autotools
[e39da00d]78  ;;
[4d3e4476]79esac
[900ae6fd]80AC_SUBST(sysdirpattern)
[1d17363]81AC_SUBST(HOST_SUBDIRS,$host_subdirs)
[4d3e4476]82
[0707f583]83AC_ARG_ENABLE([rpmprefix],
84[  --enable-rpmprefix=<rpmprefix>      prefix rpms],[
[4d3e4476]85  case "$enable_rpmprefix" in
86  yes) # ignore, use default
[0707f583]87    ;;
[4d3e4476]88  no) rpmprefix=
[0707f583]89    ;;
[4d3e4476]90  *) # presume user knows what he is doing
91    rpmprefix=$enable_rpmprefix;;
[0707f583]92  esac
93])
94AC_SUBST(rpmprefix)
95
[c29d0a21]96SPECSTRIP_OPTS=
97
[4d3e4476]98AC_ARG_ENABLE([infos],
99[  --enable-infos                      enable building infos],[
100  case "$enable_infos" in
101  yes)
[c29d0a21]102    SPECSTRIP_OPTS="$SPECSTRIP_OPTS --enable-infos";;
[4d3e4476]103  no)
[c29d0a21]104    SPECSTRIP_OPTS="$SPECSTRIP_OPTS --disable-infos";;
[4d3e4476]105  *)
106    AC_MSG_ERROR([Invalid argument to --enable-infos])
107  esac
108])
[c29d0a21]109AC_SUBST(SPECSTRIP_OPTS)
[4d3e4476]110
[f05d8c9]111AS_IF([test "${host}" != "${build}"],[
[ee8a1ec]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)
[f05d8c9]122])
[ee8a1ec]123AC_SUBST(RPM_OS)
124
[15fcf913]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)
[229c0470]136AC_SUBST(rtems_api,RTEMS_API)
[15fcf913]137
[ee8a1ec]138AC_CONFIG_FILES([Makefile])
139
140AC_CONFIG_FILES([cygwin/Makefile])
[4fea6f06]141AC_CONFIG_FILES([cygwin/i686/Makefile])
142
[ee8a1ec]143AC_CONFIG_FILES([mingw32/Makefile])
[4fea6f06]144AC_CONFIG_FILES([mingw32/i686/Makefile])
145
[3b10616]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
[c45ec73]158AC_CONFIG_FILES([autotools/Makefile])
159
[ee8a1ec]160AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.