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.

84 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.3], [xrdp-devel@googlegroups.com])
  5. # specify config_ac.h so we don't collide with pulseaudio's config.h
  6. AC_CONFIG_HEADERS([config_ac.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. PKG_PROG_PKG_CONFIG
  14. if test "x$PKG_CONFIG" = "x"; then
  15. AC_MSG_ERROR([pkg-config not found])
  16. fi
  17. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  18. # get system's pulseaudio version
  19. m4_define([pa_major], [`$PKG_CONFIG --modversion libpulse | cut -d. -f1`])
  20. m4_define([pa_minor], [`$PKG_CONFIG --modversion libpulse | cut -d. -f2`])
  21. # pulseaudio module/lib directory
  22. PA_LIBDIR=`$PKG_CONFIG --variable=libdir libpulse`
  23. PA_MODDIR=`$PKG_CONFIG --variable=modlibexecdir libpulse`
  24. PA_PREFIX=`$PKG_CONFIG --variable=prefix libpulse`
  25. AC_SUBST([PA_MAJOR], [pa_major])
  26. AC_SUBST([PA_MINOR], [pa_minor])
  27. AC_SUBST([PA_MAJORMINOR], [pa_major].[pa_minor])
  28. # Build shared libraries
  29. LT_INIT([shared disable-static])
  30. # Checks for programs.
  31. AC_PROG_CXX
  32. AC_PROG_AWK
  33. AC_PROG_CC
  34. AC_PROG_CPP
  35. AC_PROG_INSTALL
  36. AC_PROG_LN_S
  37. AC_PROG_MAKE_SET
  38. # Checks for libraries.
  39. PKG_CHECK_MODULES([LIBPULSE], [libpulse])
  40. m4_define([PULSE_MSG], [PULSE_DIR not specified. Follow the instructions in README.md.])
  41. AC_ARG_VAR([PULSE_DIR], [pulseaudio source code directory])
  42. AS_IF([test x"$PULSE_DIR" == x""],
  43. cat <<__MSG__
  44. m4_text_box([PULSE_MSG])
  45. __MSG__
  46. AC_MSG_ERROR([PULSE_DIR not specified])
  47. )
  48. # use the prefix as same as pulseaudio
  49. AC_PREFIX_PROGRAM(pulseaudio)
  50. # copied from pulseaudio
  51. AC_ARG_WITH(
  52. [module-dir],
  53. [AS_HELP_STRING([--with-module-dir],
  54. [Directory where to install the modules to (defaults to `pkg-config --variable=modlibexecdir libpulse`)])],
  55. [modlibexecdir=$withval], [modlibexecdir="${PA_MODDIR}"])
  56. AC_SUBST(modlibexecdir)
  57. # Checks for header files.
  58. AC_CHECK_HEADERS([fcntl.h limits.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
  59. # Checks for typedefs, structures, and compiler characteristics.
  60. AC_TYPE_INT64_T
  61. AC_TYPE_SIZE_T
  62. AC_TYPE_UINT32_T
  63. # Checks for library functions.
  64. AC_CHECK_FUNCS([memset socket])
  65. AC_CONFIG_FILES([Makefile
  66. src/Makefile])
  67. AC_OUTPUT