2008-08-03 11:30:03 +04:00
|
|
|
# Process this file with autoconf to produce a configure script
|
|
|
|
|
|
|
|
AC_PREREQ(2.59)
|
2014-03-02 11:20:08 +04:00
|
|
|
AC_INIT([xrdp], [0.9.0], [xrdp-devel@lists.sourceforge.net])
|
2013-06-12 12:08:42 +04:00
|
|
|
AC_CONFIG_HEADERS(config_ac.h:config_ac-h.in)
|
2008-08-03 11:30:03 +04:00
|
|
|
AM_INIT_AUTOMAKE([1.6 foreign])
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_C_CONST
|
|
|
|
AC_PROG_LIBTOOL
|
2014-10-28 01:44:17 +03:00
|
|
|
PKG_PROG_PKG_CONFIG
|
2015-03-12 14:22:35 +03:00
|
|
|
|
|
|
|
case $host_os in
|
|
|
|
*linux*)
|
|
|
|
linux=yes
|
|
|
|
;;
|
|
|
|
*freebsd*)
|
|
|
|
freebsd=yes
|
|
|
|
;;
|
|
|
|
*netbsd*)
|
|
|
|
netbsd=yes
|
|
|
|
;;
|
|
|
|
*openbsd*)
|
|
|
|
openbsd=yes
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
AM_CONDITIONAL(LINUX, [test "x$linux" = xyes])
|
|
|
|
AM_CONDITIONAL(FREEBSD, [test "x$freebsd" = xyes])
|
|
|
|
AM_CONDITIONAL(OPENBSD, [test "x$openbsd" = xyes])
|
|
|
|
AM_CONDITIONAL(NETBSD, [test "x$netbsd" = xyes])
|
|
|
|
|
2012-05-26 21:15:45 +04:00
|
|
|
AC_ARG_WITH([systemdsystemunitdir],
|
|
|
|
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
|
|
|
|
[], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
|
|
|
|
if test "x$with_systemdsystemunitdir" != xno; then
|
|
|
|
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
|
|
|
|
|
2014-10-28 01:32:56 +03:00
|
|
|
AC_ARG_ENABLE(pam, AS_HELP_STRING([--disable-pam],
|
|
|
|
[Build PAM support (default: yes)]),
|
|
|
|
[], [enable_pam=yes])
|
2008-08-09 12:35:05 +04:00
|
|
|
AC_ARG_ENABLE(nopam, AS_HELP_STRING([--enable-nopam],
|
2014-10-28 01:32:56 +03:00
|
|
|
[Build no PAM support (default: no, deprecated)]),
|
|
|
|
[
|
|
|
|
if test "x$enable_nopam" = "xyes"
|
|
|
|
then
|
|
|
|
enable_pam=no
|
|
|
|
AC_MSG_WARN([--enable-nopam option is deprecated. Please use --disable-pam instead.])
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
AM_CONDITIONAL(SESMAN_NOPAM, [test x$enable_pam != xyes])
|
2015-03-10 07:36:52 +03:00
|
|
|
AC_ARG_ENABLE(ipv6, AS_HELP_STRING([--enable-ipv6],
|
|
|
|
[Build IPv6 support (default: no, experimental)]),
|
|
|
|
[], [enable_ipv6=no])
|
2008-08-09 12:35:05 +04:00
|
|
|
AC_ARG_ENABLE(kerberos, AS_HELP_STRING([--enable-kerberos],
|
|
|
|
[Build kerberos support (default: no)]),
|
2014-10-28 01:22:22 +03:00
|
|
|
[], [enable_kerberos=no])
|
2014-11-21 16:22:15 +03:00
|
|
|
AC_ARG_ENABLE(bsd, AS_HELP_STRING([--enable-bsd],
|
|
|
|
[Build BSD auth support (default: no)]),
|
|
|
|
[bsd=true], [bsd=false])
|
|
|
|
AM_CONDITIONAL(SESMAN_BSD, [test x$bsd = xtrue])
|
2014-10-28 01:22:22 +03:00
|
|
|
AM_CONDITIONAL(SESMAN_KERBEROS, [test x$enable_kerberos = xyes])
|
2008-08-09 12:35:05 +04:00
|
|
|
AC_ARG_ENABLE(pamuserpass, AS_HELP_STRING([--enable-pamuserpass],
|
|
|
|
[Build pam userpass support (default: no)]),
|
2014-10-28 01:22:22 +03:00
|
|
|
[], [enable_pamuserpass=no])
|
|
|
|
AM_CONDITIONAL(SESMAN_PAMUSERPASS, [test x$enable_pamuserpass = xyes])
|
2010-03-18 01:06:50 +03:00
|
|
|
AC_ARG_ENABLE(xrdpdebug, AS_HELP_STRING([--enable-xrdpdebug],
|
|
|
|
[Build debug (default: no)]),
|
2014-10-28 01:22:22 +03:00
|
|
|
[], [enable_xrdpdebug=no])
|
|
|
|
AM_CONDITIONAL(XRDP_DEBUG, [test x$enable_xrdpdebug = xyes])
|
2013-05-03 13:07:02 +04:00
|
|
|
AC_ARG_ENABLE(neutrinordp, AS_HELP_STRING([--enable-neutrinordp],
|
|
|
|
[Build neutrinordp module (default: no)]),
|
2014-10-28 01:22:22 +03:00
|
|
|
[], [enable_neutrinordp=no])
|
|
|
|
AM_CONDITIONAL(XRDP_NEUTRINORDP, [test x$enable_neutrinordp = xyes])
|
2012-04-08 09:41:46 +04:00
|
|
|
AC_ARG_ENABLE(jpeg, AS_HELP_STRING([--enable-jpeg],
|
|
|
|
[Build jpeg module (default: no)]),
|
2014-10-28 01:22:22 +03:00
|
|
|
[], [enable_jpeg=no])
|
|
|
|
AM_CONDITIONAL(XRDP_JPEG, [test x$enable_jpeg = xyes])
|
2013-09-16 22:14:48 +04:00
|
|
|
AC_ARG_ENABLE(tjpeg, AS_HELP_STRING([--enable-tjpeg],
|
2014-03-25 04:55:04 +04:00
|
|
|
[Build turbo jpeg module (default: no)]),
|
2014-10-28 01:22:22 +03:00
|
|
|
[], [enable_tjpeg=no])
|
|
|
|
AM_CONDITIONAL(XRDP_TJPEG, [test x$enable_tjpeg = xyes])
|
2012-11-03 10:10:36 +04:00
|
|
|
AC_ARG_ENABLE(fuse, AS_HELP_STRING([--enable-fuse],
|
|
|
|
[Build fuse(clipboard file / drive redir) (default: no)]),
|
2014-10-28 01:22:22 +03:00
|
|
|
[], [enable_fuse=no])
|
|
|
|
AM_CONDITIONAL(XRDP_FUSE, [test x$enable_fuse = xyes])
|
2012-11-11 05:53:08 +04:00
|
|
|
AC_ARG_ENABLE(xrdpvr, AS_HELP_STRING([--enable-xrdpvr],
|
|
|
|
[Build xrdpvr module (default: no)]),
|
2014-10-28 01:22:22 +03:00
|
|
|
[], [enable_xrdpvr=no])
|
|
|
|
AM_CONDITIONAL(XRDP_XRDPVR, [test x$enable_xrdpvr = xyes])
|
2014-07-11 07:14:40 +04:00
|
|
|
AC_ARG_ENABLE(rfxcodec, AS_HELP_STRING([--enable-rfxcodec],
|
|
|
|
[Build using librfxcodec (default: no)]),
|
2014-10-28 01:22:22 +03:00
|
|
|
[], [enable_rfxcodec=no])
|
|
|
|
AM_CONDITIONAL(XRDP_RFXCODEC, [test x$enable_rfxcodec = xyes])
|
2015-01-10 10:31:28 +03:00
|
|
|
AC_ARG_ENABLE(opus, AS_HELP_STRING([--enable-opus],
|
|
|
|
[Build opus(audio codec) (default: no)]),
|
|
|
|
[], [enable_opus=no])
|
|
|
|
AM_CONDITIONAL(XRDP_OPUS, [test x$enable_opus = xyes])
|
2009-10-09 22:20:56 +04:00
|
|
|
|
2012-04-06 02:40:46 +04:00
|
|
|
AM_CONDITIONAL(GOT_PREFIX, test "x${prefix}" != "xNONE"])
|
|
|
|
|
2009-10-09 22:20:56 +04:00
|
|
|
# checking for openssl
|
2009-10-15 23:22:57 +04:00
|
|
|
AC_CHECK_HEADER([openssl/rc4.h], [],
|
|
|
|
[AC_MSG_ERROR([please install libssl-dev or openssl-devel])],
|
|
|
|
[#include <stdlib.h>])
|
2009-10-09 22:20:56 +04:00
|
|
|
|
2015-03-10 12:01:20 +03:00
|
|
|
# checking for pam variation
|
|
|
|
# Linux-PAM is used in Linux systems
|
|
|
|
# OpenPAM is used by FreeBSD, NetBSD, DragonFly BSD and OS X
|
|
|
|
# OpenBSD uses BSD Authentication rather than both PAMs
|
|
|
|
AC_CHECK_HEADER([security/_pam_types.h],
|
|
|
|
[AC_DEFINE([HAVE__PAM_TYPES_H], 1, [Using Linux-PAM], [])])
|
|
|
|
AC_CHECK_HEADER([security/pam_constants.h],
|
|
|
|
[AC_DEFINE([HAVE_PAM_CONSTANTS_H], 1, [Using OpenPAM], [])])
|
|
|
|
|
2009-10-09 22:20:56 +04:00
|
|
|
# checking if pam should be autodetected.
|
2014-10-28 01:32:56 +03:00
|
|
|
if test "x$enable_pam" = "xyes"
|
2009-10-09 22:20:56 +04:00
|
|
|
then
|
2014-10-28 01:22:22 +03:00
|
|
|
if test "x$enable_kerberos" != "xyes"
|
2009-10-09 22:20:56 +04:00
|
|
|
then
|
2014-11-21 16:22:15 +03:00
|
|
|
if test -z "$enable_bsd"
|
|
|
|
then
|
|
|
|
AC_CHECK_HEADER([security/pam_appl.h], [],
|
|
|
|
[AC_MSG_ERROR([please install libpam0g-dev or pam-devel])])
|
|
|
|
fi
|
2009-10-09 22:20:56 +04:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-03-10 07:36:52 +03:00
|
|
|
if test "x$enable_ipv6" = "xyes"
|
|
|
|
then
|
|
|
|
AC_DEFINE([XRDP_ENABLE_IPV6],1,[Enable IPv6])
|
|
|
|
fi
|
|
|
|
|
2013-04-03 11:54:52 +04:00
|
|
|
AC_CHECK_MEMBER([struct in6_addr.s6_addr],
|
|
|
|
[],
|
|
|
|
[AC_DEFINE(NO_ARPA_INET_H_IP6, 1, [for IPv6])],
|
|
|
|
[#include <arpa/inet.h>])
|
|
|
|
|
2014-11-21 17:00:01 +03:00
|
|
|
if test "x$enable_pam" != "xyes" || test "x$bsd" = "xtrue"
|
2013-02-07 14:08:28 +04:00
|
|
|
then
|
|
|
|
AC_DEFINE([USE_NOPAM],1,[Disable PAM])
|
|
|
|
fi
|
|
|
|
|
2013-05-03 13:07:02 +04:00
|
|
|
AS_IF( [test "x$enable_neutrinordp" = "xyes"] , [PKG_CHECK_MODULES(FREERDP, freerdp >= 1.0.0)] )
|
|
|
|
|
2012-08-02 21:48:59 +04:00
|
|
|
# checking for libjpeg
|
2014-10-28 01:22:22 +03:00
|
|
|
if test "x$enable_jpeg" = "xyes"
|
2012-04-08 09:41:46 +04:00
|
|
|
then
|
|
|
|
AC_CHECK_HEADER([jpeglib.h], [],
|
|
|
|
[AC_MSG_ERROR([please install libjpeg-dev or libjpeg-devel])])
|
|
|
|
fi
|
|
|
|
|
2014-10-28 01:22:22 +03:00
|
|
|
if test "x$enable_xrdpdebug" = "xyes"
|
2013-10-24 22:21:13 +04:00
|
|
|
then
|
|
|
|
CFLAGS="-g -O0"
|
|
|
|
fi
|
|
|
|
|
2012-11-03 10:10:36 +04:00
|
|
|
# checking for fuse
|
2014-10-28 01:22:22 +03:00
|
|
|
if test "x$enable_fuse" = "xyes"
|
2012-11-03 10:10:36 +04:00
|
|
|
then
|
2015-03-18 05:40:15 +03:00
|
|
|
PKG_CHECK_MODULES([FUSE], [fuse >= 2.6], [],
|
|
|
|
[AC_MSG_ERROR([please install libfuse-dev or fuse-devel])])
|
2012-11-03 10:10:36 +04:00
|
|
|
fi
|
|
|
|
|
2015-01-10 10:31:28 +03:00
|
|
|
# checking for opus
|
|
|
|
if test "x$enable_opus" = "xyes"
|
|
|
|
then
|
|
|
|
AC_CHECK_HEADER([opus/opus.h], [],
|
|
|
|
[AC_MSG_ERROR([please install libopus-dev or opus-devel])])
|
|
|
|
fi
|
|
|
|
|
2014-03-24 04:45:40 +04:00
|
|
|
# checking for TurboJPEG
|
2014-10-28 01:22:22 +03:00
|
|
|
if test "x$enable_tjpeg" = "xyes"
|
2014-03-24 23:03:17 +04:00
|
|
|
then
|
2014-03-24 04:45:40 +04:00
|
|
|
if test ! -z "$TURBOJPEG_PATH"
|
|
|
|
then
|
|
|
|
# env var TURBOJPEG_PATH has been defined, use that
|
|
|
|
AC_CHECK_HEADER([$TURBOJPEG_PATH/include/turbojpeg.h], [],
|
|
|
|
[AC_MSG_ERROR([could not find TurboJPEG in dir specified by env variable TURBOJPEG_PATH ($TURBOJPEG_PATH)])])
|
|
|
|
|
|
|
|
AC_SUBST(TurboJpegIncDir, ["-I$TURBOJPEG_PATH/include"])
|
|
|
|
AC_SUBST(TurboJpegLibDir, ["-L$TURBOJPEG_PATH/lib -Wl,-rpath -Wl,$TURBOJPEG_PATH/lib"])
|
|
|
|
elif test -e /opt/libjpeg-turbo/lib64
|
|
|
|
then
|
|
|
|
# TurboJPEG has been installed to /opt on a 64 bit m/c
|
|
|
|
AC_SUBST(TurboJpegIncDir, ["-I/opt/libjpeg-turbo/include"])
|
|
|
|
AC_SUBST(TurboJpegLibDir, ["-L/opt/libjpeg-turbo/lib64 -Wl,-rpath -Wl,/opt/libjpeg-turbo/lib64"])
|
|
|
|
elif test -e /opt/libjpeg-turbo/lib32
|
|
|
|
then
|
|
|
|
# TurboJPEG has been installed to /opt on a 32 bit m/c
|
|
|
|
AC_SUBST(TurboJpegIncDir, ["-I/opt/libjpeg-turbo/include"])
|
|
|
|
AC_SUBST(TurboJpegLibDir, ["-L/opt/libjpeg-turbo/lib32 -Wl,-rpath -Wl,/opt/libjpeg-turbo/lib32"])
|
|
|
|
else
|
|
|
|
# check in default location
|
|
|
|
AC_CHECK_HEADER([/usr/include/turbojpeg.h], [],
|
|
|
|
[AC_MSG_ERROR([please install TurboJPEG ])])
|
|
|
|
AC_SUBST(TurboJpegIncDir, [""])
|
|
|
|
AC_SUBST(TurboJpegLibDir, [""])
|
|
|
|
fi
|
2014-03-24 23:03:17 +04:00
|
|
|
fi
|
2014-03-24 04:45:40 +04:00
|
|
|
|
2009-10-11 09:09:42 +04:00
|
|
|
# checking for Xlib, Xfixes
|
2009-10-11 09:33:30 +04:00
|
|
|
AC_CHECK_HEADER([X11/Xlib.h], [],
|
2010-11-20 06:26:33 +03:00
|
|
|
[AC_MSG_ERROR([please install libx11-dev or libX11-devel])])
|
2009-10-11 09:33:30 +04:00
|
|
|
AC_CHECK_HEADER([X11/extensions/Xfixes.h], [],
|
2010-11-20 06:26:33 +03:00
|
|
|
[AC_MSG_ERROR([please install libx11-dev and libxfixes-dev or libXfixes-devel])],
|
2009-10-11 09:33:30 +04:00
|
|
|
[#include <X11/Xlib.h>])
|
2014-03-18 00:12:46 +04:00
|
|
|
AC_CHECK_HEADER([X11/extensions/Xrandr.h], [],
|
|
|
|
[AC_MSG_ERROR([please install libxrandr-dev or libXrandr-devel])],
|
|
|
|
[#include <X11/Xlib.h>])
|
2009-10-09 22:20:56 +04:00
|
|
|
|
2009-07-23 08:22:43 +04:00
|
|
|
libdir="${libdir}/xrdp";
|
2008-08-17 11:13:41 +04:00
|
|
|
if test "x${prefix}" = "xNONE" ; then
|
2009-05-19 08:23:49 +04:00
|
|
|
sysconfdir="/etc";
|
|
|
|
localstatedir="/var";
|
2008-08-12 09:19:59 +04:00
|
|
|
fi
|
2008-08-03 11:30:03 +04:00
|
|
|
AC_CONFIG_FILES([Makefile
|
|
|
|
common/Makefile
|
|
|
|
vnc/Makefile
|
|
|
|
rdp/Makefile
|
|
|
|
libxrdp/Makefile
|
|
|
|
xup/Makefile
|
|
|
|
mc/Makefile
|
2013-05-03 13:07:02 +04:00
|
|
|
neutrinordp/Makefile
|
2008-08-03 11:30:03 +04:00
|
|
|
xrdp/Makefile
|
|
|
|
sesman/Makefile
|
|
|
|
sesman/libscp/Makefile
|
2008-08-10 22:01:51 +04:00
|
|
|
sesman/tools/Makefile
|
2008-11-25 07:14:37 +03:00
|
|
|
sesman/sessvc/Makefile
|
2009-04-19 21:16:46 +04:00
|
|
|
sesman/chansrv/Makefile
|
2008-08-17 07:13:40 +04:00
|
|
|
keygen/Makefile
|
|
|
|
docs/Makefile
|
|
|
|
docs/man/Makefile
|
2008-08-17 11:13:41 +04:00
|
|
|
instfiles/Makefile
|
|
|
|
instfiles/pam.d/Makefile
|
2014-03-18 00:12:46 +04:00
|
|
|
instfiles/init.d/Makefile
|
2015-03-12 14:22:35 +03:00
|
|
|
instfiles/rc.d/Makefile
|
2014-03-18 00:12:46 +04:00
|
|
|
instfiles/default/Makefile
|
2014-05-20 11:50:41 +04:00
|
|
|
instfiles/pulse/Makefile
|
2009-08-12 06:49:53 +04:00
|
|
|
genkeymap/Makefile
|
2012-08-02 21:48:59 +04:00
|
|
|
xrdpapi/Makefile
|
2012-11-11 05:53:08 +04:00
|
|
|
xrdpvr/Makefile
|
2008-08-03 11:30:03 +04:00
|
|
|
])
|
|
|
|
# fontdump/Makefile
|
|
|
|
# xrdp/cursors/Makefile
|
|
|
|
# Xserver/hw/rdp/Makefile
|
|
|
|
AC_OUTPUT
|
2008-08-09 12:35:05 +04:00
|
|
|
|
|
|
|
# example of how to check for a struct in a header
|
|
|
|
#AC_CHECK_MEMBER([struct in6_addr.s6_addr],
|
|
|
|
# [],
|
|
|
|
# [AC_DEFINE(NO_ARPA_INET_H_IP6, 1, [for IPv6])],
|
|
|
|
# [#include <arpa/inet.h>])
|