63 lines
1.4 KiB
Text
63 lines
1.4 KiB
Text
AC_PREREQ([2.69])
|
|
AC_INIT([libft_ssl], [0.0.1], [])
|
|
AC_CONFIG_AUX_DIR([build-aux])
|
|
AC_CONFIG_MACRO_DIRS([m4])
|
|
AM_INIT_AUTOMAKE([foreign -Wall -Werror subdir-objects])
|
|
AC_PROG_CC
|
|
AM_PROG_AR
|
|
|
|
LT_PREREQ([2.2])
|
|
LT_INIT
|
|
|
|
# --enable-debug
|
|
AC_ARG_ENABLE(
|
|
[debug],
|
|
[AS_HELP_STRING([--enable-debug], [Enable debug build: -g -O0 (default: no)])],
|
|
[enable_debug=$enableval],
|
|
[enable_debug=no]
|
|
)
|
|
AM_CONDITIONAL([ENABLE_DEBUG], [test "x$enable_debug" = "xyes"])
|
|
|
|
AS_IF([test "x$enable_debug" = "xyes"],
|
|
[CFLAGS="-g -O0"],
|
|
[CFLAGS="-O2"],
|
|
)
|
|
|
|
STRICT_CFLAGS="-Wall -Wextra -Werror -pipe -Wpedantic -Wconversion -Wshadow -Wvla"
|
|
AC_SUBST([STRICT_CFLAGS])
|
|
|
|
|
|
# --enable-doc
|
|
AC_ARG_ENABLE(
|
|
[doc],
|
|
[AS_HELP_STRING([--enable-doc], [Build PDF documentation with pdflatex (default: no)])],
|
|
[enable_doc=$enableval],
|
|
[enable_doc=no]
|
|
)
|
|
|
|
AS_IF([test "x$enable_doc" = "xyes"], [
|
|
AC_CHECK_PROG([PDFLATEX], [pdflatex], [pdflatex])
|
|
AS_IF([test -z "$PDFLATEX"],
|
|
[AC_MSG_ERROR([--enable-doc requires pdflatex but it was not found])])
|
|
])
|
|
AM_CONDITIONAL([ENABLE_DOC], [test "x$enable_doc" = "xyes"])
|
|
|
|
AC_CONFIG_FILES([
|
|
Makefile
|
|
src/Makefile
|
|
doc/Makefile
|
|
libft_ssl.pc
|
|
])
|
|
|
|
AC_OUTPUT
|
|
|
|
AC_MSG_NOTICE([
|
|
|
|
libft_ssl $VERSION
|
|
---------------
|
|
prefix : $prefix
|
|
CC : $CC
|
|
CFLAGS : $STRICT_CFLAGS $CFLAGS
|
|
debug : $enable_debug
|
|
doc : $enable_doc
|
|
])
|