~ubuntu-branches/ubuntu/raring/babel/raring-proposed

« back to all changes in this revision

Viewing changes to runtime/m4/llnl_sort_flibs.m4

  • Committer: Bazaar Package Importer
  • Author(s): Adam C. Powell, IV
  • Date: 2008-08-01 07:56:58 UTC
  • mfrom: (3.1.2 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080801075658-9ezcrbh8dcs8lg70
Tags: 1.2.0.dfsg-6
Added libparsifal-dev as dependency to libsidl-dev (closes: #483324).

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
dnl
16
16
AC_DEFUN([LLNL_SORT_FLIBS],
17
17
[AC_REQUIRE([LLNL_F77_LIBRARY_LDFLAGS])dnl
 
18
AC_MSG_CHECKING([form of Fortran 77 library flags])
18
19
flibs1=
19
20
flibs2=
20
21
for arg in $FLIBS; do
24
25
    -l*)
25
26
      arg2=$arg
26
27
      ;;
 
28
    -L*)
 
29
      dir1=`echo $ECHO_N $arg | sed -e 's/^-L//'`
 
30
      if test -n "$dir1" -a -d "$dir1" ; then
 
31
        dir1ac=`cd "$dir1" && pwd`
 
32
        if test -n "$dir1ac" -a "$dir1ac" != '/usr/lib' -a "$dir1ac" != '/lib' -a "$dir1ac" != '/usr/lib64' -a "$dir1ac" != '/lib64' ; then
 
33
          arg1=-L$dir1
 
34
        fi
 
35
      fi
 
36
      ;;
27
37
    /*.a)
28
 
      arg1=-L`dirname $arg`
 
38
      dir1=`dirname $arg`
 
39
      if test -n "$dir1" -a -d "$dir1" ; then
 
40
        dir1ac=`cd "$dir1" && pwd`
 
41
        if test -n "$dir1ac" -a "$dir1ac" != '/usr/lib' -a "$dir1ac" != '/lib' -a "$dir1ac" != '/usr/lib64' -a "$dir1ac" != '/lib64' ; then
 
42
          arg1=-L$dir1
 
43
        fi
 
44
      fi
29
45
      arg2=`basename $arg .a`
30
 
      arg2=`echo -n $arg2 | sed -e 's/^lib/-l/'`
 
46
      arg2=`echo $ECHO_N $arg2 | sed -e 's/^lib/-l/'`
31
47
      ;;
32
48
    /*.so)
33
 
      arg1=-L`dirname $arg`
 
49
      dir1=`dirname $arg`
 
50
      if test -n "$dir1" -a -d "$dir1" ; then
 
51
        dir1ac=`cd "$dir1" && pwd`
 
52
        if test -n "$dir1ac" -a "$dir1ac" != '/usr/lib' -a "$dir1ac" != '/lib' -a "$dir1ac" != '/usr/lib64' -a "$dir1ac" != '/lib64' ; then
 
53
          arg1=-L$dir1
 
54
        fi
 
55
      fi
34
56
      arg2=`basename $arg .so`
35
 
      arg2=`echo -n $arg2 | sed -e 's/^lib/-l/'`
 
57
      arg2=`echo $ECHO_N $arg2 | sed -e 's/^lib/-l/'`
36
58
      ;;
37
59
    *)
38
60
      arg1=$arg
41
63
  if test -n "$arg1"; then
42
64
    exists=false
43
65
    for f in $flibs1; do
44
 
      if test x$arg1 = x$f; then 
 
66
      if test "x$arg1" = "x$f"; then 
45
67
        exists=true
46
68
      fi
47
69
    done
48
 
    if $exists; then
 
70
    if test "$exists" = true; then
49
71
      :
50
72
    else
51
73
      flibs1="$flibs1 $arg1"
54
76
  if test -n "$arg2"; then
55
77
    exists=false
56
78
    for f in $flibs2; do
57
 
      if test x$arg2 = x$f; then 
 
79
      if test "x$arg2" = "x$f"; then 
58
80
        exists=true
59
81
      fi
60
82
    done
61
 
    if $exists; then
 
83
    if test "$exists" = true; then
62
84
      :
63
85
    else
64
86
      flibs2="$flibs2 $arg2"
67
89
done
68
90
FLIBS="$flibs1 $flibs2"
69
91
AC_SUBST(FLIBS)
 
92
AC_MSG_RESULT($FLIBS)
70
93
])