53 lines
1.6 KiB
Plaintext
53 lines
1.6 KiB
Plaintext
# -*- Autoconf -*-
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
AC_PREREQ([2.69])
|
|
AC_INIT([libpvz], [0.3.2], [CasperVector@gmail.com], [libpvz],
|
|
[https://gitea.com/p/CasperVector/libpvz])
|
|
AC_CONFIG_SRCDIR([config.h.in])
|
|
AC_CONFIG_HEADERS([config.h])
|
|
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
|
|
|
AC_ARG_ENABLE([python], AS_HELP_STRING([--disable-python],
|
|
[disable the pyvz library (default: enabled)]
|
|
), do_pyvz=$enableval, do_pyvz="yes")
|
|
|
|
AM_CONDITIONAL(DO_PYVZ, test x"$do_pyvz" = xyes)
|
|
|
|
# Checks for programs.
|
|
AC_PROG_CC
|
|
AC_PROG_LIBTOOL
|
|
if test "x$do_pyvz" != "xno"; then
|
|
AC_PROG_INSTALL
|
|
AC_PROG_MKDIR_P
|
|
: # in case both above expand to whitespaces.
|
|
fi
|
|
|
|
# Checks for libraries.
|
|
AC_CHECK_LIB([xcb], [xcb_connect], [],
|
|
[AC_MSG_ERROR([X protocol C-language Binding libraries not found])])
|
|
|
|
# Checks for header files.
|
|
AC_CHECK_HEADERS([errno.h inttypes.h stdarg.h stdio.h stdlib.h string.h stdint.h unistd.h], ,
|
|
AC_MSG_ERROR[Required C stdlib header missing])
|
|
AC_CHECK_HEADERS([fcntl.h stddef.h sys/stat.h sys/types.h], ,
|
|
AC_MSG_ERROR[Required POSIX C header missing])
|
|
AC_CHECK_HEADERS([sys/ptrace.h sys/wait.h], ,
|
|
AC_MSG_ERROR[Required Linux C header missing])
|
|
AC_CHECK_HEADERS([xcb/xcb.h xcb/xproto.h], ,
|
|
AC_MSG_ERROR[Required X protocol C-language Binding header missing])
|
|
|
|
# Checks for Python binary.
|
|
AC_CHECK_PROG([has_python], [python], [yes], [no])
|
|
if test "x$has_python" = "x:"; then
|
|
if test "x$do_pyvz" = "xno"; then
|
|
AC_MSG_WARN([python not found, code generators unusable])
|
|
else
|
|
AC_MSG_ERROR([python is needed to build pyvz])
|
|
fi
|
|
fi
|
|
|
|
AC_CONFIG_FILES([Makefile])
|
|
AC_OUTPUT
|
|
|