A generic touchscreen calibration program for X.Org
Revisión | 330476a0490b1f9035325a45d7354ea76d913d73 (tree) |
---|---|
Tiempo | 2010-01-25 09:10:30 |
Autor | Tias Guns <tias@ulys...> |
Commiter | Tias Guns |
more standard directory layout, enhanced autotools, gitignore
@@ -0,0 +1,18 @@ | ||
1 | +*.m4 | |
2 | +autom4te.cache | |
3 | +autoscan.log | |
4 | +compile | |
5 | +config.* | |
6 | +configure | |
7 | +configure.scan | |
8 | +depcomp | |
9 | +.deps/ | |
10 | +install-sh | |
11 | +libtool | |
12 | +Makefile | |
13 | +Makefile.in | |
14 | +missing | |
15 | +mkinstalldirs | |
16 | + | |
17 | +*.o | |
18 | +*.pc |
@@ -1,5 +1,6 @@ | ||
1 | 1 | # |
2 | 2 | # Copyright (c) 2010 Petr Stetiar <ynezz@true.cz> |
3 | +# Copyright (c) 2010 Tias Guns <tias@ulyssis.org> | |
3 | 4 | # |
4 | 5 | # Permission is hereby granted, free of charge, to any person |
5 | 6 | # obtaining a copy of this software and associated documentation |
@@ -23,19 +24,7 @@ | ||
23 | 24 | # OTHER DEALINGS IN THE SOFTWARE. |
24 | 25 | # |
25 | 26 | |
26 | -AM_CXXFLAGS = -Wall -ansi -pedantic -W -Wmissing-declarations -Werror | |
27 | - | |
28 | -if BUILD_GTKMM | |
29 | -bin_PROGRAMS = xinput_calibrator_x11 xinput_calibrator_gtkmm | |
30 | -xinput_calibrator_gtkmm_SOURCES = main_gtkmm.cpp | |
31 | -xinput_calibrator_gtkmm_CXXFLAGS = $(GTKMM_CFLAGS) $(AM_CXXFLAGS) | |
32 | -xinput_calibrator_gtkmm_LDADD = $(GTKMM_LIBS) | |
33 | -else | |
34 | -bin_PROGRAMS = xinput_calibrator_x11 | |
35 | -endif | |
36 | - | |
37 | -xinput_calibrator_x11_LDADD = $(XORG_LIBS) | |
38 | -xinput_calibrator_x11_CXXFLAGS = $(XORG_CFLAGS) $(AM_CXXFLAGS) | |
39 | -xinput_calibrator_x11_SOURCES = main_x11.cpp | |
27 | +AUTOMAKE_OPTIONS = foreign | |
28 | +SUBDIRS = src | |
40 | 29 | |
41 | 30 | EXTRA_DIST = autogen.sh |
@@ -1,5 +1,6 @@ | ||
1 | 1 | # |
2 | 2 | # Copyright (c) 2010 Petr Stetiar <ynezz@true.cz> |
3 | +# Copyright (c) 2010 Tias Guns <tias@ulyssis.org> | |
3 | 4 | # |
4 | 5 | # Permission is hereby granted, free of charge, to any person |
5 | 6 | # obtaining a copy of this software and associated documentation |
@@ -24,7 +25,7 @@ | ||
24 | 25 | # |
25 | 26 | |
26 | 27 | AC_PREREQ([2.57]) |
27 | -AC_INIT(xinput_calibrator,[0.5.0], [http://github.com/tias/xinput_calibrator]) | |
28 | +AC_INIT(xinput_calibrator,[0.5.0], [http://github.com/tias/xinput_calibrator/issues],, [http://www.freedesktop.org/wiki/Software/xinput_calibrator]) | |
28 | 29 | AM_INIT_AUTOMAKE([foreign dist-bzip2]) |
29 | 30 | AM_MAINTAINER_MODE |
30 | 31 |
@@ -32,19 +33,39 @@ AC_PROG_CC | ||
32 | 33 | AC_PROG_CXX |
33 | 34 | AC_PROG_INSTALL |
34 | 35 | |
35 | -AC_ARG_ENABLE([gtkmm], AS_HELP_STRING([--enable-gtkmm], [Enable GTKMM GUI])) | |
36 | -AS_IF([test "x$enable_gtkmm" = "xyes"], [ | |
37 | - PKG_CHECK_MODULES(GTKMM, [gtkmm-2.4]) | |
38 | - AC_SUBST(GTKMM_CFLAGS) | |
39 | - AC_SUBST(GTKMM_LIBS) | |
36 | +AC_PATH_X | |
37 | +AC_CHECK_HEADERS([stdlib.h string.h]) | |
38 | +AC_HEADER_STDBOOL | |
39 | +AC_FUNC_STRTOD | |
40 | +AC_CHECK_FUNCS([strdup]) | |
41 | + | |
42 | +PKG_CHECK_MODULES(XINPUT, x11 xext [xi >= 1.2] [inputproto >= 1.5]) | |
43 | +AC_SUBST(XINPUT_CFLAGS) | |
44 | +AC_SUBST(XINPUT_LIBS) | |
45 | + | |
46 | + | |
47 | +AC_ARG_ENABLE([x11], AS_HELP_STRING([--disable-x11], [Disable X11 GUI])) | |
48 | +AS_IF([test "x$enable_x11" != "xno"], [ | |
49 | + PKG_CHECK_MODULES(XORG, [x11], enable_x11="yes", enable_x11="no") | |
50 | + AC_SUBST(XORG_CFLAGS) | |
51 | + AC_SUBST(XORG_LIBS) | |
40 | 52 | ]) |
53 | +AM_CONDITIONAL([BUILD_X11], [test "x$enable_x11" = "xyes"]) | |
41 | 54 | |
55 | + | |
56 | +AC_ARG_ENABLE([gtkmm], AS_HELP_STRING([--disable-gtkmm], [Disable GTKMM GUI])) | |
57 | +AS_IF([test "x$enable_gtkmm" != "xno"], [ | |
58 | + PKG_CHECK_MODULES(GTKMM, [gtkmm-2.4], enable_gtkmm="yes", | |
59 | + [if test "x$enable_gtkmm" = "xyes"; then | |
60 | + AC_MSG_ERROR([GTKMM GUI requested, but gtkmm-2.4 not found]) | |
61 | + fi]) | |
62 | + AC_SUBST(GTKMM_CFLAGS) | |
63 | + AC_SUBST(GTKMM_LIBS) | |
64 | +]) | |
42 | 65 | AM_CONDITIONAL([BUILD_GTKMM], [test "x$enable_gtkmm" = "xyes"]) |
43 | 66 | |
44 | -PKG_CHECK_MODULES(XORG, [x11 xi]) | |
45 | -AC_SUBST(XORG_CFLAGS) | |
46 | -AC_SUBST(XORG_LIBS) | |
67 | + | |
47 | 68 | AC_SUBST(VERSION) |
48 | 69 | |
49 | -AC_CONFIG_FILES(Makefile) | |
50 | -AC_OUTPUT | |
70 | +AC_OUTPUT([Makefile | |
71 | + src/Makefile]) |
@@ -0,0 +1,2 @@ | ||
1 | +xinput_calibrator_x11 | |
2 | +xinput_calibrator_gtkmm |
@@ -0,0 +1,46 @@ | ||
1 | +# | |
2 | +# Copyright (c) 2010 Petr Stetiar <ynezz@true.cz> | |
3 | +# Copyright (c) 2010 Tias Guns <tias@ulyssis.org> | |
4 | +# | |
5 | +# Permission is hereby granted, free of charge, to any person | |
6 | +# obtaining a copy of this software and associated documentation | |
7 | +# files (the "Software"), to deal in the Software without | |
8 | +# restriction, including without limitation the rights to use, | |
9 | +# copy, modify, merge, publish, distribute, sublicense, and/or sell | |
10 | +# copies of the Software, and to permit persons to whom the | |
11 | +# Software is furnished to do so, subject to the following | |
12 | +# conditions: | |
13 | +# | |
14 | +# The above copyright notice and this permission notice shall be | |
15 | +# included in all copies or substantial portions of the Software. | |
16 | +# | |
17 | +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
18 | +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | |
19 | +# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
20 | +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | |
21 | +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |
22 | +# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
23 | +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | |
24 | +# OTHER DEALINGS IN THE SOFTWARE. | |
25 | +# | |
26 | + | |
27 | +AM_CXXFLAGS = -Wall -ansi -pedantic -W -Wmissing-declarations -Werror | |
28 | + | |
29 | +if BUILD_X11 | |
30 | +bin_PROGRAMS = xinput_calibrator_x11 | |
31 | +xinput_calibrator_x11_SOURCES = main_x11.cpp | |
32 | +xinput_calibrator_x11_LDADD = $(XINPUT_LIBS) $(XORG_LIBS) | |
33 | +xinput_calibrator_x11_CXXFLAGS = $(XINPUT_CFLAGS) $(XORG_CFLAGS) $(AM_CXXFLAGS) | |
34 | +endif | |
35 | + | |
36 | +if BUILD_GTKMM | |
37 | +if BUILD_X11 | |
38 | +bin_PROGRAMS += xinput_calibrator_gtkmm | |
39 | +else | |
40 | +bin_PROGRAMS = xinput_calibrator_gtkmm | |
41 | +endif | |
42 | +xinput_calibrator_gtkmm_SOURCES = main_gtkmm.cpp | |
43 | +xinput_calibrator_gtkmm_LDADD = $(XINPUT_LIBS) $(GTKMM_LIBS) | |
44 | +xinput_calibrator_gtkmm_CXXFLAGS = $(XINPUT_CFLAGS) $(GTKMM_CFLAGS) $(AM_CXXFLAGS) | |
45 | +endif | |
46 | + |
@@ -87,9 +87,9 @@ class WrongCalibratorException : public std::invalid_argument { | ||
87 | 87 | |
88 | 88 | // all need struct XYinfo, and some the consts too |
89 | 89 | #include "calibrator.cpp" |
90 | -#include "calibrators/calibratorXorgPrint.cpp" | |
91 | -#include "calibrators/calibratorEvdev.cpp" | |
92 | -#include "calibrators/calibratorUsbtouchscreen.cpp" | |
90 | +#include "calibrator/calibratorXorgPrint.cpp" | |
91 | +#include "calibrator/calibratorEvdev.cpp" | |
92 | +#include "calibrator/calibratorUsbtouchscreen.cpp" | |
93 | 93 | |
94 | 94 | |
95 | 95 |
@@ -28,7 +28,7 @@ | ||
28 | 28 | #include <cairomm/context.h> |
29 | 29 | |
30 | 30 | #include "main_common.hpp" |
31 | -#include "gui_gtkmm.cpp" | |
31 | +#include "gui/gui_gtkmm.cpp" | |
32 | 32 | |
33 | 33 | int main(int argc, char** argv) |
34 | 34 | { |
@@ -21,7 +21,7 @@ | ||
21 | 21 | */ |
22 | 22 | |
23 | 23 | #include "main_common.hpp" |
24 | -#include "gui_x11.cpp" | |
24 | +#include "gui/gui_x11.cpp" | |
25 | 25 | |
26 | 26 | int main(int argc, char** argv) |
27 | 27 | { |