configure.ac 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. #!/bin/bash -norc
  2. dnl This file is an input file used by the GNU "autoconf" program to
  3. dnl generate the file "configure", which is run during Tcl installation
  4. dnl to configure the system for the local environment.
  5. #-----------------------------------------------------------------------
  6. # Sample configure.ac for Tcl Extensions. The only places you should
  7. # need to modify this file are marked by the string __CHANGE__
  8. #-----------------------------------------------------------------------
  9. #-----------------------------------------------------------------------
  10. # __CHANGE__
  11. # Set your package name and version numbers here.
  12. #
  13. # This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION
  14. # set as provided. These will also be added as -D defs in your Makefile
  15. # so you can encode the package version directly into the source files.
  16. # This will also define a special symbol for Windows (BUILD_<PACKAGE_NAME>
  17. # so that we create the export library with the dll.
  18. #-----------------------------------------------------------------------
  19. AC_INIT([zint],[2.13.0])
  20. #--------------------------------------------------------------------
  21. # Call TEA_INIT as the first TEA_ macro to set up initial vars.
  22. # This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
  23. # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
  24. #--------------------------------------------------------------------
  25. TEA_INIT()
  26. AC_CONFIG_AUX_DIR(tclconfig)
  27. #--------------------------------------------------------------------
  28. # Load the tclConfig.sh file
  29. #--------------------------------------------------------------------
  30. TEA_PATH_TCLCONFIG
  31. TEA_LOAD_TCLCONFIG
  32. #--------------------------------------------------------------------
  33. # Load the tkConfig.sh file if necessary (Tk extension)
  34. #--------------------------------------------------------------------
  35. #TEA_PATH_TKCONFIG
  36. #TEA_LOAD_TKCONFIG
  37. #-----------------------------------------------------------------------
  38. # Handle the --prefix=... option by defaulting to what Tcl gave.
  39. # Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
  40. #-----------------------------------------------------------------------
  41. TEA_PREFIX
  42. #-----------------------------------------------------------------------
  43. # Standard compiler checks.
  44. # This sets up CC by using the CC env var, or looks for gcc otherwise.
  45. # This also calls AC_PROG_CC and a few others to create the basic setup
  46. # necessary to compile executables.
  47. #-----------------------------------------------------------------------
  48. TEA_SETUP_COMPILER
  49. #-----------------------------------------------------------------------
  50. # __CHANGE__
  51. # Specify the C source files to compile in TEA_ADD_SOURCES,
  52. # public headers that need to be installed in TEA_ADD_HEADERS,
  53. # stub library C source files to compile in TEA_ADD_STUB_SOURCES,
  54. # and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
  55. # This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
  56. # and PKG_TCL_SOURCES.
  57. #-----------------------------------------------------------------------
  58. TEA_ADD_SOURCES([
  59. ../backend/2of5.c
  60. ../backend/auspost.c
  61. ../backend/aztec.c
  62. ../backend/bc412.c
  63. ../backend/bmp.c
  64. ../backend/codablock.c
  65. ../backend/code128.c
  66. ../backend/code16k.c
  67. ../backend/code1.c
  68. ../backend/code49.c
  69. ../backend/code.c
  70. ../backend/common.c
  71. ../backend/composite.c
  72. ../backend/dllversion.c
  73. ../backend/dmatrix.c
  74. ../backend/dotcode.c
  75. ../backend/dxfilmedge.c
  76. ../backend/eci.c
  77. ../backend/emf.c
  78. ../backend/filemem.c
  79. ../backend/general_field.c
  80. ../backend/gif.c
  81. ../backend/gridmtx.c
  82. ../backend/gs1.c
  83. ../backend/hanxin.c
  84. ../backend/imail.c
  85. ../backend/large.c
  86. ../backend/library.c
  87. ../backend/mailmark.c
  88. ../backend/maxicode.c
  89. ../backend/medical.c
  90. ../backend/output.c
  91. ../backend/pcx.c
  92. ../backend/pdf417.c
  93. ../backend/plessey.c
  94. ../backend/png.c
  95. ../backend/postal.c
  96. ../backend/ps.c
  97. ../backend/qr.c
  98. ../backend/raster.c
  99. ../backend/reedsol.c
  100. ../backend/rss.c
  101. ../backend/svg.c
  102. ../backend/telepen.c
  103. ../backend/tif.c
  104. ../backend/ultra.c
  105. ../backend/upcean.c
  106. ../backend/vector.c
  107. zint.c
  108. ])
  109. TEA_ADD_HEADERS([])
  110. TEA_ADD_INCLUDES([])
  111. TEA_ADD_LIBS()
  112. TEA_ADD_CFLAGS([-I../backend -DZINT_NO_PNG=1 -DZINT_VERSION=PACKAGE_VERSION])
  113. TEA_ADD_STUB_SOURCES([])
  114. TEA_ADD_TCL_SOURCES([demo/demo.tcl])
  115. #--------------------------------------------------------------------
  116. # __CHANGE__
  117. #
  118. # You can add more files to clean if your extension creates any extra
  119. # files by extending CLEANFILES.
  120. # Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure
  121. # and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var.
  122. #
  123. # A few miscellaneous platform-specific items:
  124. # TEA_ADD_* any platform specific compiler/build info here.
  125. #--------------------------------------------------------------------
  126. #CLEANFILES="$CLEANFILES pkgIndex.tcl"
  127. if test "${TEA_PLATFORM}" = "windows" ; then
  128. # Ensure no empty if clauses
  129. :
  130. #TEA_ADD_SOURCES([win/winFile.c])
  131. #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
  132. else
  133. # Ensure no empty else clauses
  134. :
  135. #TEA_ADD_SOURCES([unix/unixFile.c])
  136. TEA_ADD_LIBS()
  137. fi
  138. #--------------------------------------------------------------------
  139. # __CHANGE__
  140. # Choose which headers you need. Extension authors should try very
  141. # hard to only rely on the Tcl public header files. Internal headers
  142. # contain private data structures and are subject to change without
  143. # notice.
  144. # This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
  145. #--------------------------------------------------------------------
  146. TEA_PUBLIC_TCL_HEADERS
  147. #TEA_PRIVATE_TCL_HEADERS
  148. #TEA_PUBLIC_TK_HEADERS
  149. #TEA_PRIVATE_TK_HEADERS
  150. #TEA_PATH_X
  151. #--------------------------------------------------------------------
  152. # Check whether --enable-threads or --disable-threads was given.
  153. # This auto-enables if Tcl was compiled threaded.
  154. #--------------------------------------------------------------------
  155. TEA_ENABLE_THREADS
  156. #--------------------------------------------------------------------
  157. # The statement below defines a collection of symbols related to
  158. # building as a shared library instead of a static library.
  159. #--------------------------------------------------------------------
  160. TEA_ENABLE_SHARED
  161. #--------------------------------------------------------------------
  162. # This macro figures out what flags to use with the compiler/linker
  163. # when building shared/static debug/optimized objects. This information
  164. # can be taken from the tclConfig.sh file, but this figures it all out.
  165. #--------------------------------------------------------------------
  166. TEA_CONFIG_CFLAGS
  167. #--------------------------------------------------------------------
  168. # Set the default compiler switches based on the --enable-symbols option.
  169. #--------------------------------------------------------------------
  170. TEA_ENABLE_SYMBOLS
  171. #--------------------------------------------------------------------
  172. # This macro generates a line to use when building a library. It
  173. # depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
  174. # and TEA_LOAD_TCLCONFIG macros above.
  175. #--------------------------------------------------------------------
  176. TEA_MAKE_LIB
  177. #--------------------------------------------------------------------
  178. # Determine the name of the tclsh and/or wish executables in the
  179. # Tcl and Tk build directories or the location they were installed
  180. # into. These paths are used to support running test cases only,
  181. # the Makefile should not be making use of these paths to generate
  182. # a pkgIndex.tcl file or anything else at extension build time.
  183. #--------------------------------------------------------------------
  184. TEA_PROG_TCLSH
  185. #TEA_PROG_WISH
  186. #--------------------------------------------------------------------
  187. # Setup a *Config.sh.in configuration file.
  188. #--------------------------------------------------------------------
  189. #TEA_EXPORT_CONFIG([sample])
  190. #AC_SUBST(SAMPLE_VAR)
  191. #--------------------------------------------------------------------
  192. # Specify files to substitute AC variables in. You may alternatively
  193. # have a special pkgIndex.tcl.in or other files which require
  194. # substituting the AC variables in. Include these here.
  195. #--------------------------------------------------------------------
  196. AC_CONFIG_FILES([Makefile pkgIndex.tcl])
  197. #AC_CONFIG_FILES([sampleConfig.sh])
  198. #--------------------------------------------------------------------
  199. # Finally, substitute all of the various values into the files
  200. # specified with AC_CONFIG_FILES.
  201. #--------------------------------------------------------------------
  202. AC_OUTPUT