You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
2.3 KiB

  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ([2.65])
  4. AC_INIT([pulseaudio-module-xrdp], [0.1], [xrdp-devel@googlegroups.com])
  5. # specify module-config.h so we don't collide with pulseaudio's config.h
  6. AC_CONFIG_HEADERS([module-config.h])
  7. AC_CONFIG_SRCDIR([src])
  8. AC_CONFIG_AUX_DIR([build-aux])
  9. AC_CONFIG_MACRO_DIRS([m4])
  10. AM_PROG_AR
  11. AM_INIT_AUTOMAKE([-Wall foreign silent-rules])
  12. AM_SILENT_RULES([yes])
  13. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  14. # get system's pulseaudio version
  15. m4_define([pa_major], [`echo $(pulseaudio --version) | cut -d' ' -f2 | cut -d. -f1`])
  16. m4_define([pa_minor], [`echo $(pulseaudio --version) | cut -d' ' -f2 | cut -d. -f2`])
  17. AC_SUBST([PA_MAJOR], [pa_major])
  18. AC_SUBST([PA_MINOR], [pa_minor])
  19. AC_SUBST([PA_MAJORMINOR], [pa_major].[pa_minor])
  20. # Build shared libraries
  21. LT_INIT([shared disable-static])
  22. # Checks for programs.
  23. AC_PROG_CXX
  24. AC_PROG_AWK
  25. AC_PROG_CC
  26. AC_PROG_CPP
  27. AC_PROG_INSTALL
  28. AC_PROG_LN_S
  29. AC_PROG_MAKE_SET
  30. # Checks for libraries.
  31. PKG_CHECK_MODULES([XRDP], [xrdp >= 0.9.0])
  32. AC_SUBST(XRDP_CFLAGS)
  33. m4_define([PULSE_MSG], [pulseaudio source code directory not specified.
  34. please download the required sources from:
  35. https://freedesktop.org/software/pulseaudio/releases/
  36. and run ./configure PULSE_DIR=<path to sources>])
  37. AC_ARG_VAR([PULSE_DIR], [pulseaudio source code directory])
  38. AS_IF([test x"$PULSE_DIR" == x""],
  39. AC_MSG_ERROR([m4_text_box([PULSE_MSG])])
  40. )
  41. # change default prefix so modules will be installed where system pulseaudio is
  42. AC_PREFIX_DEFAULT(["/usr"])
  43. # copied from pulseaudio
  44. AC_ARG_WITH(
  45. [module-dir],
  46. [AS_HELP_STRING([--with-module-dir],
  47. [Directory where to install the modules to (defaults to ${libdir}/pulse-${PA_MAJORMINOR}/modules)])],
  48. [modlibexecdir=$withval], [modlibexecdir="${libdir}/pulse-${PA_MAJORMINOR}/modules"])
  49. AC_SUBST(modlibexecdir)
  50. # Checks for header files.
  51. AC_CHECK_HEADERS([fcntl.h limits.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
  52. # Checks for typedefs, structures, and compiler characteristics.
  53. AC_TYPE_INT64_T
  54. AC_TYPE_SIZE_T
  55. AC_TYPE_UINT32_T
  56. # Checks for library functions.
  57. AC_CHECK_FUNCS([memset socket])
  58. AC_CONFIG_FILES([Makefile
  59. src/Makefile])
  60. AC_OUTPUT