1 # arch macro for Intel i?86 compatibile processors
2 %ix86 i386 i486 i586 i686 i786 i886 i986
4 #------------------------------------------------------------------------------
5 # The GNUconfigure macro does the following:
6 # update config.guess and config.sub.
7 # regenerate all autoconf/automake files
8 # optionally change to a directory (make the directory if requested).
9 # run configure with correct prefix, platform, and CFLAGS.
10 # optionally restore current directory.
12 # Based on autogen.sh from GNOME and orginal GNUconfigure
15 CFLAGS="${CFLAGS} %{optflags}" ; export CFLAGS; \
16 LDFLAGS="${LDFLAGS} %{-s:-s}" ; export LDFLAGS; \
17 %{-C:_mydir="`pwd`"; %{-M: %{__mkdir} -p %{-C*};} cd %{-C*}} \
18 dirs="`find ${_mydir} -name configure.in -print`"; export dirs; \
19 for coin in `echo ${dirs}` \
21 dr=`dirname ${coin}`; \
22 if test -f ${dr}/NO-AUTO-GEN; then \
25 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < ${coin}`; \
27 aclocalinclude="${ACLOCAL_FLAGS}"; \
28 for k in ${macrodirs}; do \
29 if test -d ${k}; then \
30 aclocalinclude="${aclocalinclude} -I ${k}"; \
32 ## echo "**Warning**: No such directory \`${k}'. Ignored." \
35 if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then \
36 if grep "sed.*POTFILES" configure.in >/dev/null; then \
37 : do nothing -- we still have an old unmodified configure.in \
39 test -r ${dr}/aclocal.m4 || touch ${dr}/aclocal.m4; \
40 echo "no" | gettextize --force --copy; \
41 test -r ${dr}/aclocal.m4 && %{__chmod} u+w ${dr}/aclocal.m4; \
44 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then \
45 %{__libtoolize} --force --copy; \
47 aclocal ${aclocalinclude}; \
48 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then \
51 echo "Running automake --gnu ${am_opt} ..."; \
52 %{__automake} --add-missing --gnu ${am_opt}; \
57 %{-C:${_mydir}}%{!-C:.}/configure %{_target_platform} --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} --bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} --datadir=%{_datadir} --includedir=%{_includedir} --libdir=%{_libdir} --libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} --sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} --infodir=%{_infodir} %* ; \
58 %{-C:cd ${_mydir}; unset _mydir}
60 #-----------------------------------------------------------------
61 %configure { CFLAGS="$CFLAGS $RPM_OPT_FLAGS" ; export CFLAGS ; \
62 CXXFLAGS="$CXXFLAGS $RPM_OPT_FLAGS" ; export CXXFLAGS ; \
63 FFLAGS="$FFLAGS $RPM_OPT_FLAGS" ; export FFLAGS ; \
64 ./configure %{_target_platform} \
66 --exec-prefix=%{_exec_prefix} \
68 --sbindir=%{_sbindir} \
69 --sysconfdir=%{_sysconfdir} \
70 --datadir=%{_datadir} \
71 --includedir=%{_includedir} \
73 --libexecdir=%{_libexecdir} \
74 --localstatedir=%{_localstatedir} \
75 --sharedstatedir=%{_sharedstatedir} \
77 --infodir=%{_infodir} }
78 #------------------------------------------------------------------------
80 # %(%find_lang %{name})
82 %find_lang @RPMCONFIGDIR@/find-lang.sh %{_builddir}