antd-tunnel-publishers/configure.ac

100 lines
2.4 KiB
Plaintext
Raw Permalink Normal View History

2020-08-03 19:51:58 +02:00
# initialise autoconf and set up some basic information about the program were packaging
AC_INIT([antd-publishers], [0.1.2a], [xsang.le@gmail.com])
2020-08-03 19:51:58 +02:00
# Were going to use automake for this project
# [subdir-objects] if needed
2020-08-09 13:19:59 +02:00
AM_INIT_AUTOMAKE([subdir-objects])
2020-08-03 19:51:58 +02:00
# dependencies
# C compiler
AC_PROG_CC
# libtool for linking
AC_PROG_LIBTOOL
AC_DEFINE([_GNU_SOURCE], [1],[Use GNU source])
2020-08-06 23:17:46 +02:00
# AC_CANONICAL_HOST is needed to access the 'host_os' variable
has_antd=no
# 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
])
2020-08-03 19:51:58 +02:00
2020-12-27 19:35:15 +01:00
cam_enable=no
# check videodev
AC_CHECK_HEADER([linux/videodev2.h],[
# check libjpeg
AC_CHECK_HEADER([jpeglib.h],[
# check libjpeg
AC_CHECK_LIB([jpeg],[jpeg_CreateCompress],[
cam_enable=yes
],[])
],[])
],[])
AC_CHECK_LIB([jpeg],[jpeg_CreateCompress],[], [])
2020-08-03 19:51:58 +02:00
# debug option
AC_ARG_ENABLE([debug],
[ --enable-debug Turn on debugging],
[case "${enableval}" in
yes) AC_DEFINE([DEBUG], [1],[Enable debug]) ;;
no) ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
esac],[debug=false])
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"])
2020-12-27 19:35:15 +01:00
AM_CONDITIONAL([ENABLE_CAM], [test "$cam_enable" = "yes"])
2020-08-03 19:51:58 +02:00
# find a file called Makefile.in, substitute placeholders
# like @PACKAGE_VERSION@ with values like 0.1.0a,
# and write the results to Makefile.
2020-12-27 19:35:15 +01:00
AC_CONFIG_FILES([
Makefile
vterm/Makefile
wfifo/Makefile
2021-09-17 17:36:51 +02:00
syslog/Makefile
broadcast/Makefile
2020-12-27 19:35:15 +01:00
])
if test x"${cam_enable}" == x"yes" ; then
AC_CONFIG_FILES([v4l2cam/Makefile])
fi
2020-08-03 19:51:58 +02:00
# output the script:
AC_OUTPUT