doxygen: specifying builddir is not required
[platform/upstream/libevdev.git] / configure.ac
index 40675ef..2e53d95 100644 (file)
@@ -1,11 +1,32 @@
-AC_PREREQ([2.64])
+# Copyright © 2013 Red Hat, Inc.
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that copyright
+# notice and this permission notice appear in supporting documentation, and
+# that the name of the copyright holders not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission.  The copyright holders make no representations
+# about the suitability of this software for any purpose.  It is provided "as
+# is" without express or implied warranty.
+#
+# THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+# EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+
+AC_PREREQ([2.62])
 
 AC_INIT([libevdev],
-        [0.3],
-        [],
+        [0.5],
+        [https://bugs.freedesktop.org/enter_bug.cgi?product=libevdev],
         [libevdev],
         [])
 
+AC_CONFIG_SRCDIR([libevdev/libevdev.c])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_MACRO_DIR([m4])
 AC_USE_SYSTEM_EXTENSIONS
@@ -27,7 +48,7 @@ AC_SUBST(LIBEVDEV_LT_VERSION)
 AM_SILENT_RULES([yes])
 
 # Check for programs
-AC_PROG_CC
+AC_PROG_CC_C99
 
 # Initialize libtool
 LT_PREREQ([2.2])
@@ -61,7 +82,6 @@ if test "x$GCC" = "xyes"; then
                                -Wmissing-prototypes \
                                -fvisibility=hidden \
                                -pipe \
-                               -fno-common \
                                -fno-strict-aliasing \
                                -ffunction-sections \
                                -fdata-sections \
@@ -74,15 +94,18 @@ AC_SUBST([GCC_CFLAGS], $with_cflags)
 AC_PATH_PROG(DOXYGEN, [doxygen])
 if test "x$DOXYGEN" = "x"; then
        AC_MSG_WARN([doxygen not found - required for documentation])
+       have_doxygen="no"
+else
+       have_doxygen="yes"
 fi
-AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
+AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$have_doxygen" = "xyes"])
 
 AC_MSG_CHECKING([whether to build with gcov])
 AC_ARG_ENABLE([gcov],
              [AS_HELP_STRING([--enable-gcov],
-                             [Whether to enable coverage testing (default:enabled)])],
+                             [Whether to enable coverage testing (default:disabled)])],
              [],
-             [enable_gcov=yes],
+             [enable_gcov=no],
              )
 AS_IF([test "x$enable_gcov" != "xno"],
       [
@@ -92,6 +115,10 @@ AS_IF([test "x$enable_gcov" != "xno"],
        ],
 )
 
+AM_PATH_PYTHON([2.6])
+AS_IF([$($PYTHON -c "import argparse")], [:],
+       AC_MSG_ERROR([python argparse module is missing]))
+
 AM_CONDITIONAL([GCOV_ENABLED], [test "x$enable_gcov" != "xno"])
 AC_SUBST([GCOV_CFLAGS])
 AC_SUBST([GCOV_LDFLAGS])
@@ -105,3 +132,9 @@ AC_CONFIG_FILES([Makefile
                 test/Makefile
                 libevdev.pc])
 AC_OUTPUT
+
+AC_MSG_RESULT([
+              Build documentation      ${have_doxygen}
+              Build unit-tests         ${HAVE_CHECK}
+              Enable profiling         ${enable_gcov}
+              ])