configure.ac 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #
  2. # This program is free software; you can redistribute it and/or
  3. # modify it under the terms of the GNU General Public License
  4. # as published by the Free Software Foundation; either version 2
  5. # of the License, or (at your option) any later version.
  6. #
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. # GNU General Public License for more details.
  11. #
  12. # Author: g0tsu
  13. # Email: g0tsu at dnmx.0rg
  14. #
  15. # This file is a part of litemdview project
  16. # https://notabug.org/g0tsu/litemdview
  17. AC_INIT(litemdview, 0.0.32)
  18. AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
  19. AC_PROG_CC
  20. AC_PROG_CXX
  21. AM_PROG_AR
  22. AC_PROG_INSTALL
  23. AC_PROG_LN_S
  24. AC_PROG_MAKE_SET
  25. AC_PROG_LIBTOOL
  26. export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
  27. PKG_CHECK_MODULES(FONTCONFIG, [fontconfig])
  28. PKG_CHECK_MODULES(GDKMM, [gdkmm-3.0])
  29. PKG_CHECK_MODULES(GTKMM, [gtkmm-3.0])
  30. PKG_CHECK_MODULES(CAIRO, [cairo])
  31. PKG_CHECK_MODULES(PANGO, [pango])
  32. PKG_CHECK_MODULES(PANGOCAIRO, [pangocairo])
  33. CFLAGS="$CFLAGS -Wno-sign-compare -Wno-narrowing -D_REENTRANT -D _FILE_OFFSET_BITS=64"
  34. EXTRA_CXXFLAGS="$CFLAGS $FONTCONFIG_CFLAGS $GDKMM_CFLAGS $GTKMM_CFLAGS $CAIRO_CFLAGS"
  35. EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $PANGO_CFLAGS $PANGOCAIRO_CFLAGS"
  36. EXTRA_LIBS="$LIBS $FONTCONFIG_LIBS $GDKMM_LIBS $GTKMM_LIBS $CAIRO_LIBS"
  37. EXTRA_LIBS="$EXTRA_LIBS $PANGO_LIBS $PANGOCAIRO_LIBS"
  38. AC_SUBST(EXTRA_CXXFLAGS)
  39. AC_SUBST(EXTRA_LIBS)
  40. AC_HEADER_STDC
  41. AC_CONFIG_MACRO_DIRS([m4])
  42. AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h unistd.h])
  43. AC_ARG_ENABLE([embedded_img],
  44. AS_HELP_STRING([--enable-embedded-img], [enable embedded images support]))
  45. AS_IF([test "x$enable_embedded_img" = "xyes"], [
  46. AC_DEFINE(CONFIG_USE_EMBEDDED_IMG, 1, [embedded images support])
  47. ])
  48. AC_C_CONST
  49. AC_TYPE_UID_T
  50. AC_C_INLINE
  51. AC_TYPE_MODE_T
  52. AC_TYPE_OFF_T
  53. AC_TYPE_SIZE_T
  54. AC_CHECK_MEMBERS([struct stat.st_blksize])
  55. AM_SILENT_RULES([yes])
  56. AC_STRUCT_ST_BLOCKS
  57. AC_HEADER_TIME
  58. AC_STRUCT_TM
  59. AC_CHECK_LIB(m, main)
  60. AC_CHECK_HEADERS([stdlib.h])
  61. AC_CONFIG_HEADERS([config.h])
  62. AC_CONFIG_FILES([
  63. Makefile
  64. xxd/Makefile
  65. discount/Makefile
  66. libhighlight/Makefile
  67. litehtml/Makefile
  68. src/Makefile
  69. ])
  70. LT_INIT
  71. AC_OUTPUT