+++ /dev/null
-# ===========================================================================
-# http://
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_VCS_CHECKOUT
-#
-# DESCRIPTION
-#
-# Discover whether or not we are operating with a tree which
-# has been checked out of a version control system.
-#
-#
-# LICENSE
-#
-# Copyright (C) 2012 Brian Aker
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#
-# * The names of its contributors may not be used to endorse or
-# promote products derived from this software without specific prior
-# written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#serial 1
-
-AC_DEFUN([AX_VCS_CHECKOUT],[
- AC_CACHE_CHECK([for vcs checkout], [ac_cv_vcs_checkout], [
- AS_IF([test -d ".bzr"],[ac_cv_vcs_checkout=yes])
- AS_IF([test -d ".svn"],[ac_cv_vcs_checkout=yes])
- AS_IF([test -d ".hg"], [ac_cv_vcs_checkout=yes])
- AS_IF([test -d ".git"],[ac_cv_vcs_checkout=yes])
- ])
-
- AS_IF([test "$ac_cv_vcs_checkout" = yes], [
- ])
- ])
--- /dev/null
+AC_DEFUN([AX_C_COMPILER_VERSION],[
+
+ dnl Print version of C compiler
+ AC_MSG_CHECKING("C Compiler version--$GCC")
+ AS_IF([test "$GCC" = "yes"],[
+ CC_VERSION=`$CC --version | sed 1q` ],[
+ test "$SUNCC" = "yes"],[
+ CC_VERSION=`$CC -V 2>&1 | sed 1q` ],[
+ test "$CLANG" = "yes"],[
+ CC_VERSION=`$CC --version 2>&1 | sed 1q` ],[
+ CC_VERSION=""
+ ])
+ AC_MSG_RESULT("$CC_VERSION")
+ AC_SUBST(CC_VERSION)
+ ])
+
+
+AC_DEFUN([AX_CXX_COMPILER_VERSION], [
+
+ dnl Check C version while at it
+ AC_REQUIRE([AX_C_COMPILER_VERSION])
+
+ dnl Print version of CXX compiler
+ AC_MSG_CHECKING("C++ Compiler version")
+ AS_IF([test "$GCC" = "yes"],[
+ CXX_VERSION=`$CXX --version | sed 1q` ],[
+ test "$SUNCC" = "yes"],[
+ CXX_VERSION=`$CXX -V 2>&1 | sed 1q` ],[
+ test "$CLANG" = "yes"],[
+ CXX_VERSION=`$CXX --version 2>&1 | sed 1q` ],[
+ CXX_VERSION=""
+ ])
+ AC_MSG_RESULT("$CXX_VERSION")
+ AC_SUBST(CXX_VERSION)
+ ])
+
AX_APPEND_COMPILE_FLAGS([-Wall])
AX_APPEND_COMPILE_FLAGS([-Wextra])
+ AX_APPEND_COMPILE_FLAGS([-std=c99])
AX_APPEND_COMPILE_FLAGS([-Wpragmas])
+ AX_APPEND_COMPILE_FLAGS([-Wbad-function-cast])
+ AX_APPEND_COMPILE_FLAGS([-Wmissing-prototypes])
+ AX_APPEND_COMPILE_FLAGS([-Wnested-externs])
+ AX_APPEND_COMPILE_FLAGS([-Wold-style-definition])
+ AX_APPEND_COMPILE_FLAGS([-Woverride-init])
+ AX_APPEND_COMPILE_FLAGS([-Wstrict-prototypes])
+ AX_APPEND_COMPILE_FLAGS([-Wlogical-op])
AX_APPEND_COMPILE_FLAGS([--paramssp-buffer-size=1])
AX_APPEND_COMPILE_FLAGS([-Waddress])
AX_APPEND_COMPILE_FLAGS([-Warray-bounds])
- AX_APPEND_COMPILE_FLAGS([-Wbad-function-cast])
AX_APPEND_COMPILE_FLAGS([-Wchar-subscripts])
AX_APPEND_COMPILE_FLAGS([-Wcomment])
- AX_APPEND_COMPILE_FLAGS([-Wctor-dtor-privacy])
AX_APPEND_COMPILE_FLAGS([-Wfloat-equal])
AX_APPEND_COMPILE_FLAGS([-Wformat=2])
- AX_APPEND_COMPILE_FLAGS([-Wlogical-op])
AX_APPEND_COMPILE_FLAGS([-Wmaybe-uninitialized])
AX_APPEND_COMPILE_FLAGS([-Wmissing-field-initializers])
AX_APPEND_COMPILE_FLAGS([-Wmissing-noreturn])
- AX_APPEND_COMPILE_FLAGS([-Wmissing-prototypes])
- AX_APPEND_COMPILE_FLAGS([-Wnested-externs])
- AX_APPEND_COMPILE_FLAGS([-Wnon-virtual-dtor])
+ AX_APPEND_COMPILE_FLAGS([-Wlogical-op])
AX_APPEND_COMPILE_FLAGS([-Wnormalized=id])
- AX_APPEND_COMPILE_FLAGS([-Wold-style-definition])
- AX_APPEND_COMPILE_FLAGS([-Woverloaded-virtual])
- AX_APPEND_COMPILE_FLAGS([-Woverride-init])
AX_APPEND_COMPILE_FLAGS([-Wpointer-arith])
AX_APPEND_COMPILE_FLAGS([-Wredundant-decls])
AX_APPEND_COMPILE_FLAGS([-Wshadow])
AX_APPEND_COMPILE_FLAGS([-Wshorten-64-to-32])
AX_APPEND_COMPILE_FLAGS([-Wsign-compare])
AX_APPEND_COMPILE_FLAGS([-Wstrict-overflow=1])
- AX_APPEND_COMPILE_FLAGS([-Wstrict-prototypes])
AX_APPEND_COMPILE_FLAGS([-Wswitch-enum])
AX_APPEND_COMPILE_FLAGS([-Wundef])
+ AX_APPEND_COMPILE_FLAGS([-Wc++-compat])
+ AX_APPEND_COMPILE_FLAGS([-Wpointer-sign])
AX_APPEND_COMPILE_FLAGS([-Wunused-result])
AX_APPEND_COMPILE_FLAGS([-Wunused-variable])
AX_APPEND_COMPILE_FLAGS([-Wwrite-strings])
- AX_APPEND_COMPILE_FLAGS([-fPIE])
+ AX_APPEND_COMPILE_FLAGS([-Wformat-security])
AX_APPEND_COMPILE_FLAGS([-floop-parallelize-all])
AX_APPEND_COMPILE_FLAGS([-fwrapv])
AX_APPEND_COMPILE_FLAGS([-ggdb])
- AX_APPEND_COMPILE_FLAGS([-std=c99])
AC_LANG_POP
])
AX_APPEND_COMPILE_FLAGS([-Wstrict-overflow=1])
AX_APPEND_COMPILE_FLAGS([-Wswitch-enum])
AX_APPEND_COMPILE_FLAGS([-Wundef])
+ AX_APPEND_COMPILE_FLAGS([-Wc++11-compat])
AX_APPEND_COMPILE_FLAGS([-Wunused-result])
AX_APPEND_COMPILE_FLAGS([-Wunused-variable])
AX_APPEND_COMPILE_FLAGS([-Wwrite-strings])
+ AX_APPEND_COMPILE_FLAGS([-Wformat-security])
AX_APPEND_COMPILE_FLAGS([-floop-parallelize-all])
AX_APPEND_COMPILE_FLAGS([-fwrapv])
- AX_APPEND_COMPILE_FLAGS([-fPIE])
AX_APPEND_COMPILE_FLAGS([-ggdb])
AC_LANG_POP
])
--- /dev/null
+# ===========================================================================
+# http://
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_VCS_CHECKOUT
+#
+# DESCRIPTION
+#
+# Discover whether or not we are operating with a tree which
+# has been checked out of a version control system.
+#
+#
+# LICENSE
+#
+# Copyright (C) 2012 Brian Aker
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#
+# * The names of its contributors may not be used to endorse or
+# promote products derived from this software without specific prior
+# written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#serial 1
+
+AC_DEFUN([AX_VCS_CHECKOUT],[
+ AC_CACHE_CHECK([for vcs checkout], [ac_cv_vcs_checkout], [
+ AS_IF([test -d ".bzr"],[ac_cv_vcs_checkout=yes])
+ AS_IF([test -d ".svn"],[ac_cv_vcs_checkout=yes])
+ AS_IF([test -d ".hg"], [ac_cv_vcs_checkout=yes])
+ AS_IF([test -d ".git"],[ac_cv_vcs_checkout=yes])
+ ])
+
+ AS_IF([test "$ac_cv_vcs_checkout" = yes], [])
+ ])
+++ /dev/null
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems, Inc.
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([PANDORA_TEST_VC_DIR],[
- pandora_building_from_vc=no
-
- if test -d ".bzr" ; then
- pandora_building_from_bzr=yes
- pandora_building_from_vc=yes
- else
- pandora_building_from_bzr=no
- fi
-
- if test -d ".svn" ; then
- pandora_building_from_svn=yes
- pandora_building_from_vc=yes
- else
- pandora_building_from_svn=no
- fi
-
- if test -d ".hg" ; then
- pandora_building_from_hg=yes
- pandora_building_from_vc=yes
- else
- pandora_building_from_hg=no
- fi
-
- if test -d ".git" ; then
- pandora_building_from_git=yes
- pandora_building_from_vc=yes
- else
- pandora_building_from_git=no
- fi
-])