Build environment autoconf; gitignore; (both taken from user Stazed on github with some modifications)
This commit is contained in:
parent
ddd9cddc4a
commit
32fba4955c
21
.gitignore
vendored
Normal file
21
.gitignore
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
*.[oa]
|
||||||
|
Makefile.in
|
||||||
|
Makefile
|
||||||
|
config.h
|
||||||
|
/build
|
||||||
|
/man/Makefile.in
|
||||||
|
/pixmaps/Makefile.in
|
||||||
|
/src/Makefile.in
|
||||||
|
/src/.deps/
|
||||||
|
/src/jack-keyboard
|
||||||
|
stamp-h1
|
||||||
|
config.h.in
|
||||||
|
config.log
|
||||||
|
config.status
|
||||||
|
configure
|
||||||
|
depcomp
|
||||||
|
install-sh
|
||||||
|
missing
|
||||||
|
aclocal.m4
|
||||||
|
autom4te.cache
|
||||||
|
compile
|
48
Makefile
48
Makefile
@ -1,48 +0,0 @@
|
|||||||
VERSION?=2.7.2
|
|
||||||
|
|
||||||
help:
|
|
||||||
@echo "Targets: configure all clean install package"
|
|
||||||
|
|
||||||
configure:
|
|
||||||
|
|
||||||
rm -rf build
|
|
||||||
|
|
||||||
mkdir build
|
|
||||||
|
|
||||||
cd build ; cmake ..
|
|
||||||
|
|
||||||
all:
|
|
||||||
make -C build all
|
|
||||||
|
|
||||||
install:
|
|
||||||
make -C build install
|
|
||||||
|
|
||||||
clean:
|
|
||||||
make -C build clean
|
|
||||||
|
|
||||||
package:
|
|
||||||
make -C build clean || echo -n
|
|
||||||
|
|
||||||
tar -cvf temp.tar --exclude="*~" --exclude="*#" \
|
|
||||||
--exclude=".svn" --exclude="*.orig" --exclude="*.rej" \
|
|
||||||
AUTHORS \
|
|
||||||
CMakeLists.txt \
|
|
||||||
COPYING \
|
|
||||||
Makefile \
|
|
||||||
NEWS \
|
|
||||||
README \
|
|
||||||
TODO \
|
|
||||||
cmake \
|
|
||||||
man \
|
|
||||||
pixmaps \
|
|
||||||
src
|
|
||||||
|
|
||||||
rm -rf jack-keyboard-${VERSION}
|
|
||||||
|
|
||||||
mkdir jack-keyboard-${VERSION}
|
|
||||||
|
|
||||||
tar -xvf temp.tar -C jack-keyboard-${VERSION}
|
|
||||||
|
|
||||||
rm -rf temp.tar
|
|
||||||
|
|
||||||
tar -zcvf jack-keyboard-${VERSION}.tar.gz jack-keyboard-${VERSION}
|
|
2
Makefile.am
Normal file
2
Makefile.am
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
SUBDIRS = src man pixmaps
|
||||||
|
|
81
configure.ac
Normal file
81
configure.ac
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
# -*- Autoconf -*-
|
||||||
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
|
AC_PREREQ(2.61)
|
||||||
|
AC_INIT([jack-keyboard], [2.5], [trasz@FreeBSD.org])
|
||||||
|
AM_INIT_AUTOMAKE([-Wall foreign])
|
||||||
|
AC_CONFIG_SRCDIR([config.h.in])
|
||||||
|
AC_CONFIG_HEADERS([config.h])
|
||||||
|
|
||||||
|
# Checks for programs.
|
||||||
|
AC_PROG_CC
|
||||||
|
|
||||||
|
# Checks for libraries.
|
||||||
|
|
||||||
|
# Checks for header files.
|
||||||
|
AC_HEADER_STDC
|
||||||
|
AC_CHECK_HEADERS([stdlib.h string.h sys/time.h unistd.h])
|
||||||
|
|
||||||
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
AC_C_CONST
|
||||||
|
AC_HEADER_TIME
|
||||||
|
AC_C_VOLATILE
|
||||||
|
|
||||||
|
# Checks for library functions.
|
||||||
|
AC_FUNC_MALLOC
|
||||||
|
AC_FUNC_STRTOD
|
||||||
|
AC_CHECK_FUNCS([gettimeofday memset strcasecmp strdup])
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.2)
|
||||||
|
AC_SUBST(GTK_CFLAGS)
|
||||||
|
AC_SUBST(GTK_LIBS)
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.2)
|
||||||
|
AC_SUBST(GLIB_CFLAGS)
|
||||||
|
AC_SUBST(GLIB_LIBS)
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.2)
|
||||||
|
AC_SUBST(GTHREAD_CFLAGS)
|
||||||
|
AC_SUBST(GTHREAD_LIBS)
|
||||||
|
|
||||||
|
AC_ARG_WITH([x11],
|
||||||
|
[AS_HELP_STRING([--with-x11],
|
||||||
|
[support keyboard grabbing @<:@default=check@:>@])],
|
||||||
|
[],
|
||||||
|
[with_x11=check])
|
||||||
|
|
||||||
|
AS_IF([test "x$with_x11" != xno],
|
||||||
|
[PKG_CHECK_MODULES(X11, x11, AC_DEFINE([HAVE_X11], [], [Defined if we have X11 support.]),
|
||||||
|
[if test "x$with_x11" != xcheck; then
|
||||||
|
AC_MSG_FAILURE([--with-x11 was given, but x11 was not found])
|
||||||
|
fi
|
||||||
|
])])
|
||||||
|
|
||||||
|
AC_SUBST(X11_CFLAGS)
|
||||||
|
AC_SUBST(X11_LIBS)
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES(JACK, jack >= 0.102.0)
|
||||||
|
AC_SUBST(JACK_CFLAGS)
|
||||||
|
AC_SUBST(JACK_LIBS)
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES(JACK_MIDI_NEEDS_NFRAMES, jack < 0.105.00, AC_DEFINE(JACK_MIDI_NEEDS_NFRAMES, 1, [whether or not JACK routines need nframes parameter]), true)
|
||||||
|
|
||||||
|
AC_ARG_WITH([lash],
|
||||||
|
[AS_HELP_STRING([--with-lash],
|
||||||
|
[support LASH @<:@default=check@:>@])],
|
||||||
|
[],
|
||||||
|
[with_lash=check])
|
||||||
|
|
||||||
|
AS_IF([test "x$with_lash" != xno],
|
||||||
|
[PKG_CHECK_MODULES(LASH, lash-1.0, AC_DEFINE([HAVE_LASH], [], [Defined if we have LASH support.]),
|
||||||
|
[if test "x$with_lash" != xcheck; then
|
||||||
|
AC_MSG_FAILURE([--with-lash was given, but LASH was not found])
|
||||||
|
fi
|
||||||
|
])])
|
||||||
|
|
||||||
|
AC_SUBST(LASH_CFLAGS)
|
||||||
|
AC_SUBST(LASH_LIBS)
|
||||||
|
|
||||||
|
AC_CONFIG_FILES([Makefile src/Makefile man/Makefile pixmaps/Makefile])
|
||||||
|
AC_OUTPUT
|
||||||
|
|
4
man/Makefile.am
Normal file
4
man/Makefile.am
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
man_MANS = jack-keyboard.1
|
||||||
|
|
||||||
|
EXTRA_DIST = $(man_MANS)
|
||||||
|
|
17
pixmaps/Makefile.am
Normal file
17
pixmaps/Makefile.am
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
pixmapsdir = $(datadir)/pixmaps
|
||||||
|
pixmaps_DATA = jack-keyboard.png
|
||||||
|
EXTRA_DIST = $(pixmaps_DATA)
|
||||||
|
|
||||||
|
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
|
||||||
|
|
||||||
|
install-data-hook: update-icon-cache
|
||||||
|
uninstall-hook: update-icon-cache
|
||||||
|
update-icon-cache:
|
||||||
|
@-if test -z "$(DESTDIR)"; then \
|
||||||
|
echo "Updating Gtk icon cache."; \
|
||||||
|
$(gtk_update_icon_cache); \
|
||||||
|
else \
|
||||||
|
echo "*** Icon cache not updated. After (un)install, run this:"; \
|
||||||
|
echo "*** $(gtk_update_icon_cache)"; \
|
||||||
|
fi
|
||||||
|
|
10
src/Makefile.am
Normal file
10
src/Makefile.am
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
bin_PROGRAMS = jack-keyboard
|
||||||
|
jack_keyboard_SOURCES = jack-keyboard.c pianokeyboard.c pianokeyboard.h
|
||||||
|
jack_keyboard_LDADD = $(GTK_LIBS) $(GLIB_LIBS) $(GTHREAD_LIBS) $(X11_LIBS) $(JACK_LIBS) $(LASH_LIBS)
|
||||||
|
jack_keyboard_CFLAGS = $(GTK_CFLAGS) $(GLIB_CFLAGS) $(GTHREAD_CFLAGS) $(X11_CFLAGS) $(JACK_CFLAGS) $(LASH_CFLAGS) \
|
||||||
|
-DG_LOG_DOMAIN=\"jack-keyboard\"
|
||||||
|
|
||||||
|
desktopdir = $(datadir)/applications
|
||||||
|
desktop_DATA = jack-keyboard.desktop
|
||||||
|
EXTRA_DIST = $(desktop_DATA)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user