Mercurial > minori
annotate dep/animone/configure.ac @ 266:1a6a5d3a94cd
dep/animone: make bsd.cc and x11.cc actually work
apparently I broke these, and even now the x11 code *still* doesn't want
to work correctly (at least on FreeBSD). half of the PID response codes
are just 0 or the PID for the X server itself... wtf?
maybe dwm just doesn't support the XRes extension, or I'm just stupid.
i don't know.
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Thu, 11 Apr 2024 22:05:41 -0400 |
parents | 862d0d8619f6 |
children | 0718f538c5f9 |
rev | line source |
---|---|
258 | 1 AC_INIT([animone], [0.1.0-alpha.1]) |
2 | |
3 AC_CANONICAL_HOST | |
4 | |
5 AC_CONFIG_SRCDIR([src/animone.cc]) | |
6 AC_CONFIG_AUX_DIR([build-aux]) | |
7 AC_CONFIG_MACRO_DIRS([m4]) | |
8 | |
9 AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) | |
10 | |
11 # Do we have a C++17 compiler | |
12 AC_PROG_CXX | |
13 | |
14 AM_PROG_AR | |
15 LT_INIT | |
16 | |
17 build_win32=no | |
18 build_osx=no | |
19 build_linux=no | |
20 build_libutil=no | |
21 build_kvm=no | |
266
1a6a5d3a94cd
dep/animone: make bsd.cc and x11.cc actually work
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
22 build_bsd=no |
258 | 23 |
24 build_x11=no | |
25 | |
26 case "${host_os}" in | |
27 cygwin*|mingw*) | |
28 # Windows | |
29 build_windows=yes | |
30 AC_CHECK_TOOL([WINDRES], [windres]) | |
31 AC_SUBST(WINDRES) | |
32 AC_DEFINE([WIN32]) | |
33 ;; | |
34 darwin*) | |
35 # Mac OS X | |
36 build_osx=yes | |
37 AC_DEFINE([MACOSX]) | |
38 ;; | |
39 linux*) | |
40 build_linux=yes | |
41 AC_DEFINE([LINUX]) | |
42 ;; | |
43 *) | |
266
1a6a5d3a94cd
dep/animone: make bsd.cc and x11.cc actually work
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
44 dnl BSDs |
1a6a5d3a94cd
dep/animone: make bsd.cc and x11.cc actually work
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
45 build_bsd=yes |
1a6a5d3a94cd
dep/animone: make bsd.cc and x11.cc actually work
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
46 AC_DEFINE([BSD]) |
258 | 47 AC_CHECK_LIB([util], [kinfo_getfile], [build_libutil=yes], [build_libutil=no]) |
266
1a6a5d3a94cd
dep/animone: make bsd.cc and x11.cc actually work
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
48 |
1a6a5d3a94cd
dep/animone: make bsd.cc and x11.cc actually work
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
49 dnl if we have this function it means kvm_openfiles likely also supports NULL values, |
1a6a5d3a94cd
dep/animone: make bsd.cc and x11.cc actually work
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
50 dnl i.e., loading the currently running kernel |
1a6a5d3a94cd
dep/animone: make bsd.cc and x11.cc actually work
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
51 AC_CHECK_LIB([kvm], [kvm_getfiles], [build_kvm=yes], [build_kvm=no]) |
1a6a5d3a94cd
dep/animone: make bsd.cc and x11.cc actually work
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
52 |
1a6a5d3a94cd
dep/animone: make bsd.cc and x11.cc actually work
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
53 if test "x$build_kvm" = "xyes"; then |
1a6a5d3a94cd
dep/animone: make bsd.cc and x11.cc actually work
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
54 AC_DEFINE([LIBKVM]) |
1a6a5d3a94cd
dep/animone: make bsd.cc and x11.cc actually work
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
55 elif test "x$build_libutil" = "xyes"; then |
258 | 56 AC_DEFINE([LIBUTIL]) |
57 fi | |
58 ;; | |
59 esac | |
60 | |
266
1a6a5d3a94cd
dep/animone: make bsd.cc and x11.cc actually work
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
61 if test "x$build_osx" != "xyes" && test "x$build_windows" != "xyes"; then |
258 | 62 PKG_CHECK_MODULES(XCB, [xcb xcb-res], [build_x11=yes], [build_x11=no]) |
63 if test "x$build_x11" = "xyes"; then | |
64 AC_DEFINE([X11]) | |
65 AC_SUBST([XCB_LIBS]) | |
66 AC_SUBST([XCB_CFLAGS]) | |
67 fi | |
68 fi | |
69 | |
70 AM_CONDITIONAL([BUILD_WIN], [test "x$build_windows" = "xyes"]) | |
71 AM_CONDITIONAL([BUILD_OSX], [test "x$build_osx" = "xyes"]) | |
72 AM_CONDITIONAL([BUILD_LINUX], [test "x$build_linux" = "xyes"]) | |
73 AM_CONDITIONAL([BUILD_LIBUTIL], [test "x$build_libutil" = "xyes"]) | |
74 AM_CONDITIONAL([BUILD_LIBKVM], [test "x$build_kvm" = "xyes"]) | |
266
1a6a5d3a94cd
dep/animone: make bsd.cc and x11.cc actually work
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
75 AM_CONDITIONAL([BUILD_BSD], [test "x$build_bsd" = "xyes"]) |
258 | 76 |
77 AM_CONDITIONAL([BUILD_XCB], [test "x$build_x11" = "xyes"]) | |
78 | |
79 AC_CONFIG_FILES([Makefile]) | |
80 AC_OUTPUT |