Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

build: Add a minimal configure.ac #9

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.libs/
autom4te.cache/
aclocal.m4
config.log
config.status
config.sub
configure
config.guess
libtool
ltmain.sh
Makefile
*.la
*.lo
*.o

demo
demo-async
demo-glib
man/termkey_getkey.3
man/termkey_waitkey.3
termkey.h
29 changes: 15 additions & 14 deletions Makefile → Makefile.in
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
pkgconfig = $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config $(1))

ifeq ($(shell uname),Darwin)
LIBTOOL ?= glibtool
else
LIBTOOL ?= libtool
endif
CC = @CC@
LIBTOOL = @LIBTOOL@

ifneq ($(VERBOSE),1)
LIBTOOL +=--quiet
endif
override CFLAGS = @CFLAGS@
override LDFLAGS = @LDFLAGS@

override CFLAGS +=-Wall -std=c99

Expand Down Expand Up @@ -48,19 +44,24 @@ DEMO_OBJECTS=$(DEMOS:=.lo)
TESTSOURCES=$(wildcard t/[0-9]*.c)
TESTFILES=$(TESTSOURCES:.c=.t)

VERSION_MAJOR=0
VERSION_MINOR=23
VERSION_MAJOR=@MAJOR@
VERSION_MINOR=@MINOR@

VERSION=$(VERSION_MAJOR).$(VERSION_MINOR)

VERSION_CURRENT=15
VERSION_REVISION=3
VERSION_AGE=14

PREFIX=/usr/local
LIBDIR=$(PREFIX)/lib
INCDIR=$(PREFIX)/include
MANDIR=$(PREFIX)/share/man
top_builddir=@top_builddir@

prefix=@prefix@
exec_prefix=@exec_prefix@
datarootdir=@datarootdir@
datadir=@datadir@
LIBDIR=@libdir@
INCDIR=@includedir@
MANDIR=@mandir@
MAN3DIR=$(MANDIR)/man3
MAN7DIR=$(MANDIR)/man7

Expand Down
14 changes: 14 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
m4_define([MAJOR], [0])
m4_define([MINOR], [23])

AC_INIT([libtermkey], [MAJOR.MINOR])
AC_CONFIG_FILES([Makefile])

LT_INIT

AC_SUBST([top_builddir], [$abs_builddir])

AC_SUBST([MAJOR], [MAJOR])
AC_SUBST([MINOR], [MINOR])

AC_OUTPUT