Skip to content

Commit

Permalink
switch to autotools based build system
Browse files Browse the repository at this point in the history
This patch autotoolize xinput_calibrator for easier (cross)compiling.
  • Loading branch information
ynezz committed Jan 19, 2010
1 parent 6af268f commit 754d23d
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 11 deletions.
11 changes: 0 additions & 11 deletions Makefile

This file was deleted.

41 changes: 41 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#
# Copyright (c) 2010 Petr Stetiar <[email protected]>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#

#AM_CFLAGS = -Wall -ansi -pedantic -W -Wmissing-prototypes -Wmissing-declarations -Werror -std=gnu99

if BUILD_GTKMM
bin_PROGRAMS = xinput_calibrator_x11 xinput_calibrator_gtkmm
xinput_calibrator_gtkmm_SOURCES = main_gtkmm.cpp
xinput_calibrator_gtkmm_CXXFLAGS = $(GTKMM_CFLAGS)
xinput_calibrator_gtkmm_LDADD = $(GTKMM_LIBS)
else
bin_PROGRAMS = xinput_calibrator_x11
endif

xinput_calibrator_x11_LDADD = $(XORG_LIBS)
xinput_calibrator_x11_CFLAGS = $(XORG_CFLAGS)
xinput_calibrator_x11_SOURCES = main_x11.cpp

EXTRA_DIST = autogen.sh
12 changes: 12 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#! /bin/sh

srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.

ORIGDIR=`pwd`
cd $srcdir

autoreconf -v --install || exit 1
cd $ORIGDIR || exit $?

$srcdir/configure --enable-maintainer-mode "$@"
49 changes: 49 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#
# Copyright (c) 2010 Petr Stetiar <[email protected]>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#

AC_PREREQ([2.57])
AC_INIT(xinput_calibrator,[0.5.0], [http://github.com/tias/xinput_calibrator])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE

AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL

AC_ARG_ENABLE([gtkmm], AS_HELP_STRING([--enable-gtkmm], [Enable GTKMM GUI]))
AS_IF([test "x$enable_gtkmm" = "xyes"], [
PKG_CHECK_MODULES(GTKMM, [gtkmm-2.4])
AC_SUBST(GTKMM_CFLAGS)
AC_SUBST(GTKMM_LIBS)
])

AM_CONDITIONAL([BUILD_GTKMM], [test "x$enable_gtkmm" = "xyes"])

PKG_CHECK_MODULES(XORG, [x11 xi])
AC_SUBST(XORG_CFLAGS)
AC_SUBST(XORG_LIBS)

AC_CONFIG_FILES(Makefile)
AC_OUTPUT

0 comments on commit 754d23d

Please sign in to comment.