configure.ac 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #
  2. # Process this file with autoconf to produce a configure script.
  3. #
  4. # Copyright (C) 2015 Alexander Andrejevic <theflash AT sdf DOT lonestar DOT org>
  5. #
  6. # This program is free software: you can redistribute it and/or modify
  7. # it under the terms of the GNU Affero General Public License as
  8. # published by the Free Software Foundation, either version 3 of the
  9. # License, or (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU Affero General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU Affero General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>
  18. #
  19. AC_PREREQ([2.60])
  20. AC_INIT([XSuperLock], [0.1])
  21. AC_CONFIG_SRCDIR([xsuperlock.c])
  22. AC_CONFIG_HEADERS([config.h])
  23. AM_INIT_AUTOMAKE(foreign)
  24. AC_CONFIG_FILES([Makefile xsuperlock.1])
  25. # Checks for programs.
  26. AC_PROG_CC
  27. # Checks for header files.
  28. AC_PATH_X
  29. AC_CHECK_HEADERS([shadow.h stdlib.h])
  30. # Checks for typedefs, structures, and compiler characteristics.
  31. AC_TYPE_PID_T
  32. AC_TYPE_SIZE_T
  33. # Checks for library functions.
  34. AC_FUNC_FORK
  35. AC_FUNC_ALLOCA
  36. AC_FUNC_MALLOC
  37. AC_CHECK_FUNCS([memset strchr strtok gethostname getspnam])
  38. AC_ARG_VAR(DEFAULT_SCREENSAVER_DIR,
  39. [A path to the default screensaver directory.])
  40. if test "x$DEFAULT_SCREENSAVER_DIR" == "x"; then
  41. DEFAULT_SCREENSAVER_DIR='/usr/lib/xscreensaver'
  42. fi
  43. dnl Checks for required libraries
  44. PKG_CHECK_MODULES(X, [x11 >= 1.1 xft >= 2.3])
  45. AC_SUBST([X_CFLAGS])
  46. AC_SUBST([X_LIBS])
  47. PKG_CHECK_MODULES(XF86VM, [xxf86vm >= 1.1.3 xf86vidmodeproto >= 2.3.1])
  48. AC_SUBST([XF86VM_CFLAGS])
  49. AC_SUBST([XF86VM_LIBS])
  50. AC_OUTPUT