configure.ac 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. #===========================================================================
  2. #
  3. # configure.in
  4. #
  5. #===========================================================================
  6. # $Id: configure.in,v 1.32 2006/06/01 09:50:12 chris Exp $
  7. #---------------------------------------------------------------------------
  8. # Init Auto Tools
  9. #---------------------------------------------------------------------------
  10. # autoconf
  11. AC_PREREQ([2.69])
  12. AC_INIT([graphlet], [5.0.1], [mooigraph@gmail.com], [graphlet-5.0.1.tar.gz], [https://sourceforge.net/projects/gml4gtk])
  13. AC_CONFIG_SRCDIR([src/graphscript/graphscript.cpp])
  14. AC_CONFIG_AUX_DIR(config)
  15. AC_CONFIG_HEADERS([config.h])
  16. AC_PROG_CC
  17. AC_PROG_CXX([g++ clang++])
  18. AC_LANG([C++])
  19. AC_PROG_MAKE_SET
  20. AC_PROG_RANLIB
  21. CXX_FLAGS=${CXX_GLAGS:-""}
  22. dnl get obscure info about the system
  23. AC_CANONICAL_SYSTEM
  24. dnl -----------------------------------------------
  25. dnl Package name and version number (user defined)
  26. dnl -----------------------------------------------
  27. # release versioning
  28. AC_DEFINE_UNQUOTED([GENERIC_MAJOR_VERSION],[5],[major])
  29. AC_DEFINE_UNQUOTED([GENERIC_MINOR_VERSION],[0],[minor])
  30. AC_DEFINE_UNQUOTED([GENERIC_MICRO_VERSION],[1],[micro])
  31. AC_SUBST(GENERIC_MAJOR_VERSION)
  32. dnl GT_ is used in the sources
  33. AC_DEFINE_UNQUOTED([GT_MAJOR_VERSION],[5],[major])
  34. AC_DEFINE_UNQUOTED([GT_MINOR_VERSION],[0],[minor])
  35. AC_DEFINE_UNQUOTED([GT_MINI_VERSION],[1],[micro])
  36. dnl --------------------------------
  37. dnl Package name and version number
  38. dnl --------------------------------
  39. GENERIC_VERSION=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION.$GENERIC_MICRO_VERSION
  40. GENERIC_RELEASE=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION
  41. AC_SUBST(GENERIC_RELEASE)
  42. AC_SUBST(GENERIC_VERSION)
  43. VERSION=$GENERIC_VERSION
  44. AM_INIT_AUTOMAKE([foreign])
  45. AM_MAINTAINER_MODE
  46. # libtool
  47. AC_PROG_LIBTOOL
  48. LIBTOOL="$LIBTOOL --silent"
  49. CONFIG_DATE=`date +"%a %d %b %Y"`
  50. AC_SUBST(CONFIG_DATE)
  51. AC_DEFINE_UNQUOTED(COMPILE_DATE, ["$CONFIG_DATE"], [Year, month and day this program is compiled.])
  52. # short system name in config.h
  53. CONFIG_UNAME=`uname -s`
  54. AC_SUBST(CONFIG_UNAME)
  55. AC_DEFINE_UNQUOTED(COMPILE_UNAME, ["$CONFIG_UNAME"], [System where this is compiled.])
  56. dnl check if tcl dev package is installed
  57. AC_CHECK_LIB([tcl], [Tcl_Free],[have_tcl=yes],[have_tcl=no])
  58. if test x"${have_tcl}" != xyes; then
  59. AC_MSG_FAILURE([configure-error: Install Tcl development libraries with include files for libtcl],[1])
  60. fi
  61. dnl check if tk dev package is installed
  62. AC_CHECK_LIB([tk], [Tk_FreeFont],[have_tk=yes],[have_tk=no])
  63. if test x"${have_tk}" != xyes; then
  64. AC_MSG_FAILURE([configure-error: Install Tk development libraries with include files for libtk],[1])
  65. fi
  66. TCLTK_CFLAGS="-I /usr/include/tk"
  67. GTL_CFLAGS="-I.."
  68. CXX_FLAGS="$CXX_FLAGS $GTL_CFLAGS"
  69. CXX_FLAGS="$CXX_FLAGS $TCLTK_CFLAGS"
  70. CFLAGS="$CFLAGS $CXX_FLAGS"
  71. AC_CONFIG_FILES([Makefile \
  72. src/Makefile \
  73. src/graphscript/Makefile \
  74. src/gt_base/Makefile \
  75. src/gt_cfr_layout/Makefile \
  76. src/gt_icse_layout/Makefile \
  77. src/gt_lsd_gem/Makefile \
  78. src/gt_lsd_springembedder_kamada/Makefile \
  79. src/gt_lsd_springembedder_rf/Makefile \
  80. src/gt_lsd_sugiyama/Makefile \
  81. src/gt_lsd_tree_layout_walker/Makefile \
  82. src/gt_lsd_tunkelang/Makefile \
  83. src/gt_radial_tree_layout/Makefile \
  84. src/gt_tcl/Makefile \
  85. src/gt_tree_layout/Makefile \
  86. src/gt_xdag/Makefile])
  87. AC_OUTPUT
  88. echo " "
  89. echo " "
  90. echo " "
  91. echo " , , "
  92. echo " / \ "
  93. echo " ((__-^^-,-^^-__)) "
  94. echo " '-__- - '--__- "
  95. echo " -O O- "
  96. echo " \ / "
  97. echo " ): :( "
  98. echo " :o_o: "
  99. echo " - "
  100. echo " "
  101. echo " "
  102. echo " "
  103. echo This system is `uname -a`;
  104. cat <<EOF
  105. $PACKAGE_STRING is configured to be compiled.
  106. EOF
  107. AC_MSG_NOTICE([
  108. Configuration:
  109. Source code location ${srcdir}
  110. Build code location ${builddir}
  111. Destination prefix ${prefix}
  112. C++ Compiler ${CXX}
  113. C++ Flags ${CXX_FLAGS}
  114. CC For Build ${CC_FOR_BUILD}
  115. Cross-Compiling ${cross_compiling}
  116. Build ${build}
  117. Host ${host}
  118. Target ${target}
  119. Tk Libraries ${have_tk}
  120. Tcl Libraries ${have_tcl}
  121. ])
  122. #---------------------------------------------------------------------------
  123. # end of file
  124. #---------------------------------------------------------------------------