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.

95 lines
2.8 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.5], [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. # Default system-wide autostart directory from XDG autostart specification
  26. m4_define([XDG_AUTOSTART_DIR], /etc/xdg/autostart)
  27. AC_SUBST([PA_MAJOR], [pa_major])
  28. AC_SUBST([PA_MINOR], [pa_minor])
  29. AC_SUBST([PA_MAJORMINOR], [pa_major].[pa_minor])
  30. # Build shared libraries
  31. LT_INIT([shared disable-static])
  32. # Checks for programs.
  33. AC_PROG_CXX
  34. AC_PROG_AWK
  35. AC_PROG_CC
  36. AC_PROG_CPP
  37. AC_PROG_INSTALL
  38. AC_PROG_LN_S
  39. AC_PROG_MAKE_SET
  40. # Checks for libraries.
  41. PKG_CHECK_MODULES([LIBPULSE], [libpulse])
  42. m4_define([PULSE_MSG], [PULSE_DIR not specified. Follow the instructions in README.md.])
  43. AC_ARG_VAR([PULSE_DIR], [pulseaudio source code directory])
  44. AS_IF([test x"$PULSE_DIR" == x""],
  45. cat <<__MSG__
  46. m4_text_box([PULSE_MSG])
  47. __MSG__
  48. AC_MSG_ERROR([PULSE_DIR not specified])
  49. )
  50. # use the prefix as same as pulseaudio
  51. AC_PREFIX_PROGRAM(pulseaudio)
  52. # copied from pulseaudio
  53. AC_ARG_WITH(
  54. [module-dir],
  55. [AS_HELP_STRING([--with-module-dir],
  56. [Directory where to install the modules to (defaults to `pkg-config --variable=modlibexecdir libpulse`)])],
  57. [modlibexecdir=$withval], [modlibexecdir="${PA_MODDIR}"])
  58. AC_SUBST(modlibexecdir)
  59. AC_ARG_WITH(
  60. [xdgautostart-dir],
  61. [AS_HELP_STRING([--with-xdgautostart-dir],
  62. Directory to install the desktop file (defaults to XDG_AUTOSTART_DIR))],
  63. [xdgautostartdir=$withval], [xdgautostartdir=XDG_AUTOSTART_DIR])
  64. AC_SUBST(xdgautostartdir)
  65. # Checks for header files.
  66. AC_CHECK_HEADERS([fcntl.h limits.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
  67. # Checks for typedefs, structures, and compiler characteristics.
  68. AC_TYPE_INT64_T
  69. AC_TYPE_SIZE_T
  70. AC_TYPE_UINT32_T
  71. # Checks for library functions.
  72. AC_CHECK_FUNCS([memset socket])
  73. AC_CONFIG_FILES([Makefile
  74. src/Makefile
  75. instfiles/Makefile])
  76. AC_OUTPUT