Skip to content

Commit

Permalink
tidying up the build system
Browse files Browse the repository at this point in the history
  • Loading branch information
public committed Dec 19, 2011
1 parent e7e856b commit 7c7de6c
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 8 deletions.
26 changes: 23 additions & 3 deletions bootstrap.sh
Expand Up @@ -3,18 +3,38 @@
set -e
set -x

PREFIX=$(readlink -f build-env)

git submodule sync
git submodule update

cd boost.m4
./bootstrap
./configure
./configure --prefix="$PREFIX"
make
make install

cd ../jansson
autoreconf -fvi
./configure
./configure --prefix="$PREFIX"
make
make install

cd ../
hg clone https://code.google.com/p/pagedown/ || (cd pagedown && hg pull && hg update && cd ../)

wget http://freefr.dl.sourceforge.net/project/threadpool/threadpool/0.2.5%20%28Stable%29/threadpool-0_2_5-src.zip
unzip threadpool-0_2_5-src.zip
cd threadpool
cp -vR boost "$PREFIX/include"
cd ../
hg clone https://code.google.com/p/pagedown/

wget https://www.openssl.org/source/openssl-0.9.8r.tar.gz
tar -zxvf openssl-0.9.8r.tar.gz
cd ../openssl-0.9.8r
./config --prefix="$PREFIX" threads shared static zlib-dynamic
make
make test
make install


5 changes: 4 additions & 1 deletion raas/Makefile.am
Expand Up @@ -8,10 +8,11 @@ AM_CFLAGS = $(WIN32_CFLAGS) $(DEPS_CFLAGS) -g \

BOOST_LDFLAGS_ALL = $(BOOST_THREAD_LDFLAGS) \
$(BOOST_FILESYSTEM_LDFLAGS) \
$(BOOST_BIND_LDFLAGS) \
$(BOOST_SYSTEM_LDFLAGS) $(BOOST_REGEX_LDFLAGS) \
$(BOOST_STRING_ALGO_LDFLAGS)

AM_CPPFLAGS = $(AM_CFLAGS) $(BOOST_CPPFLAGS) -I../threadpool
AM_CPPFLAGS = $(AM_CFLAGS) $(BOOST_CPPFLAGS)
AM_LDFLAGS = $(BOOST_LDFLAGS_ALL) -Wl,--gc-sections

if BUILD_WIN32
Expand All @@ -23,6 +24,7 @@ bin_PROGRAMS = raas
raas_SOURCES = src/raas.cc \
src/raas_openssl_win32_applink.c \
src/notifytxt.cc \
src/http_errors.cc \
src/entrypoints/friends.cc \
src/entrypoints/chat.cc \
src/entrypoints/file_share.cc \
Expand All @@ -38,6 +40,7 @@ LIBS += $(DHT_LIBS) \
$(BOOST_FILESYSTEM_LIBS) \
$(BOOST_SYSTEM_LIBS) \
$(BOOST_REGEX_LIBS) \
$(BOOST_BIND_LIBS) \
$(BOOST_STRING_ALGO_LIBS) \
$(WIN32_LIBS) \
-lstdc++
14 changes: 10 additions & 4 deletions raas/configure.ac
Expand Up @@ -22,15 +22,20 @@ AC_TRY_COMPILE(,
)
AM_CONDITIONAL(BUILD_WIN32, test x$BUILD_WIN32 = xtrue)

# the PKG_CONFIG_PATH export seems to lead to pkg.m4 not being able
# to actually find pkg-config so we explicitly set a path for it
# this has the unfortuante side effect of overriding the external
# env value :(
PKG_CONFIG=$(which pkg-config)
if test x$BUILD_WIN32 = xtrue; then
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH;./pkgconfig-mingw"
PKG_CHECK_MODULES([DEPS], [openssl, QtCore >= 4, libminiupnpc,
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH;./pkgconfig-mingw;../build-env/lib/pkgconfig"
PKG_CHECK_MODULES([DEPS], [openssl = 0.9.8r, QtCore >= 4, libminiupnpc,
libevent, libgpgme, libgpg-error,
libretroshare, libbitdht
jansson, gio-2.0])
else
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:./pkgconfig-default"
PKG_CHECK_MODULES([DEPS], [openssl, QtCore >= 4, libminiupnpc,
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:./pkgconfig-default:../build-env/lib/pkgconfig"
PKG_CHECK_MODULES([DEPS], [openssl = 0.9.8r, QtCore >= 4, libminiupnpc,
libevent, libevent_pthreads,
libretroshare, libbitdht, libgpgme, libgpg-error,
jansson, gio-2.0])
Expand All @@ -41,6 +46,7 @@ BOOST_SYSTEM
BOOST_FILESYSTEM
BOOST_THREADS
BOOST_REGEX
BOOST_BIND
BOOST_STRING_ALGO

AC_OUTPUT
11 changes: 11 additions & 0 deletions raas/pkgconfig-default/libcrypto.pc
@@ -0,0 +1,11 @@
prefix=/home/alexs/code/retroshare/rsweb/openssl-0.9.8r
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: OpenSSL-libcrypto
Description: OpenSSL cryptography library
Version: 0.9.8r
Requires:
Libs: -L${libdir} -lcrypto -ldl -lz
Cflags: -I${includedir}
11 changes: 11 additions & 0 deletions raas/pkgconfig-default/libssl.pc
@@ -0,0 +1,11 @@
prefix=/home/alexs/code/retroshare/rsweb/openssl-0.9.8r
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: OpenSSL
Description: Secure Sockets Layer and cryptography libraries
Version: 0.9.8r
Requires:
Libs: -L${libdir} -lssl -lcrypto -ldl -lz
Cflags: -I${includedir}
11 changes: 11 additions & 0 deletions raas/pkgconfig-mingw/libcrypto.pc
@@ -0,0 +1,11 @@
prefix=/home/alexs/code/retroshare/rsweb/openssl-0.9.8r
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: OpenSSL-libcrypto
Description: OpenSSL cryptography library
Version: 0.9.8r
Requires:
Libs: -L${libdir} -lcrypto -ldl -lz
Cflags: -I${includedir}
11 changes: 11 additions & 0 deletions raas/pkgconfig-mingw/libssl.pc
@@ -0,0 +1,11 @@
prefix=/home/alexs/code/retroshare/rsweb/openssl-0.9.8r
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: OpenSSL
Description: Secure Sockets Layer and cryptography libraries
Version: 0.9.8r
Requires:
Libs: -L${libdir} -lssl -lcrypto -ldl -lz
Cflags: -I${includedir}

0 comments on commit 7c7de6c

Please sign in to comment.