comparison configure.ac @ 250:c130f47f6f48

*: many many changes e.g. the search page is actually implemented now!
author Paper <paper@paper.us.eu.org>
date Sun, 04 Feb 2024 21:17:17 -0500
parents 6b2441c776dd
children 862d0d8619f6
comparison
equal deleted inserted replaced
249:6b2441c776dd 250:c130f47f6f48
7 AC_CONFIG_AUX_DIR([build-aux]) 7 AC_CONFIG_AUX_DIR([build-aux])
8 AC_CONFIG_MACRO_DIRS([m4]) 8 AC_CONFIG_MACRO_DIRS([m4])
9 9
10 AM_INIT_AUTOMAKE([-Wall -Wportability foreign subdir-objects]) 10 AM_INIT_AUTOMAKE([-Wall -Wportability foreign subdir-objects])
11 11
12 # Do we have a C++17 compiler 12 dnl Do we have a C++17 compiler
13 : ${CXXFLAGS=""} 13 : ${CXXFLAGS=""}
14 AC_PROG_CXX 14 AC_PROG_CXX
15 AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory]) 15 AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory])
16 16
17 # Init libtool 17 dnl Init libtool
18 AM_PROG_AR 18 AM_PROG_AR
19 LT_INIT 19 LT_INIT
20 20
21 # Qt? 21 dnl Qt?
22 AX_HAVE_QT 22 AT_WITH_QT([widgets gui core], [], [], [have_qt=no], [have_qt=yes])
23 23
24 if test "x$have_qt" = "xno"; then 24 AS_IF([test "x$have_qt" = "xno"], [AC_MSG_ERROR([*** Qt not found.])])
25 AC_MSG_ERROR([*** Qt not found.])
26 fi
27 25
28 # need this for moc 26 dnl need this for moc
29 AC_PROG_MKDIR_P 27 AC_PROG_MKDIR_P
28 AC_SUBST([MKDIR_P])
30 29
31 # libcurl? 30 dnl libcurl?
32 LIBCURL_CHECK_CONFIG([yes], [7.7.2], [have_libcurl=yes], [have_libcurl=no]) 31 LIBCURL_CHECK_CONFIG([yes], [7.7.2], [have_libcurl=yes], [have_libcurl=no])
33 32
34 if test "x$have_libcurl" = "xno"; then 33 AS_IF([test "x$have_libcurl" = "xno"], [AC_MSG_ERROR([*** libcurl not found.])])
35 AC_MSG_ERROR([*** libcurl not found.])
36 fi
37 34
38 build_windows=no 35 build_windows=no
39 build_osx=no 36 build_osx=no
37 build_linux=no
40 build_glib=no 38 build_glib=no
41 39
42 case "${host_os}" in 40 AS_CASE(["$host_os"],
43 cygwin*|mingw*) 41 [cygwin*|mingw*], [build_windows=yes],
44 # Windows 42 [darwin*], [build_osx=yes],
45 build_windows=yes 43 [linux*], [build_linux=yes],
46 AC_CHECK_TOOL([WINDRES], [windres]) 44 [])
47 AC_SUBST(WINDRES) 45
48 AC_PROG_SED # We need sed for version numbers in windres 46 if test "x$build_windows" = "xyes"; then
49 AC_SUBST(SED) 47 AC_DEFINE([WIN32])
50 AC_DEFINE(WIN32) 48
51 ;; 49 dnl Check for windres
52 darwin*) 50 AC_CHECK_TOOL([WINDRES], [windres])
53 # Mac OS X 51 AC_SUBST([WINDRES])
54 build_osx=yes 52 elif test "x$build_osx" = "xyes"; then
55 AC_DEFINE(MACOSX) 53 AC_DEFINE([MACOSX])
56 ;; 54 else
57 *) 55 AS_IF([test "x$build_linux" = "xyes"], [AC_DEFINE([linux])])
58 if test "x$host_os" = "xlinux"; then 56
59 AC_DEFINE(LINUX) 57 PKG_CHECK_MODULES([GLIB], [gio-2.0 glib-2.0], [build_glib=yes], [build_glib=no])
60 fi 58 if test "x$build_glib" = "xyes"; then
61 # Everything else 59 AC_DEFINE([GLIB])
62 AC_SUBST([GIO_CFLAGS]) 60
63 AC_SUBST([GIO_LIBS]) 61 AC_SUBST([GLIB_CFLAGS])
64 PKG_CHECK_MODULES([GIO], [gio-2.0], [build_glib=yes], []) 62 AC_SUBST([GLIB_LIBS])
65 ;; 63 fi
66 esac 64 fi
67 65
68 AM_CONDITIONAL([BUILD_WIN], [test "x$build_windows" = "xyes"]) 66 AM_CONDITIONAL([BUILD_WIN], [test "x$build_windows" = "xyes"])
69 AM_CONDITIONAL([BUILD_OSX], [test "x$build_osx" = "xyes"]) 67 AM_CONDITIONAL([BUILD_OSX], [test "x$build_osx" = "xyes"])
70 AM_CONDITIONAL([BUILD_GLIB], [test "x$build_glib" = "xyes"]) 68 AM_CONDITIONAL([BUILD_GLIB], [test "x$build_glib" = "xyes"])
71 AM_CONDITIONAL([BUILD_WINDRES], [test "x$WINDRES" != "x"]) 69 AM_CONDITIONAL([BUILD_WINDRES], [test "x$WINDRES" != "x"])