Changeset - ddb8d81ce0aa
[Not reviewed]
default
0 5 1
Nathan Brink (binki) - 16 years ago 2009-12-06 17:56:47
ohnobinki@ohnopublishing.net
separate LDADD and LDFLAGS using PKGCONFIG_OHNOWRAP
6 files changed with 57 insertions and 10 deletions:
0 comments (0 inline, 0 general)
Makefile.am
Show inline comments
 
SUBDIRS = src etc
 

	
 
ACLOCAL_AMFLAGS = -I m4
configure.ac
Show inline comments
 
# Copyright 2008 Nathan Phillip Brink, Ethan Zonca
 
# Copyright 2009 Nathan Phillip Brink, Ethan Zonca
 
#
 
# This file is a part of DistRen.
 
#
 
# Distren is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU Affero General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
@@ -15,12 +15,13 @@
 
# You should have received a copy of the GNU Affero General Public License
 
# along with DistRen.  If not, see <http://www.gnu.org/licenses/>.
 

	
 
AC_PREREQ(2.61)
 
AC_INIT([distren],[0.0],[http://bugs.ohnopub.net/])
 
AC_CONFIG_SRCDIR([src/server/distrend.c])
 
AC_CONFIG_MACRO_DIR([m4])
 

	
 
AC_PROG_CC
 
AC_PROG_LIBTOOL
 
#AC_PROG_RANLIB #don't add this even if autoscan says to, because AC_PROG_LIBTOOL is enough
 

	
 
AM_INIT_AUTOMAKE
 
@@ -51,14 +52,16 @@ AC_TYPE_SIZE_T
 
AC_DEFINE([_GNU_SOURCE], [1])
 

	
 
#package dependencies:
 

	
 
PKG_PROG_PKG_CONFIG(0.17.2)
 

	
 
PKG_CHECK_MODULES(DISTLIBS, libconfuse >= 2.5 libcurl libxml-2.0)
 
PKG_CHECK_MODULES([CHECK], [check >= 0.9.3])
 

	
 
PKGCONFIG_OHNOWRAP([DISTLIBS], [libconfuse >= 2.5 libcurl libxml-2.0])
 

	
 
PKGCONFIG_OHNOWRAP([CHECK], [check >= 0.9.3])
 

	
 
AC_DEFINE_DIR([SYSCONFDIR], [sysconfdir], [Directory to find configuration files in])
 
AC_DEFINE_DIR([LOCALSTATEDIR], [localstatedir], [Directory in which the server or client may store its state files and data])
 
AC_DEFINE_DIR([RUNSTATEDIR], [localstatedir/run], [Directory where PID files are stored])
 

	
 
AC_CONFIG_FILES([Makefile
m4/pkgconfig_ohnowrap.m4
Show inline comments
 
new file 100644
 
# Copyright 2009 Nathan Phillip Brink <ohnobinki@ohnopublishing.net>
 
#
 
# This file is a part of DistRen.
 
#
 
# Distren is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU Affero General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
# (at your option) any later version.
 
#
 
# DistRen is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU Affero General Public License for more details.
 
#
 
# You should have received a copy of the GNU Affero General Public License
 
# along with DistRen.  If not, see <http://www.gnu.org/licenses/>.
 
#
 

	
 
# PKGCONFIG_OHNOWRAP(VARIABLE-PREFIX, MODULES)
 
# see bug 13912 on freedesktop's bugzilla
 
# $1 is the var to store stuff in
 
# $2 is the listing of modules to pass to PKG_CHECK_MODULES
 
#
 
# Original code derived from and depending on pkg.m4 distributed with dev-util/pkgconfig-0.23
 
# which is Copyright (c) 2004 Scott James Remnant <scott@netsplit.com>
 
#
 
AC_DEFUN([PKGCONFIG_OHNOWRAP],
 
[dnl
 
AC_ARG_VAR([$1][_LDADD],[Linker names of libraries to link to for $1])dnl
 
AC_ARG_VAR([$1][_LDFLAGS],[Linker flags for linking to libraries for $1])dnl
 

	
 
PKG_CHECK_MODULES([$1], [$2])
 

	
 
_PKG_CONFIG([$1][_LDADD], [libs-only], [$2])
 
_PKG_CONFIG([$1][_LDFLAGS], [libs-only-other], [$2])
 

	
 
$1[]_LDADD=$pkg_cv_[]$1[]_LDADD
 
$1[]_LDFLAGS=$pkg_cv_[]$1[]_LDFLAGS
 
])
src/client/Makefile.am
Show inline comments
 
bin_PROGRAMS = distren
 
distren_SOURCES = distren.c
 
distren_LDADD = @DISTLIBS_LIBS@libdistren.la
 
distren_LDADD = @DISTLIBS_LDADD@ libdistren.la
 
distren_LDFLAGS = @DISTLIBS_LDFLAGS@
 
distren_CFLAGS = @DISTLIBS_CFLAGS@
 

	
 

	
 
include_HEADERS = distren.h
 

	
 
#see http://sources.redhat.com/autobook/autobook/autobook_106.html#SEC106
 
#libdistren:
 

	
 
lib_LTLIBRARIES = libdistren.la
 

	
 
libdistren_la_SOURCES = distren.h libdistren.h libdistren.c libdistren_job.c libdistren_unbias.c libdistren_config.c
 
#evidently the following should not be LDADD, but LDFLAGS because automake doesn't like the idea of LDADD for libraries for some reason... or I am very confused
 
libdistren_la_LIBADD = @DISTLIBS_LIBS@ @top_builddir@/src/common/libdistrencommon.la
 
libdistren_la_LIBADD = @DISTLIBS_LDADD@ @top_builddir@/src/common/libdistrencommon.la
 
libdistren_la_CFLAGS = @DISTLIBS_CFLAGS@ -I@top_srcdir@/src/common
 

	
 
#see http://sources.redhat.com/autobook/autobook/autobook_91.html
 
# either increase the revision number or the interface number each release!
 
libdistren_la_LDFLAGS = -version-info 0:0:0
 
libdistren_la_LDFLAGS = @DISTLIBS_LDFLAGS@ -version-info 0:0:0
src/common/Makefile.am
Show inline comments
 
pkglib_LTLIBRARIES = libdistrencommon.la
 

	
 
libdistrencommon_la_SOURCES = options.c options.h execio.h execio.c remoteio.h libremoteio.h remoteio.c asprintf.h asprintf.c
 
#evidently the following should not be LDADD, but LDFLAGS because automake doesn't like the idea of LDADD for libraries for some reason... or I am very confused
 
libdistrencommon_la_LIBADD = @DISTLIBS_LIBS@
 
libdistrencommon_la_LIBADD = @DISTLIBS_LDADD@
 
libdistrencommon_la_CXXFLAGS = @DISTLIBS_CFLAGS@
 

	
 
#see http://sources.redhat.com/autobook/autobook/autobook_91.html
 
# either increase the revision number or the interface number each release!
 
libdistrencommon_la_LDFLAGS = -version-info 0:0:0
 
libdistrencommon_la_LDFLAGS = @DISTLIBS_LDFLAGS@ -version-info 0:0:0
src/server/Makefile.am
Show inline comments
 
COMMON_SOURCES =  slavefuncs.c slavefuncs.h distrenjob.c distrenjob.h
 

	
 
bin_PROGRAMS = distrend distrenslave
 
distrend_SOURCES = distrend.c distrend.h ${COMMON_SOURCES} user_mgr.c user_mgr.h listen.h listen.c
 
distrend_LDADD = @DISTLIBS_LIBS@ @top_builddir@/src/common/libdistrencommon.la @LIST_LIBS@
 
distrend_LDADD = @top_builddir@/src/common/libdistrencommon.la @DISTLIBS_LDADD@ @LIST_LIBS@
 
distrend_LDFLAGS = @DISTLIBS_LDFLAGS@
 
distrend_CFLAGS = @DISTLIBS_CFLAGS@ -I@top_srcdir@/src/common
 

	
 
distrenslave_SOURCES = slave.c ${COMMON_SOURCES}
 
distrenslave_LDADD = @DISTLIBS_LIBS@ @top_builddir@/src/common/libdistrencommon.la
 
distrenslave_LDADD = @DISTLIBS_LDADD@ @top_builddir@/src/common/libdistrencommon.la
 
distrenslave_LDFLAGS = @DISTLIBS_LDFLAGS@
 
distrenslave_CFLAGS = @DISTLIBS_CFLAGS@ -I@top_srcdir@/src/common
0 comments (0 inline, 0 general)