From a909eb4a229ebbea2d60717e748df3f0a2f69cc4 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 19 Sep 2013 09:50:49 -0700 Subject: Add the generator and build infrastructure. Not actually working yet, but it's a snapshot to start from. --- configure.ac | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 configure.ac (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..f2f137f --- /dev/null +++ b/configure.ac @@ -0,0 +1,75 @@ +# Copyright © 2013 Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. + +# Initialize Autoconf +AC_PREREQ([2.60]) +AC_INIT([libepoxy], + [1.0], + [https://people.freedesktop.org/~anholt/libepoxy], + [libepoxy]) +AC_CONFIG_SRCDIR([Makefile.am]) +AC_CONFIG_HEADERS([config.h]) + +# Initialize Automake +AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects]) + +# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen. + Hint: either install from source, git://anongit.freedesktop.org/xorg/util/macros or, + depending on you distribution, try package 'xutils-dev' or 'xorg-x11-util-macros'])]) + +XORG_MACROS_VERSION(1.8) +XORG_DEFAULT_OPTIONS + +AC_CHECK_PROGS([PYTHON], [python3 python2 python]) + +# Initialize libtool +AC_DISABLE_STATIC +AC_PROG_LIBTOOL +AC_SYS_LARGEFILE + +if test "x$GCC" = xyes; then + save_CFLAGS="$CFLAGS" + AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden]) + VISIBILITY_CFLAGS="-fvisibility=hidden" + CFLAGS="$CFLAGS $VISIBILITY_CFLAGS" + AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]), + [VISIBILITY_CFLAGS=""; AC_MSG_RESULT([no])]); + + # Restore CFLAGS; VISIBILITY_CFLAGS are added to it where needed. + CFLAGS=$save_CFLAGS +fi + +AC_SUBST([VISIBILITY_CFLAGS]) + +PKG_CHECK_MODULES(X11, [x11], [x11=yes], [x11=no]) +AM_CONDITIONAL(HAVE_X11, test x$x11 = xyes) + + +AC_CONFIG_FILES([ + epoxy.pc + Makefile + src/Makefile +]) +AC_OUTPUT + +echo " PYTHON: $PYTHON" -- cgit v1.2.1