1 dnl Copyright (C) 2003, 2005, 2006, 2007 Silicon Graphics, Inc.
3 dnl This program is free software: you can redistribute it and/or modify it
4 dnl under the terms of the GNU General Public License as published by
5 dnl the Free Software Foundation, either version 2 of the License, or
6 dnl (at your option) any later version.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
10 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 dnl GNU General Public License for more details.
13 dnl You should have received a copy of the GNU General Public License
14 dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
16 # Generic macro, sets up all of the global packaging variables.
17 # The following environment variables may be set to override defaults:
18 # DEBUG OPTIMIZER MALLOCLIB PLATFORM DISTRIBUTION INSTALL_USER INSTALL_GROUP
21 AC_DEFUN([AC_PACKAGE_GLOBALS],
28 pkg_version=${PKG_MAJOR}.${PKG_MINOR}.${PKG_REVISION}
30 pkg_release=$PKG_BUILD
31 test -z "$BUILD_VERSION" || pkg_release="$BUILD_VERSION"
34 DEBUG=${DEBUG:-'-DDEBUG'} dnl -DNDEBUG
38 OPTIMIZER=${OPTIMIZER:-'-g -O2'}
39 opt_build="$OPTIMIZER"
42 MALLOCLIB=${MALLOCLIB:-''} dnl /usr/lib/libefence.a
43 malloc_lib="$MALLOCLIB"
47 test -z "$INSTALL_USER" || pkg_user="$INSTALL_USER"
51 test -z "$INSTALL_GROUP" || pkg_group="$INSTALL_GROUP"
54 pkg_distribution=`uname -s`
55 test -z "$DISTRIBUTION" || pkg_distribution="$DISTRIBUTION"
56 AC_SUBST(pkg_distribution)
58 pkg_platform=`uname -s | tr 'A-Z' 'a-z' | sed -e 's/irix64/irix/'`
59 test -z "$PLATFORM" || pkg_platform="$PLATFORM"
60 AC_SUBST(pkg_platform)