From 43519250f532bfeb8c73de5c4efe45af1f9c7b1e Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Sun, 19 Jun 2011 12:07:15 -0400 Subject: [PATCH] build: Use typical LD naming convention for libck.so. This was necessary in order to package CK with some distributions. --- Makefile.in | 10 +++++++--- build/ck.pc.in | 2 +- configure | 22 +++++++++++++--------- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/Makefile.in b/Makefile.in index 73b9d74..25c1220 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,6 +1,8 @@ .PHONY: all clean distribution regressions install CFLAGS=@CFLAGS@ +VERSION=@VERSION@ +VERSION_MAJOR=@VERSION_MAJOR@ PREFIX=@PREFIX@ LIBRARY=@LIBRARY@ HEADERS=@HEADERS@ @@ -19,8 +21,10 @@ regressions: install: all mkdir -p $(LIBRARY) || exit mkdir -p $(HEADERS) || exit - cp src/libck* $(LIBRARY) || exit - chmod 744 $(LIBRARY)/libck* || exit + cp src/libck.so $(LIBRARY)/libck.so.$(VERSION) || exit + ln -s $(LIBRARY)/libck.so $(LIBRARY)/libck.so.$(VERSION) + ln -s $(LIBRARY)/libck.so.$(VERSION_MAJOR) $(LIBRARY)/libck.so.$(VERSION) + chmod 744 $(LIBRARY)/libck.so* || exit cp include/*.h $(HEADERS) || exit chmod 644 $(HEADERS)/ck_*.h || exit mkdir -p $(HEADERS)/gcc || exit @@ -32,7 +36,7 @@ install: all cp build/ck.pc $(PKGCONFIG_DATA)/ck.pc || exit uninstall: - rm -f $(LIBRARY)/libck* + rm -f $(LIBRARY)/libck.so* rm -f $(HEADERS)/ck_*.h rm -f $(HEADERS)/gcc/ck_*.h rm -f $(HEADERS)/gcc/*/ck_*.h diff --git a/build/ck.pc.in b/build/ck.pc.in index e60c473..8a34435 100644 --- a/build/ck.pc.in +++ b/build/ck.pc.in @@ -5,6 +5,6 @@ libdir=@LIBRARY@ Name: Concurrency Kit Description: Toolkit for well-specified design and implementation of concurrent systems URL: http://www.concurrencykit.org/ -Version: 0.1.0 +Version: @VERSION@ Libs: -L${libdir} -lck Cflags: -D__@PROFILE@__ -I${includedir} diff --git a/configure b/configure index 606635d..961bcb1 100755 --- a/configure +++ b/configure @@ -33,6 +33,8 @@ EXIT_SUCCESS=0 EXIT_FAILURE=1 MAINTAINER='sbahra@repnop.org' +VERSION='0.1.0' +VERSION_MAJOR='0' BUILD="$PWD/build/ck.build" PREFIX=${PREFIX:-"/usr/local"} @@ -76,15 +78,17 @@ assert() generate() { - sed -e "s#@PROFILE@#$PROFILE#g" \ - -e "s#@CC@#$CC#g" \ - -e "s#@CFLAGS@#$CFLAGS#g" \ - -e "s#@HEADERS@#$HEADERS#g" \ - -e "s#@LIBRARY@#$LIBRARY#g" \ - -e "s#@PREFIX@#$PREFIX#g" \ - -e "s#@LD@#$LD#g" \ - -e "s#@LDFLAGS@#$LDFLAGS#g" \ - -e "s#@PTHREAD_CFLAGS@#$PTHREAD_CFLAGS#g" \ + sed -e "s#@PROFILE@#$PROFILE#g" \ + -e "s#@VERSION@#$VERSION#g" \ + -e "s#@VERSION_MAJOR@#$VERSION_MAJOR#g" \ + -e "s#@CC@#$CC#g" \ + -e "s#@CFLAGS@#$CFLAGS#g" \ + -e "s#@HEADERS@#$HEADERS#g" \ + -e "s#@LIBRARY@#$LIBRARY#g" \ + -e "s#@PREFIX@#$PREFIX#g" \ + -e "s#@LD@#$LD#g" \ + -e "s#@LDFLAGS@#$LDFLAGS#g" \ + -e "s#@PTHREAD_CFLAGS@#$PTHREAD_CFLAGS#g" \ $1 > $2 }