• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A generic touchscreen calibration program for X.Org


Commit MetaInfo

Revisión330476a0490b1f9035325a45d7354ea76d913d73 (tree)
Tiempo2010-01-25 09:10:30
AutorTias Guns <tias@ulys...>
CommiterTias Guns

Log Message

more standard directory layout, enhanced autotools, gitignore

Cambiar Resumen

  • add: .gitignore (diff)
  • modified: Makefile.am (diff)
  • delete: calibrator.cpp => src/calibrator.cpp
  • delete: calibrator.hh => src/calibrator.hh
  • modified: configure.ac (diff)
  • delete: gui_gtkmm.cpp => src/gui/gui_gtkmm.cpp
  • delete: gui_x11.cpp => src/gui/gui_x11.cpp
  • delete: main_common.hpp => src/main_common.hpp
  • delete: main_gtkmm.cpp => src/main_gtkmm.cpp
  • delete: main_x11.cpp => src/main_x11.cpp
  • add: src/.gitignore (diff)
  • add: src/Makefile.am (diff)
  • delete: {calibrators => src/calibrator}/calibratorEvdev.cpp
  • delete: {calibrators => src/calibrator}/calibratorUsbtouchscreen.cpp
  • delete: {calibrators => src/calibrator}/calibratorXorgPrint.cpp

Diferencia incremental

--- /dev/null
+++ b/.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
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,6 @@
11 #
22 # Copyright (c) 2010 Petr Stetiar <ynezz@true.cz>
3+# Copyright (c) 2010 Tias Guns <tias@ulyssis.org>
34 #
45 # Permission is hereby granted, free of charge, to any person
56 # obtaining a copy of this software and associated documentation
@@ -23,19 +24,7 @@
2324 # OTHER DEALINGS IN THE SOFTWARE.
2425 #
2526
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
4029
4130 EXTRA_DIST = autogen.sh
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,6 @@
11 #
22 # Copyright (c) 2010 Petr Stetiar <ynezz@true.cz>
3+# Copyright (c) 2010 Tias Guns <tias@ulyssis.org>
34 #
45 # Permission is hereby granted, free of charge, to any person
56 # obtaining a copy of this software and associated documentation
@@ -24,7 +25,7 @@
2425 #
2526
2627 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])
2829 AM_INIT_AUTOMAKE([foreign dist-bzip2])
2930 AM_MAINTAINER_MODE
3031
@@ -32,19 +33,39 @@ AC_PROG_CC
3233 AC_PROG_CXX
3334 AC_PROG_INSTALL
3435
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)
4052 ])
53+AM_CONDITIONAL([BUILD_X11], [test "x$enable_x11" = "xyes"])
4154
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+])
4265 AM_CONDITIONAL([BUILD_GTKMM], [test "x$enable_gtkmm" = "xyes"])
4366
44-PKG_CHECK_MODULES(XORG, [x11 xi])
45-AC_SUBST(XORG_CFLAGS)
46-AC_SUBST(XORG_LIBS)
67+
4768 AC_SUBST(VERSION)
4869
49-AC_CONFIG_FILES(Makefile)
50-AC_OUTPUT
70+AC_OUTPUT([Makefile
71+ src/Makefile])
--- /dev/null
+++ b/src/.gitignore
@@ -0,0 +1,2 @@
1+xinput_calibrator_x11
2+xinput_calibrator_gtkmm
--- /dev/null
+++ b/src/Makefile.am
@@ -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+
--- a/main_common.hpp
+++ b/src/main_common.hpp
@@ -87,9 +87,9 @@ class WrongCalibratorException : public std::invalid_argument {
8787
8888 // all need struct XYinfo, and some the consts too
8989 #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"
9393
9494
9595
--- a/main_gtkmm.cpp
+++ b/src/main_gtkmm.cpp
@@ -28,7 +28,7 @@
2828 #include <cairomm/context.h>
2929
3030 #include "main_common.hpp"
31-#include "gui_gtkmm.cpp"
31+#include "gui/gui_gtkmm.cpp"
3232
3333 int main(int argc, char** argv)
3434 {
--- a/main_x11.cpp
+++ b/src/main_x11.cpp
@@ -21,7 +21,7 @@
2121 */
2222
2323 #include "main_common.hpp"
24-#include "gui_x11.cpp"
24+#include "gui/gui_x11.cpp"
2525
2626 int main(int argc, char** argv)
2727 {