summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authoreihrul <eihrul>2010-05-13 17:31:45 +0000
committereihrul <eihrul>2010-05-13 17:31:45 +0000
commit0456e849d675aeecda75d93082cfd3943ddd5aa3 (patch)
tree731a257b519507fe2ee8ac991c97d93ad00844e1
parentf72b0300f69cdcf25b380392b78b065117afad47 (diff)
downloadenet-0456e849d675aeecda75d93082cfd3943ddd5aa3.tar.gz
enet-0456e849d675aeecda75d93082cfd3943ddd5aa3.zip
WIP build system cleanups by Nathan Phillip Brink
-rw-r--r--Makefile.am23
-rw-r--r--configure.ac (renamed from configure.in)14
-rw-r--r--include/Makefile.am1
-rw-r--r--include/enet/Makefile.am12
-rw-r--r--libenet.pc.in10
5 files changed, 39 insertions, 21 deletions
diff --git a/Makefile.am b/Makefile.am
index dc86fde..a96f350 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,22 @@
-lib_LIBRARIES = libenet.a
-libenet_a_SOURCES = host.c list.c callbacks.c packet.c peer.c protocol.c unix.c win32.c
+pkgconfigdir = $(libdir)/pkgconfig
+nodist_pkgconfig_DATA = libenet.pc
+
+enetincludedir=$(includedir)/enet
+enetinclude_HEADERS = \
+ include/enet/callbacks.h \
+ include/enet/enet.h \
+ include/enet/list.h \
+ include/enet/protocol.h \
+ include/enet/time.h \
+ include/enet/types.h \
+ include/enet/unix.h \
+ include/enet/utility.h \
+ include/enet/win32.h
+
+lib_LTLIBRARIES = libenet.la
+libenet_la_SOURCES = host.c list.c callbacks.c packet.c peer.c protocol.c unix.c win32.c
+# see info '(libtool) Updating version info' before making a release
+libenet_la_LDFLAGS = $(AM_LDFLAGS) -version-info 0:0:0
INCLUDES = -Iinclude
-SUBDIRS = include
+ACLOCAL_AMFLAGS = -Im4
diff --git a/configure.in b/configure.ac
index 62fb265..a923fbc 100644
--- a/configure.in
+++ b/configure.ac
@@ -1,8 +1,11 @@
-AC_INIT(libenet, 11-12-2009)
-AM_INIT_AUTOMAKE(libenet.a, 11-12-2009)
+AC_INIT([libenet], [5-13-2010])
+AC_CONFIG_SRCDIR([include/enet/enet.h])
+AM_INIT_AUTOMAKE([foreign])
+
+AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CC
-AC_PROG_RANLIB
+AC_PROG_LIBTOOL
AC_CHECK_FUNC(gethostbyaddr_r, [AC_DEFINE(HAS_GETHOSTBYADDR_R)])
AC_CHECK_FUNC(gethostbyname_r, [AC_DEFINE(HAS_GETHOSTBYNAME_R)])
@@ -32,5 +35,6 @@ AC_ARG_ENABLE(crc32,
fi],
[AC_MSG_RESULT(no)])
-AC_OUTPUT([Makefile include/Makefile include/enet/Makefile])
-
+AC_CONFIG_FILES([Makefile
+ libenet.pc])
+AC_OUTPUT
diff --git a/include/Makefile.am b/include/Makefile.am
deleted file mode 100644
index 182de41..0000000
--- a/include/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = enet
diff --git a/include/enet/Makefile.am b/include/enet/Makefile.am
deleted file mode 100644
index acefcd1..0000000
--- a/include/enet/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-libenetincludedir = $(includedir)/enet
-libenetinclude_HEADERS = \
- types.h \
- list.h \
- utility.h \
- time.h \
- callbacks.h \
- unix.h \
- win32.h \
- protocol.h \
- enet.h
-
diff --git a/libenet.pc.in b/libenet.pc.in
new file mode 100644
index 0000000..7af85ad
--- /dev/null
+++ b/libenet.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: @PACKAGE_NAME@
+Description: Low-latency UDP networking library supporting optional reliability
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lenet