blob: 0d5f78929aea72b0be7d621c651914bd0aa5a186 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/bin/sh
pthreads_root=/usr/local/pthreads
build_root=/dr1/my/masters/mysql/mit-pthreads
src_root=/dr1/my/masters/mysql/mit-pthreads
include_dir='-I$pthreads_root/include'
lib_dir='-L$pthreads_root/lib'
libs='-lpthread -lm -lgcc -lpthread'
# Might be a good idea to also provide a way to override pthreads_root
# so that we can use this script in the build tree, before installation.
if arg="$1" ; then
case $arg in
-notinstalled)
include_dir='-I$build_root/include -I$src_root/include'
lib_dir='-L$build_root/obj'
shift
;;
esac
fi
for arg in "$@" ; do
case $arg in
-nostdinc) include_dir= ;;
-nostdlib | -c) libs= ;;
esac
done
# Include the -L option in any case, just in case the user provided the
# names of some libraries we've built threaded versions of.
eval exec g++ '"$@"' $include_dir $lib_dir $libs
|