source: athstatic @ 8faab0c

barnowl_perlaimdebianrelease-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 8faab0c was 855dc8d, checked in by Nelson Elhage <nelhage@mit.edu>, 15 years ago
Not statically linking perl (This may or may not be the correct solution)
  • Property mode set to 100755
File size: 657 bytes
RevLine 
[601a9e0]1#!/bin/sh
2# $Id$
3
4# Usage: athstatic progname options ...
5
6# Replaces -lfoo options with /usr/athena/lib/libfoo.a if it exists,
7# thus preferring static libraries to shared libraries for stuff in
8# /usr/athena/lib.
9
10progname=$1
11shift
12
13options=
14for arg do
15  case $arg in
16  -l*)
17    # Chop off the first two characters to get the library name.
18    lib=`expr "$arg" : '..\(.*\)$'`
[855dc8d]19    if [ -f /usr/athena/lib/lib${lib}.a -a "$lib" != "perl" ]; then
[601a9e0]20      options="$options /usr/athena/lib/lib${lib}.a"
21    else
22      options="$options $arg"
23    fi
24    ;;
25  *)
26    options="$options $arg"
27    ;;
28  esac
29done
30
[d09e5a1]31echo "$progname" $options
[601a9e0]32exec "$progname" $options
Note: See TracBrowser for help on using the repository browser.