diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 60 |
1 files changed, 45 insertions, 15 deletions
diff --git a/configure.in b/configure.in index 12c44c2..f426da5 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,7 @@ dnl unpacking check - this file must exist AC_INIT(include/attributes.h) +AC_CONFIG_HEADER(include/config.h) + pkg_name="attr" AC_SUBST(pkg_name) @@ -7,8 +9,10 @@ AC_SUBST(pkg_name) # Note: the following environment variables may be set to override the # defaults (to change paths and/or executables, build parameters, etc): # -# DEBUG OPTIMIZER MAKE CC LD TAR ZIP RPM AWK SED ECHO -# LIBTOOL MALLOCLIB DISTRIBUTION PACKAGE_BUILDER +# DEBUG OPTIMIZER MALLOCLIB +# PLATFORM DISTRIBUTION BUILDER +# MAKE CC LD TAR ZIP AWK SED ECHO RPM LIBTOOL +# MSGFMT MSGMERGE XGETTEXT # DEBUG=${DEBUG:-'-DDEBUG'} # -DNDEBUG @@ -35,12 +39,16 @@ pkg_release=$PKG_BUILD AC_SUBST(pkg_version) AC_SUBST(pkg_release) -pkg_distribution="Generic Linux" +pkg_platform=`uname -s` +pkg_distribution="Generic $pkg_platform" +pkg_platform=`echo $pkg_platform | tr 'A-Z' 'a-z'` +test -z "$PLATFORM" || pkg_platform="$PLATFORM" test -z "$DISTRIBUTION" || pkg_distribution="$DISTRIBUTION" AC_SUBST(pkg_distribution) +AC_SUBST(pkg_platform) pkg_builder=`id -u -n`@`hostname` -test -z "$PACKAGE_BUILDER" || pkg_builder="$PACKAGE_BUILDER" +test -z "$BUILDER" || pkg_builder="$BUILDER" AC_SUBST(pkg_builder) dnl check if user wants their own C compiler @@ -68,6 +76,11 @@ test -z "$ZIP" && AC_PATH_PROG(ZIP, gzip, /bin/gzip) zip=$ZIP AC_SUBST(zip) +dnl check if the makedepend program is available +test -z "$MAKEDEPEND" && AC_PATH_PROG(MAKEDEPEND, makedepend, /bin/true) +makedepend=$MAKEDEPEND +AC_SUBST(makedepend) + dnl check if the rpm program is available test -z "$RPM" && AC_PATH_PROG(RPM, rpm, /bin/rpm) rpm=$RPM @@ -89,18 +102,7 @@ if test $rpm_version -ge 4; then else rpmbuild=$RPM fi - AC_SUBST(rpmbuild) - -dnl check if the msgfmt program is available -test -z "$MSGFMT" && AC_CHECK_PROG(MSGFMT, msgfmt, /usr/bin/msgfmt) -msgfmt=$MSGFMT -AC_SUBST(msgfmt) - -dnl check if the makedepend program is available -test -z "$MAKEDEPEND" && AC_PATH_PROG(MAKEDEPEND, makedepend, /bin/true) -makedepend=$MAKEDEPEND -AC_SUBST(makedepend) dnl check if symbolic links are supported AC_PROG_LN_S @@ -116,6 +118,27 @@ test -z "$ECHO" && AC_PATH_PROG(ECHO, echo, /bin/echo) echo=$ECHO AC_SUBST(echo) +dnl check if the msgfmt program is available +test -z "$MSGFMT" && AC_CHECK_PROG(MSGFMT, msgfmt, /usr/bin/msgfmt) +msgfmt=$MSGFMT +AC_SUBST(msgfmt) + +dnl check if the msgmerge program is available +test -z "$MSGMERGE" && AC_CHECK_PROG(MSGMERGE, msgmerge, /usr/bin/msgmerge) +msgmerge=$MSGMERGE +AC_SUBST(msgmerge) + +dnl ensure xgettext is installed +test -z "$XGETTEXT" && AC_CHECK_PROG(XGETTEXT, xgettext, /usr/bin/xgettext) +if test "$XGETTEXT" = ""; then + echo + echo 'FATAL ERROR: xgettext does not seem to be installed.' + echo $pkg_name cannot be built without a working gettext installation. + exit 1 +fi +xgettext=$XGETTEXT +AC_SUBST(xgettext) + dnl ensure libtool is installed test -z "$LIBTOOL" && AC_PATH_PROG(LIBTOOL, libtool,,/usr/bin) if test "$LIBTOOL" = ""; then @@ -133,6 +156,13 @@ AC_ARG_ENABLE(shared, enable_shared=yes) AC_SUBST(enable_shared) +dnl will we be making use of gettext? +AC_ARG_ENABLE(gettext, + [ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],, + enable_gettext=yes) +test $enable_gettext = "yes" && AC_DEFINE(ENABLE_GETTEXT) +AC_SUBST(enable_gettext) + dnl man pages (source) dnl also check if man page source is gzipped dnl (usually on Debian, but not Redhat pre-7.0) |