Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

configure.ac.in 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. dnl
  2. dnl Process this file with autoconf to produce a configure script.
  3. dnl
  4. dnl $Id: configure.in,v 1.33 2008/02/08 15:10:17 adeniz Exp $
  5. dnl
  6. dnl autoconf input for the MicroNeil SNFServer distribution.
  7. dnl
  8. dnl Author: Alban Deniz
  9. dnl
  10. dnl Copyright (C) 2008 by MicroNeil Corporation. All rights reserved.
  11. dnl See www.armresearch.com for the copyright terms.
  12. dnl
  13. dnl
  14. AC_PREREQ(2.52)
  15. AC_INIT(snf-server, REPLACE_WITH_VERSION)
  16. AC_CONFIG_SRCDIR(SNFMulti/snfCFGmgr.cpp)
  17. AC_CONFIG_AUX_DIR(config)
  18. AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
  19. AM_CONFIG_HEADER(config.h)
  20. AC_LANG(C++)
  21. AC_PROG_LIBTOOL
  22. AC_PROG_CXX
  23. AC_PROG_CC
  24. AC_PROG_INSTALL
  25. AC_PROG_MAKE_SET
  26. dnl
  27. dnl Check for programs.
  28. dnl
  29. AC_CHECK_PROG(haveCURL, curl, true, false)
  30. if [[ $haveCURL == "false" ]]
  31. then
  32. AC_MSG_ERROR([The CURL program was not found]);
  33. fi
  34. dnl
  35. dnl Load the user-specified OS.
  36. dnl
  37. AC_ARG_ENABLE(os-type,
  38. [AS_HELP_STRING([--enable-os-type=TYPE],
  39. [where TYPE is OpenBSD, FreeBSD, RedHat, Suse, Ubuntu, or ArchLinux])],
  40. [SNF_OSTYPE="${enableval}" ])
  41. case "$SNF_OSTYPE" in
  42. OpenBSD|OpenBSD|FreeBSD|RedHat|Suse|Ubuntu|ArchLinux)
  43. :
  44. ;;
  45. *)
  46. AC_MSG_ERROR([Invalid OS type: "$SNF_OSTYPE".
  47. You must specify a valid OS type with --enable-os-type=TYPE, where TYPE is one of:
  48. OpenBSD
  49. FreeBSD
  50. Suse
  51. RedHat
  52. Ubuntu
  53. ArchLinux])
  54. ;;
  55. esac
  56. AM_CONDITIONAL([OpenBSD], [test x$SNF_OSTYPE = xOpenBSD])
  57. AM_CONDITIONAL([FreeBSD], [test x$SNF_OSTYPE = xFreeBSD])
  58. AM_CONDITIONAL([Suse], [test x$SNF_OSTYPE = xSuse])
  59. AM_CONDITIONAL([RedHat], [test x$SNF_OSTYPE = xRedHat])
  60. AM_CONDITIONAL([Ubuntu], [test x$SNF_OSTYPE = xUbuntu])
  61. AM_CONDITIONAL([ArchLinux], [test x$SNF_OSTYPE = xArchLinux])
  62. dnl
  63. dnl Load whether this is for a package.
  64. dnl
  65. AC_ARG_ENABLE(for-package,
  66. [AS_HELP_STRING([--enable-for-package],
  67. [enable if building for a package])],
  68. [FOR_PACKAGE="${enableval}" ])
  69. AM_CONDITIONAL([ForPackage], [test x$FOR_PACKAGE = xyes])
  70. dnl
  71. dnl Check libraries.
  72. dnl
  73. dnl
  74. dnl pthread library.
  75. dnl
  76. AC_CHECK_LIB(pthread, pthread_create,,
  77. AC_MSG_ERROR([libpthread is required to build AC_PACKAGE_NAME]))
  78. dnl
  79. dnl Additional compile-time and link-time flags.
  80. dnl
  81. OTHER_CXXFLAGS='-O3'
  82. SNF_CXXFLAGS='$(OTHER_CXXFLAGS) -pthread'
  83. SNF_LIBS=''
  84. AC_SUBST(OTHER_CXXFLAGS)
  85. AC_SUBST(SNF_CXXFLAGS)
  86. AC_SUBST(SNF_LIBS)
  87. dnl
  88. dnl Output the makefiles.
  89. dnl
  90. AC_OUTPUT([Makefile
  91. CodeDweller/Makefile
  92. SNFMulti/Makefile
  93. SNFServer/Makefile
  94. SNFClient/Makefile
  95. SNF2Check/Makefile
  96. SNFUtility/Common/Makefile
  97. SNFUtility/CommonTests/Makefile
  98. SNFUtility/SNFServerConfig/Makefile
  99. Scripts/Makefile
  100. config_files/Makefile
  101. Docs/Makefile])
  102. echo "
  103. Type "make" to build the system using the default (optimized) parameters.
  104. Type "make SNF_CXXFLAGS='-g -pthread'" to build the system for debugging.
  105. Type "make OTHER_CXXFLAGS=flags" to build the system with compiler
  106. flags 'flags'.
  107. For example:
  108. Type "make OTHER_CXXFLAGS=-g" to build the system for debugging.
  109. Type "make OTHER_CXXFLAGS=-Wall" to enable all warnings.
  110. Type "make OTHER_CXXFLAGS=-Wall -O3" to enable warnings and O3
  111. optimizations.
  112. Default value: $OTHER_CXXFLAGS
  113. OS type: $SNF_OSTYPE
  114. The software will be installed in $prefix.
  115. Done
  116. "