|
Packit |
b040ce |
# configure.ac for libbytesize
|
|
Packit |
b040ce |
|
|
Packit |
b040ce |
AC_INIT([libbytesize], [1.4], [vpodzime@redhat.com])
|
|
Packit |
b040ce |
|
|
Packit |
b040ce |
# Disable building static libraries.
|
|
Packit |
b040ce |
# This needs to be set before initializing automake
|
|
Packit |
b040ce |
AC_DISABLE_STATIC
|
|
Packit |
b040ce |
|
|
Packit |
b040ce |
AM_INIT_AUTOMAKE([foreign -Wall -Werror -Wno-syntax -Wno-portability])
|
|
Packit |
b040ce |
AC_CONFIG_MACRO_DIR([m4])
|
|
Packit |
b040ce |
|
|
Packit |
b040ce |
# Check for the gettext programs
|
|
Packit |
b040ce |
AC_PATH_PROG([XGETTEXT], [xgettext])
|
|
Packit |
b040ce |
AC_PATH_PROG([MSGFMT], [msgfmt])
|
|
Packit |
b040ce |
AC_PATH_PROG([MSGMERGE], [msgmerge])
|
|
Packit |
b040ce |
AC_PATH_PROG([MSGCAT], [msgcat])
|
|
Packit |
b040ce |
AS_IF([test -z "$XGETTEXT" -o -z "$MSGFMT" -o -z "$MSGMERGE" -o -z "$MSGCAT"],
|
|
Packit |
b040ce |
[AC_MSG_FAILURE([gettext not found])])
|
|
Packit |
b040ce |
|
|
Packit |
b040ce |
# Define this so gettext.h works without requiring the whole gettext macro
|
|
Packit |
b040ce |
CFLAGS="${CFLAGS} -DENABLE_NLS"
|
|
Packit |
b040ce |
|
|
Packit |
b040ce |
AM_PATH_PYTHON
|
|
Packit |
b040ce |
|
|
Packit |
b040ce |
AM_PROG_AR
|
|
Packit |
b040ce |
AC_PROG_CC
|
|
Packit |
b040ce |
|
|
Packit |
b040ce |
LT_INIT
|
|
Packit |
b040ce |
|
|
Packit |
b040ce |
AC_CONFIG_FILES([Makefile src/Makefile src/bytesize.pc \
|
|
Packit |
b040ce |
po/Makefile \
|
|
Packit |
b040ce |
src/python/Makefile \
|
|
Packit |
b040ce |
dist/Makefile dist/libbytesize.spec \
|
|
Packit |
b040ce |
docs/Makefile docs/libbytesize-docs.xml \
|
|
Packit |
b040ce |
tests/Makefile])
|
|
Packit |
b040ce |
|
|
Packit |
b040ce |
AC_CONFIG_FILES([tests/libbytesize_unittest.sh],
|
|
Packit |
b040ce |
[chmod +x tests/libbytesize_unittest.sh])
|
|
Packit |
b040ce |
|
|
Packit |
b040ce |
AC_CONFIG_FILES([tests/canary_tests.sh],
|
|
Packit |
b040ce |
[chmod +x tests/canary_tests.sh])
|
|
Packit |
b040ce |
|
|
Packit |
b040ce |
|
|
Packit |
b040ce |
LIBBYTESIZE_PKG_CHECK_MODULES([PCRE], [libpcre >= 8.32])
|
|
Packit |
b040ce |
|
|
Packit |
b040ce |
AC_CHECK_LIB(gmp, __gmpz_init)
|
|
Packit |
b040ce |
|
|
Packit |
b040ce |
AC_CHECK_HEADERS([langinfo.h gmp.h mpfr.h stdint.h stdbool.h stdarg.h string.h stdio.h ctype.h],
|
|
Packit |
b040ce |
[],
|
|
Packit |
b040ce |
[LIBBYTESIZE_SOFT_FAILURE([Header file $ac_header not found.])],
|
|
Packit |
b040ce |
[])
|
|
Packit |
b040ce |
|
|
Packit |
b040ce |
AC_ARG_WITH([python3],
|
|
Packit |
b040ce |
AS_HELP_STRING([--with-python3], [support python3 @<:@default=check@:>@]),
|
|
Packit |
b040ce |
[],
|
|
Packit |
b040ce |
[with_python3=check])
|
|
Packit |
b040ce |
|
|
Packit |
b040ce |
AC_SUBST(WITH_PYTHON3, 0)
|
|
Packit |
b040ce |
if test "x$with_python3" != "xno"; then
|
|
Packit |
b040ce |
AC_PATH_PROG([python3], [python3], [no])
|
|
Packit |
b040ce |
AS_IF([test "x$python3" == "xno"],
|
|
Packit |
b040ce |
[if test "x$with_python3" = "xyes"; then
|
|
Packit |
b040ce |
LIBBYTESIZE_SOFT_FAILURE([Python3 support requested, but python3 is not available])
|
|
Packit |
b040ce |
fi],
|
|
Packit |
b040ce |
[AC_SUBST(WITH_PYTHON3, 1)])
|
|
Packit |
b040ce |
fi
|
|
Packit |
b040ce |
AM_CONDITIONAL(WITH_PYTHON3, test "x$with_python3" != "xno" -a "x$python3" != "xno")
|
|
Packit |
b040ce |
|
|
Packit |
b040ce |
|
|
Packit |
b040ce |
AC_ARG_WITH([gtk-doc],
|
|
Packit |
b040ce |
AS_HELP_STRING([--with-gtk-doc], [generate documentation with gtk-doc @<:@default=check@:>@]),
|
|
Packit |
b040ce |
[],
|
|
Packit |
b040ce |
[with_gtk_doc=check])
|
|
Packit |
b040ce |
|
|
Packit |
b040ce |
AC_SUBST(WITH_GTK_DOC, 0)
|
|
Packit |
b040ce |
if test "x$with_gtk_doc" != "xno"; then
|
|
Packit |
b040ce |
AC_PATH_PROG([gtkdoc_scan], [gtkdoc-scan], [no])
|
|
Packit |
b040ce |
AS_IF([test "x$gtkdoc_scan" == "xno"],
|
|
Packit |
b040ce |
[if test "x$with_gtk_doc" = "xyes"; then
|
|
Packit |
b040ce |
LIBBYTESIZE_SOFT_FAILURE([Building documentation with gtk-doc requested, but not available])
|
|
Packit |
b040ce |
fi],
|
|
Packit |
b040ce |
[AC_SUBST(WITH_GTK_DOC, 1)])
|
|
Packit |
b040ce |
fi
|
|
Packit |
b040ce |
AM_CONDITIONAL(WITH_GTK_DOC, test "x$with_gtk_doc" != "xno" -a "x$gtkdoc_scan" != "xno")
|
|
Packit |
b040ce |
|
|
Packit |
b040ce |
AC_OUTPUT
|
|
Packit |
b040ce |
LIBBYTESIZE_FAILURES
|