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.

configure.ac 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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, 3.0.5)
  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, or Ubuntu])],
  40. [SNF_OSTYPE="${enableval}" ])
  41. case "$SNF_OSTYPE" in
  42. OpenBSD|OpenBSD|FreeBSD|RedHat|Suse|Ubuntu)
  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. ;;
  54. esac
  55. AM_CONDITIONAL([OpenBSD], [test x$SNF_OSTYPE = xOpenBSD])
  56. AM_CONDITIONAL([FreeBSD], [test x$SNF_OSTYPE = xFreeBSD])
  57. AM_CONDITIONAL([Suse], [test x$SNF_OSTYPE = xSuse])
  58. AM_CONDITIONAL([RedHat], [test x$SNF_OSTYPE = xRedHat])
  59. AM_CONDITIONAL([Ubuntu], [test x$SNF_OSTYPE = xUbuntu])
  60. dnl
  61. dnl Load whether this is for a package.
  62. dnl
  63. AC_ARG_ENABLE(for-package,
  64. [AS_HELP_STRING([--enable-for-package],
  65. [enable if building for a package])],
  66. [FOR_PACKAGE="${enableval}" ])
  67. AM_CONDITIONAL([ForPackage], [test x$FOR_PACKAGE = xyes])
  68. dnl
  69. dnl Check libraries.
  70. dnl
  71. dnl
  72. dnl pthread library.
  73. dnl
  74. AC_CHECK_LIB(pthread, pthread_create,,
  75. AC_MSG_ERROR([libpthread is required to build AC_PACKAGE_NAME]))
  76. dnl
  77. dnl Additional compile-time and link-time flags.
  78. dnl
  79. SNF_CXXFLAGS='-O3 -pthread'
  80. SNF_LIBS=''
  81. AC_SUBST(SNF_CXXFLAGS)
  82. AC_SUBST(SNF_LIBS)
  83. dnl
  84. dnl Output the makefiles.
  85. dnl
  86. AC_OUTPUT([Makefile
  87. CodeDweller/Makefile
  88. SNFMulti/Makefile
  89. SNFServer/Makefile
  90. SNFClient/Makefile
  91. SNF2Check/Makefile
  92. Scripts/Makefile
  93. config_files/Makefile
  94. Docs/Makefile])
  95. echo "
  96. Type "make" to build the system using the default (optimized) parameters.
  97. Type "make SNF_CXXFLAGS='-g -pthread'" to build the system for debugging.
  98. OS type: $SNF_OSTYPE
  99. The software will be installed in $prefix.
  100. Done
  101. "