Browse files

commit changes from VW

  • Loading branch information...
1 parent 4241b8c commit 4ce2bd37885ba77842ca9307e780223da221eaf8 @novas0x2a novas0x2a committed Mar 12, 2009
View
18 configure.ac
@@ -21,6 +21,12 @@
#
# __END_LICENSE__
+m4_pattern_forbid([^AX_])
+m4_pattern_allow([AX_CFLAGS])
+m4_pattern_allow([AX_INCLUDE_DIR])
+m4_pattern_allow([AX_LIBDIR])
+m4_pattern_allow([AX_OTHER_LIBDIR])
+
##################################################
# A few starting bits
##################################################
@@ -150,10 +156,10 @@ AX_PKG_ONE_OF(MBA,
AX_PKG(SPICE, [], [-lcspice], [SpiceUsr.h SpiceZfc.h])
# Qt with AutoTroll.
-AT_WITH_QT([+gui +sql +opengl], [], [], [], [HAVE_PKG_QT_INCLUDE=no])
+AT_WITH_QT([+gui +sql +opengl], [], [], [], [HAVE_PKG_QT_INCLUDE="no:missing QT"])
if test x"$HAVE_PKG_QT_INCLUDE" != x"no"; then
- AT_REQUIRE_QT_VERSION([4.0], [], [HAVE_PKG_QT_INCLUDE=no])
+ AT_REQUIRE_QT_VERSION([4.0], [], [HAVE_PKG_QT_INCLUDE="no:wrong QT version"])
fi
# We seed QT_INCLUDE's cppflags with the ones qmake figured out
@@ -163,10 +169,10 @@ AX_PKG(QT_INCLUDE, [], [], [QVector])
AX_PKG_ONE_OF(QT,
APPLE_QT, [AX_PKG_APPLE(QT, [GL QT_INCLUDE], [$QT_LIBS])],
LINUX_QT,
- [AX_PKG(QT_LIBS, [], [$QT_LIBS], [])
- AX_PKG(QT_OPENGL, [GL QT_INCLUDE], [], [QtOpenGL])
- AX_PKG(QT_GUI, [QT_INCLUDE], [], [QLabel])
- AX_PKG(QT_SQL, [QT_INCLUDE], [], [QtSql])
+ [AX_PKG(QT_LIBS, [], [$QT_LIBS], [])
+ AX_PKG(QT_OPENGL, [GL QT_INCLUDE], [], [QtOpenGL])
+ AX_PKG(QT_GUI, [QT_INCLUDE], [], [QLabel])
+ AX_PKG(QT_SQL, [QT_INCLUDE], [], [QtSql])
AX_GROUP_PKG(LINUX_QT, [QT_INCLUDE QT_GUI QT_OPENGL QT_SQL QT_LIBS])])
AX_PKG_ONE_OF(QWT,
View
7 m4/ax_arg.m4
@@ -1,3 +1,10 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
dnl AX_ARG_(ENABLE|WITH)(<arg>, <default>, <tags>, <description>)
dnl possible tags are:
dnl always -> set autoconf macro to value
View
7 m4/ax_check_functions.m4
@@ -1,3 +1,10 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
dnl Usage: AX_CHECK_FUNCTIONS(<function-list>, <libs>, [<if-all-found>, <for-each-not-found>, <checking?>])
dnl
dnl this is like AC_CHECK_LIB, but with less side effects, and an explicit lib
View
7 m4/ax_check_introspection.m4
@@ -1,3 +1,10 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
# This checks for various introspection functions
AC_DEFUN([AX_CHECK_INTROSPECTION],
[
View
28 m4/ax_common_options.m4
@@ -1,3 +1,10 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
AC_DEFUN([AX_COMMON_OPTIONS], [
##################################################
@@ -7,7 +14,7 @@ AC_DEFUN([AX_COMMON_OPTIONS], [
AX_ARG_ENABLE(exceptions, yes, [am-yes cpp-bool], [enable the C++ exception mechanism])
AX_ARG_ENABLE(debug, no, [none], [generate debugging symbols])
AX_ARG_ENABLE(optimize, 3, [none], [compiler optimization level])
-AX_ARG_ENABLE(lib64, auto, [none], [force /lib64 instead of /lib])
+AX_ARG_ENABLE(arch-libs, no, [none], [force /lib64 (=64) or /lib32 (=32) instead of /lib])
AX_ARG_ENABLE(proper-libs, yes, [none], [useful linker options])
@@ -16,26 +23,17 @@ AX_ARG_ENABLE(proper-libs, yes, [none], [useful linker options])
# Handle options
##################################################
-# For 64-bit machines, we'll generally want to autodetect if lib64 exists,
-# and use it. Sometimes the user will want to force use of lib64 or lib
-# instead of the autodetection. Thus we have this command line option.
-if test x"$ENABLE_LIB64" = "xauto"; then
- if test -d "/lib64" -o -d "/usr/lib64"; then
- ENABLE_LIB64="yes"
- else
- ENABLE_LIB64="no"
- fi
-fi
-
# Sometimes we have /foo/lib64 and /foo/lib confusion on 64-bit machines,
# so we'll use possibly both if one doesn't appear for a certain
# library path.
-if test x"$ENABLE_LIB64" = "xyes"; then
+AX_OTHER_LIBDIR="lib"
+if test x"$ENABLE_ARCH_LIBS" = "x64"; then
AX_LIBDIR="lib64"
- AX_OTHER_LIBDIR="lib"
+elif test x"$ENABLE_ARCH_LIBS" = "x32"; then
+ AX_LIBDIR="lib32"
else
AX_LIBDIR="lib"
- AX_OTHER_LIBDIR="lib64"
+ AX_OTHER_LIBDIR=""
fi
if test x"$ENABLE_PROPER_LIBS" = "xyes"; then
View
7 m4/ax_config_header_prefix.m4
@@ -1,3 +1,10 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
dnl Usage: AX_CONFIG_HEADER_PREFIX(<filename>, <prefix>)
dnl Generates a configuration header file, adding a prefix to all symbols.
dnl This is a two-step process. First we generate the usual header file
View
7 m4/ax_find_files.m4
@@ -1,3 +1,10 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
dnl Usage: AX_FIND_FILES(<filenames>, <search paths>)
dnl Looks to see if all the given filenames (relative paths) are accessible
dnl from one of the given base paths. Returns the path or the empty string
View
7 m4/ax_group_pkg.m4
@@ -1,3 +1,10 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
dnl AX_GROUP_PKG(<pkg> [, <dep1> .. <depn>])
dnl A stripped-down AX_PKG that copies the vars from one pkg to another without
dnl re-checking. As long as all deps were found, pkg will be marked found,
View
7 m4/ax_instead_if.m4
@@ -1,3 +1,10 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
dnl AX_INSTEAD_IF(RUN-IF-NONEMPTY, MESSAGE)
dnl if RUN-IF-NONEMPTY is nonempty, print the MESSAGE as a warning
dnl else, print the MESSAGE as an error
View
7 m4/ax_load_deps.m4
@@ -1,3 +1,10 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
dnl AX_LOAD_DEPS(<pkg>, <deps>[, <missing>])
dnl copies deps into the pkg CPPFLAGS/LIBS
dnl missing could be a shell var name in which to store
View
7 m4/ax_log.m4
@@ -1,2 +1,9 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
dnl log something to the config.log
AC_DEFUN([AX_LOG], [echo "]$1[" >&AS_MESSAGE_LOG_FD])
View
7 m4/ax_module.m4
@@ -1,3 +1,10 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
# Usage: AX_MODULE(<name>, <directory>, <library>, <default>, <prerequisites>, <required dependencies>[, <optional dependencies>])
AC_DEFUN([AX_MODULE],
[
View
17 m4/ax_module_python.m4
@@ -1,3 +1,10 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
dnl usage: AX_MODULE_PYTHON(<directory>, <default>)
AC_DEFUN([AX_MODULE_PYTHON],
[
@@ -54,16 +61,6 @@ AC_DEFUN([AX_MODULE_PYTHON],
MAKE_MODULE_PYTHON=${ax_module_enable}
AC_SUBST(MAKE_MODULE_PYTHON)
- if test "${HAVE_PKG_PYTHON}" = "yes" ; then
- ax_have_pkg_bool=1
- else
- ax_have_pkg_bool=0
- fi
-
- AC_DEFINE_UNQUOTED(HAVE_PKG_PYTHON,
- [$ax_have_pkg_bool],
- [Define to 1 if the PYTHON module is available.])
-
if test "$HAVE_PKG_PYTHON_SRC" = "yes" ; then
AX_LOG([MAKE_MODULE_PYTHON = $MAKE_MODULE_PYTHON])
AX_LOG([HAVE_PKG_PYTHON = $HAVE_PKG_PYTHON])
View
9 m4/ax_pkg.m4
@@ -1,3 +1,10 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
dnl Usage: AX_PKG(<name>, <dependencies>, <libraries>, <headers>[, <relative include path>, <required-functions>])
AC_DEFUN([AX_PKG],
[
@@ -116,7 +123,7 @@ AC_DEFUN([AX_PKG],
if test -d $path/${AX_LIBDIR}; then
TRY_ADD_LDFLAGS="$TRY_ADD_LDFLAGS -L$path/${AX_LIBDIR}"
- elif test x"${AX_LIBDIR}" = "xlib64"; then
+ elif test x"${AX_OTHER_LIBDIR}" != "x"; then
TRY_ADD_LDFLAGS="$TRY_ADD_LDFLAGS -L$path/${AX_OTHER_LIBDIR}"
fi
fi
View
7 m4/ax_pkg_apple.m4
@@ -1,3 +1,10 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
dnl Usage: AX_PKG_APPLE(<name>, <dependencies>, <ldflags>)
dnl This is an AX_PKG for apple-specific packages.
AC_DEFUN([AX_PKG_APPLE],
View
15 m4/ax_pkg_boost.m4
@@ -1,3 +1,10 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
# Usage: AX_PKG_BOOST
AC_DEFUN([AX_PKG_BOOST],
[
@@ -31,7 +38,7 @@ AC_DEFUN([AX_PKG_BOOST],
PKG_BOOST_INCDIR="${ax_boost_base_path}/include"
PKG_BOOST_LIBDIR="${ax_boost_base_path}/${AX_LIBDIR}"
# In case it's not in lib64 despite specifying lib64...
- if test ! -d $PKG_BOOST_LIBDIR -a x"${AX_LIBDIR}" = "xlib64"; then
+ if test ! -d $PKG_BOOST_LIBDIR -a x"${AX_OTHER_LIBDIR}" != "x"; then
PKG_BOOST_LIBDIR="${ax_boost_base_path}/${AX_OTHER_LIBDIR}"
fi
HAVE_PKG_BOOST="yes"
@@ -51,7 +58,11 @@ AC_DEFUN([AX_PKG_BOOST],
for ax_boost_inc_path in `ls -d ${ax_boost_base_path}/include/boost-* 2> /dev/null` ; do
# At the moment we greedily accept the first one we find, regardless of version
PKG_BOOST_INCDIR="${ax_boost_inc_path}"
- PKG_BOOST_LIBDIR="${ax_boost_base_path}/lib"
+ PKG_BOOST_LIBDIR="${ax_boost_base_path}/${AX_LIBDIR}"
+ # In case it's not in lib64 despite specifying lib64...
+ if test ! -d $PKG_BOOST_LIBDIR -a x"${AX_OTHER_LIBDIR}" != "x"; then
+ PKG_BOOST_LIBDIR="${ax_boost_base_path}/${AX_OTHER_LIBDIR}"
+ fi
HAVE_PKG_BOOST="yes"
if test "$ENABLE_VERBOSE" = "yes"; then
AC_MSG_RESULT([found])
View
7 m4/ax_pkg_boost_check_version.m4
@@ -1,3 +1,10 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
# Usage: AX_PKG_BOOST_CHECK_VERSION([config-prefix])
# config-prefix should be the same as was used above
AC_DEFUN([AX_PKG_BOOST_CHECK_VERSION],
View
7 m4/ax_pkg_boost_lib.m4
@@ -1,3 +1,10 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
dnl Here's a new version of AX_PKG_BOOST_LIB designed to find the
dnl multithreaded boost libraries and boost libraries that are just weirdly
dnl named in general. Boost libraries follow a weird naming convention
View
7 m4/ax_pkg_check_function.m4
@@ -1,3 +1,10 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
dnl usage: PKG_CHECK_FUNCTION(pkg, function [, alias])
dnl check a pkg for an optional function, and perhaps call it by a different name
AC_DEFUN([PKG_CHECK_FUNCTION],
View
7 m4/ax_pkg_one_of.m4
@@ -1,3 +1,10 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
dnl AX_PKG_ONE_OF(<name>, <alt1-name>, <alt1-check>, ... [<altn-name>, <altn-check>])
dnl Declare a package to be fulfilled if one of its alts are found.
dnl alt-name is a package name, and alt-check is code that checks for the package
View
7 m4/ax_pkg_pthreads.m4
@@ -1,3 +1,10 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
dnl Usage: AX_PKG_PTHREADS
AC_DEFUN([AX_PKG_PTHREADS],
[
View
7 m4/ax_prog_ar.m4
@@ -1,3 +1,10 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
dnl Usage: AX_PROG_AR
dnl Provides a workaround for Mac OS X's unusual ar behavior, so that
dnl it's possible to build static convenience libraries using libtool
View
7 m4/ax_try_cppflags.m4
@@ -1,3 +1,10 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+
dnl Usage: AX_TRY_CPPFLAGS(flags,[action-if-yes,[action-if-no]])
dnl
dnl The default action-if-yes is to append the flags to CPPFLAGS
View
70 thirdparty/m4/autotroll.m4
@@ -17,6 +17,22 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
+#
+# In addition, as a special exception, the copyright holders of AutoTroll
+# give you unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the macros of
+# AutoTroll. You need not follow the terms of the GNU General Public License
+# when using or distributing such scripts, even though portions of the text of
+# AutoTroll appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes AutoTroll.
+#
+# This special exception to the GPL applies to versions of AutoTroll
+# released by the copyright holders of AutoTroll. Note that people who make
+# modified versions of AutoTroll are not obligated to grant this special
+# exception for their modified versions; it is their choice whether to do so.
+# The GNU General Public License gives permission to release a modified version
+# without this exception; this exception also makes it possible to release a
+# modified version which carries forward this exception.
# ------------- #
# DOCUMENTATION #
@@ -67,6 +83,12 @@
# course you can use .cpp or .cxx or .C rather than .cc) AutoTroll will build
# them automagically for you (using implicit rules defined in autotroll.mk).
+m4_ifdef([AX_INSTEAD_IF], [],
+[AC_DEFUN([AX_INSTEAD_IF],
+ [m4_ifval([$1],
+ [AC_MSG_WARN([$2]); [$1]],
+ [AC_MSG_ERROR([$2])])])])
+
m4_pattern_forbid([^AT_])dnl
m4_pattern_forbid([^_AT_])dnl
@@ -349,9 +371,19 @@ m4_ifval([$3],
sed 's/^/| /' "$pro_file" >&AS_MESSAGE_LOG_FD
if $QMAKE $QMAKE_ARGS; then :; else
- AX_INSTEAD_IF([$5], [Calling $QMAKE failed.])
+ AX_INSTEAD_IF([$5], [Calling $QMAKE $QMAKE_ARGS failed.])
break
fi
+
+ # Qmake from Qt-4.3.2 generates Makefile with slashes instead of backslashes
+ # on mingw and this lead to an error (see #96). The followind sed call is a
+ # work around this issue.
+ case $host_os in
+ *mingw*|*cygwin*)
+ sed -i 's|\([^ ]\)/|\1\\|g' Makefile
+ ;;
+ esac
+
# Try to compile a simple Qt app.
AC_CACHE_CHECK([whether we can build a simple Qt app], [at_cv_qt_build],
[at_cv_qt_build=ko
@@ -485,23 +517,25 @@ AC_DEFUN([AT_REQUIRE_QT_VERSION],
[
# this is a hack to get decent flow control with 'break'
for ignored in once; do
- if test x"$QMAKE" = x; then
- AX_INSTEAD_IF([$3], [\$QMAKE is empty. Did you invoke AT@&t@_WITH_QT before AT@&t@_REQUIRE_QT_VERSION?])
- break
- fi
- AC_CACHE_CHECK([for Qt's version], [at_cv_QT_VERSION],
- [echo "$as_me:$LINENO: Running $QMAKE --version:" >&AS_MESSAGE_LOG_FD
- $QMAKE --version >&AS_MESSAGE_LOG_FD 2>&1
- qmake_version_sed=['/^.*\([0-9]\.[0-9]\.[0-9]\).*$/!d;s//\1/']
- at_cv_QT_VERSION=`$QMAKE --version 2>&1 | sed "$qmake_version_sed"`])
- if test x"$at_cv_QT_VERSION" = x; then
- AX_INSTEAD_IF([$3], [Cannot detect Qt's version.])
- break
- fi
- AC_SUBST([QT_VERSION], [$at_cv_QT_VERSION])
- AS_VERSION_COMPARE([$QT_VERSION], [$1],
- [AX_INSTEAD_IF([$3], [This package requires Qt $1 or above.])],
- [$2], [$2])
+
+ if test x"$QMAKE" = x; then
+ AX_INSTEAD_IF([$3], [\$QMAKE is empty. Did you invoke AT@&t@_WITH_QT before AT@&t@_REQUIRE_QT_VERSION?])
+ break
+ fi
+ AC_CACHE_CHECK([for Qt's version], [at_cv_QT_VERSION],
+ [echo "$as_me:$LINENO: Running $QMAKE --version:" >&AS_MESSAGE_LOG_FD
+ $QMAKE --version >&AS_MESSAGE_LOG_FD 2>&1
+ qmake_version_sed=['/^.*\([0-9]\.[0-9]\.[0-9]\).*$/!d;s//\1/']
+ at_cv_QT_VERSION=`$QMAKE --version 2>&1 | sed "$qmake_version_sed"`])
+ if test x"$at_cv_QT_VERSION" = x; then
+ AX_INSTEAD_IF([$3], [Cannot detect Qt's version.])
+ break
+ fi
+ AC_SUBST([QT_VERSION], [$at_cv_QT_VERSION])
+ AS_VERSION_COMPARE([$QT_VERSION], [$1],
+ [AX_INSTEAD_IF([$3], [This package requires Qt $1 or above.])],
+ [$2], [$2])
+
#endhack
done
])

0 comments on commit 4ce2bd3

Please sign in to comment.