aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac99
1 files changed, 99 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..abfa9d3
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,99 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+# $Id$
+
+AC_PREREQ(2.59)
+AC_INIT(rpm-mandriva-setup, 0.0.1, nanardon@mandriva.org)
+AC_CANONICAL_TARGET
+AM_INIT_AUTOMAKE(1.9)
+AC_CONFIG_SRCDIR
+
+# Checks for programs.
+AC_PROG_INSTALL
+AC_CONFIG_FILES([
+ Makefile
+ ])
+
+case "${target_cpu}" in
+ *86|athlon|k6)
+ RPMALLARCH="i386 i436 i586 i686 k6 athlon"
+ ;;
+ x86_64|amd64)
+ RPMALLARCH="i386 i436 i586 i686 k6 athlon amd64 x86_64"
+ ;;
+ ppc|powerpc)
+ RPMALLARCH="ppc"
+ ;;
+ ppc64|powerpc64)
+ RPMALLARCH="ppc ppc64"
+ ;;
+ sparc|sparcv9)
+ RPMALLARCH="sparc"
+ ;;
+ sparc64)
+ RPMALLARCH="sparc sparc64"
+ ;;
+esac
+RPMALLARCH="${RPMALLARCH} noarch"
+AC_SUBST(RPMALLARCH)
+
+#
+# get rid of the 4-th tuple, if config.guess returned "linux-gnu" for build_os
+#
+if echo "$build_os" | grep '.*-gnulibc1' > /dev/null ; then
+ build_os=`echo "${build_os}" | sed 's/-gnulibc1$//'`
+fi
+if echo "$build_os" | grep '.*-gnu' > /dev/null ; then
+ build_os=`echo "${build_os}" | sed 's/-gnu$//'`
+fi
+
+changequote(<, >)
+build_os_exact="${build_os}"
+build_os_major=`echo "${build_os}" | sed 's/\..*$//'`
+build_os_noversion=`echo "${build_os}" | sed 's/[0-9]*\..*$//'`
+changequote([, ])
+
+dnl Find our os
+RPMOS="$build_os_noversion"
+AC_SUBST(RPMOS)
+
+# Checks for library functions.
+RPMVENDOR="Mandriva"
+AC_ARG_WITH(vendor, [ --with-vendor the vendor of this config ])
+if test $with_vendor; then
+ RPMVENDOR=$with_vendor
+fi
+AC_SUBST(RPMVENDOR)
+
+if test X"$prefix" = XNONE ; then
+ usrprefix="$ac_default_prefix"
+else
+ usrprefix=$prefix
+fi
+
+RPMLIBDIR="${usrprefix}/lib/rpm"
+AC_ARG_WITH(rpmlibdir, [ --with-rpmlibdir=dir location of rpm config file ])
+if test $with_rpmlibdir; then
+ RPMLIBDIR=$with_rpmlibdir
+fi
+AC_SUBST(RPMLIBDIR)
+
+RPMCONFDIR=${RPMLIBDIR}
+AC_ARG_WITH(rpmconfdir, [ --with-rpmconfdir=dir location of our config ])
+if test $with_rpmconfdir; then
+ RPMCONFDIR=$with_rpmconfdir
+fi
+AC_SUBST(RPMCONFDIR)
+
+RPMVENDORDIR=`echo "${RPMCONFDIR}/${RPMVENDOR}" | tr [A-Z] [a-z]`
+AC_SUBST(RPMVENDORDIR)
+
+RPMSYSCONFDIR="/etc/rpm"
+AC_ARG_WITH(rpmsysconfdir, [ --with-rpmsysconfdir=dir location of etc ])
+if test $with_rpmsysconfdir; then
+ RPMSYSCONFDIR=$with_rpmsysconfdir
+fi
+AC_SUBST(RPMSYSCONFDIR)
+
+AC_OUTPUT