antd-fcgi-plugin/configure.ac
DanyLE 6a82a98aa5
Some checks failed
gitea-sync/antd-fcgi-plugin/pipeline/head There was a failure building this commit
feat: update code to support antd 2.0.0 new plugin interface
2024-03-13 18:13:11 +01:00

69 lines
1.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# initialise autoconf and set up some basic information about the program were packaging
AC_INIT([fcgi], [0.2.0], [xsang.le@gmail.com])
# Were going to use automake for this project
# [subdir-objects] if needed
AM_INIT_AUTOMAKE()
# dependencies
# C compiler
AC_PROG_CC
# libtool for linking
AC_PROG_LIBTOOL
# check for lib antd
AC_CHECK_HEADER([antd/plugin.h],[
has_antd=yes
# check if the library exists
],[
AC_MSG_ERROR([Unable to find antd, please install it first])
])
AC_CHECK_LIB([antd],[antd_send],[],[
if test "$has_antd" = "yes"; then
AC_MSG_ERROR([Unable to find antd shared library, please install it first])
fi
])
# check for pthread
AC_CHECK_LIB([pthread], [pthread_create], [], [
AC_MSG_ERROR([libpthread is not found])])
AC_DEFINE([_GNU_SOURCE], [1],[Use GNU source])
# AC_CANONICAL_HOST is needed to access the 'host_os' variable
AC_CANONICAL_HOST
build_linux=no
build_windows=no
build_mac=no
# Detect the target system
case "${host_os}" in
linux*)
AC_DEFINE([LINUX], [1],[Linux system])
build_linux=yes
;;
darwin*)
build_mac=yes
AC_DEFINE([MACOS], [1],[MacOS system])
;;
*)
AC_MSG_ERROR(["OS $host_os is not supported"])
;;
esac
# case for window:
# cygwin*|mingw*)
# build_windows=yes
# ;;
# Pass the conditionals to automake
AM_CONDITIONAL([LINUX], [test "$build_linux" = "yes"])
AM_CONDITIONAL([WINDOWS], [test "$build_windows" = "yes"])
AM_CONDITIONAL([OSX], [test "$build_mac" = "yes"])
# find a file called Makefile.in, substitute placeholders
# like @PACKAGE_VERSION@ with values like 0.1.0a,
# and write the results to Makefile.
AC_CONFIG_FILES([Makefile])
# output the script:
AC_OUTPUT