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.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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 SNF4CGP 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(snf4cgp, 0.1.4)
  16. AC_CONFIG_SRCDIR(SNF4CGP/OutputProcessor.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_DISABLE_SHARED
  22. AC_PROG_LIBTOOL
  23. AC_PROG_CXX
  24. AC_PROG_CC
  25. AC_PROG_INSTALL
  26. AC_PROG_MAKE_SET
  27. dnl
  28. dnl Check for programs.
  29. dnl
  30. AC_CHECK_PROG(haveCURL, curl, true, false)
  31. if [[ $haveCURL == "false" ]]
  32. then
  33. AC_MSG_ERROR([The CURL program was not found]);
  34. fi
  35. dnl
  36. dnl Load whether this is for a package.
  37. dnl
  38. AC_ARG_ENABLE(for-package,
  39. [AS_HELP_STRING([--enable-for-package],
  40. [enable if building for a package])],
  41. [FOR_PACKAGE="${enableval}" ])
  42. AM_CONDITIONAL([ForPackage], [test x$FOR_PACKAGE = xyes])
  43. dnl
  44. dnl Check libraries.
  45. dnl
  46. dnl
  47. dnl pthread library.
  48. dnl
  49. AC_CHECK_LIB(pthread, pthread_create,,
  50. AC_MSG_ERROR([libpthread is required to build AC_PACKAGE_NAME]))
  51. dnl
  52. dnl Additional compile-time and link-time flags.
  53. dnl
  54. OTHER_CXXFLAGS='-O3'
  55. SNF_CXXFLAGS='$(OTHER_CXXFLAGS) -pthread'
  56. SNF_LIBS=''
  57. AC_SUBST(OTHER_CXXFLAGS)
  58. AC_SUBST(SNF_CXXFLAGS)
  59. AC_SUBST(SNF_LIBS)
  60. dnl
  61. dnl Output the makefiles.
  62. dnl
  63. AC_OUTPUT([Makefile
  64. CodeDweller/Makefile
  65. SNFMulti/Makefile
  66. SNF4CGP/Makefile
  67. SNF2Check/Makefile
  68. SNFClient/Makefile
  69. Scripts/Makefile
  70. Doc/Makefile
  71. config_files/Makefile])
  72. echo "
  73. Type "make" to build the system using the default (optimized) parameters.
  74. Type "make OTHER_CXXFLAGS=flags" to build the system with compiler
  75. flags 'flags'.
  76. For example:
  77. Type "make OTHER_CXXFLAGS=-g" to build the system for debugging.
  78. Type "make OTHER_CXXFLAGS=-Wall" to enable all warnings.
  79. Type "make OTHER_CXXFLAGS=-Wall -O3" to enable warnings and O3
  80. optimizations.
  81. Default value: $OTHER_CXXFLAGS
  82. Done
  83. "