Update multimedia/libva to version 1.3.0
[dports.git] / lang / ocaml / dragonfly / patch-configure
1 --- configure.orig      2012-06-26 15:33:50.000000000 +0000
2 +++ configure
3 @@ -88,6 +88,8 @@ while : ; do
4          withcurses=no;;
5      -no-shared-libs|--no-shared-libs)
6          withsharedlibs=no;;
7 +    -no-x11|--no-x11)
8 +        x11_wanted=no;;
9      -x11include*|--x11include*)
10          x11_include_dir=$2; shift;;
11      -x11lib*|--x11lib*)
12 @@ -537,9 +539,9 @@ if test $withsharedlibs = "yes"; then
13        mksharedlib="$flexlink"
14        mkmaindll="$flexlink -maindll"
15        shared_libraries_supported=true;;
16 -    *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*)
17 +    *-*-linux-gnu|*-*-linux|*-*-dragonfly*|*-*-freebsd*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*)
18        sharedcccompopts="-fPIC"
19 -      mksharedlib="$bytecc -shared"
20 +      mksharedlib="$bytecc $bytecclinkopts -shared"
21        bytecclinkopts="$bytecclinkopts -Wl,-E"
22        byteccrpath="-Wl,-rpath,"
23        mksharedlibrpath="-Wl,-rpath,"
24 @@ -549,7 +551,7 @@ if test $withsharedlibs = "yes"; then
25        case "$bytecc" in
26          gcc*)
27            sharedcccompopts="-fPIC"
28 -          mksharedlib="$bytecc -shared"
29 +          mksharedlib="$bytecc $bytecclinkopts -shared"
30            byteccrpath="-Wl,-rpath,"
31            mksharedlibrpath="-Wl,-rpath,"
32            shared_libraries_supported=true;;
33 @@ -565,11 +567,11 @@ if test $withsharedlibs = "yes"; then
34          gcc*)
35            sharedcccompopts="-fPIC"
36            if sh ./solaris-ld; then
37 -            mksharedlib="$bytecc -shared"
38 +            mksharedlib="$bytecc $bytecclinkopts -shared"
39              byteccrpath="-R"
40              mksharedlibrpath="-R"
41            else
42 -            mksharedlib="$bytecc -shared"
43 +            mksharedlib="$bytecc $bytecclinkopts -shared"
44              bytecclinkopts="$bytecclinkopts -Wl,-E"
45              natdynlinkopts="-Wl,-E"
46              byteccrpath="-Wl,-rpath,"
47 @@ -593,12 +595,12 @@ if test $withsharedlibs = "yes"; then
48        mksharedlibrpath="-rpath "
49        shared_libraries_supported=true;;
50      i[3456]86-*-darwin[89].*)
51 -      mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress -read_only_relocs suppress"
52 +      mksharedlib="$bytecc $bytecclinkopts -bundle -flat_namespace -undefined suppress -read_only_relocs suppress"
53        bytecccompopts="$dl_defs $bytecccompopts"
54        dl_needs_underscore=false
55        shared_libraries_supported=true;;
56      *-apple-darwin*)
57 -      mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress"
58 +      mksharedlib="$bytecc $bytecclinkopts -bundle -flat_namespace -undefined suppress"
59        bytecccompopts="$dl_defs $bytecccompopts"
60        dl_needs_underscore=false
61        shared_libraries_supported=true;;
62 @@ -608,7 +610,7 @@ if test $withsharedlibs = "yes"; then
63        shared_libraries_supported=false;;
64      *-*-openbsd*)
65        sharedcccompopts="-fPIC"
66 -      mksharedlib="$bytecc -shared"
67 +      mksharedlib="$bytecc $bytecclinkopts -shared"
68        bytecclinkopts="$bytecclinkopts -Wl,-E"
69        natdynlinkopts="-Wl,-E"
70        byteccrpath="-Wl,-rpath,"
71 @@ -633,7 +635,7 @@ if test $withsharedlibs = "yes"; then
72      x86_64-*-linux*)              natdynlink=true;;
73      i[3456]86-*-darwin[89].*)     natdynlink=true;;
74      i[3456]86-*-darwin*)
75 -      if test $arch64 == true; then
76 +      if test $arch64 = true; then
77          natdynlink=true
78        fi;;
79      x86_64-*-darwin*)             natdynlink=true;;
80 @@ -641,6 +643,8 @@ if test $withsharedlibs = "yes"; then
81      sparc*-*-linux*)              natdynlink=true;;
82      i686-*-kfreebsd*)             natdynlink=true;;
83      x86_64-*-kfreebsd*)           natdynlink=true;;
84 +    i[345]86-*-dragonfly*)        natdynlink=true;;
85 +    x86_64-*-dragonfly*)          natdynlink=true;;
86      i[345]86-*-freebsd*)          natdynlink=true;;
87      x86_64-*-freebsd*)            natdynlink=true;;
88      i[345]86-*-openbsd*)          natdynlink=true;;
89 @@ -672,6 +676,7 @@ case "$host" in
90    sparc*-*-gnu*)                arch=sparc; system=gnu;;
91    i[3456]86-*-linux*)           arch=i386; system=linux_`sh ./runtest elf.c`;;
92    i[3456]86-*-*bsd*)            arch=i386; system=bsd_`sh ./runtest elf.c`;;
93 +  i[3456]86-*-dragonfly*)       arch=i386; system=bsd_`sh ./runtest elf.c`;;
94    i[3456]86-*-nextstep*)        arch=i386; system=nextstep;;
95    i[3456]86-*-solaris*)         if $arch64; then
96                                    arch=amd64; system=solaris
97 @@ -687,6 +692,7 @@ case "$host" in
98                                  fi;;
99    i[3456]86-*-gnu*)             arch=i386; system=gnu;;
100    powerpc*-*-linux*)            arch=power; model=ppc; system=elf;;
101 +  powerpc-*-freebsd*)           arch=power; model=ppc; system=elf;;
102    powerpc-*-netbsd*)            arch=power; model=ppc; system=elf;;
103    powerpc-*-rhapsody*)          arch=power; model=ppc; system=rhapsody;;
104    powerpc-*-darwin*)            arch=power; system=rhapsody
105 @@ -700,6 +706,7 @@ case "$host" in
106    arm*-*-linux-gnueabi)         arch=arm; system=linux_eabi;;
107    x86_64-*-linux*)              arch=amd64; system=linux;;
108    x86_64-*-gnu*)                arch=amd64; system=gnu;;
109 +  x86_64-*-dragonfly*)          arch=amd64; system=dragonfly;;
110    x86_64-*-freebsd*)            arch=amd64; system=freebsd;;
111    x86_64-*-netbsd*)             arch=amd64; system=netbsd;;
112    x86_64-*-openbsd*)            arch=amd64; system=openbsd;;
113 @@ -724,7 +731,7 @@ else
114  fi
115  
116  nativecccompopts=''
117 -nativecclinkopts=''
118 +nativecclinkopts=""
119  nativeccrpath="$byteccrpath"
120  
121  case "$arch,$nativecc,$system,$host_type" in
122 @@ -786,6 +793,8 @@ case "$arch,$model,$system" in
123    amd64,*,linux) profiling='prof';;
124    amd64,*,gnu) profiling='prof';;
125    arm,*,linux*) profiling='prof';;
126 +  *,*,dragonfly) profiling='prof';;
127 +  *,*,freebsd) profiling='prof';;
128    *) profiling='noprof';;
129  esac
130  
131 @@ -1544,10 +1553,10 @@ fi
132  # Look for BFD library
133  
134  if ./hasgot -i bfd.h && \
135 -   ./hasgot -lbfd -ldl -liberty -lz bfd_openr; then
136 +   ./hasgot -lbfd $dllib -liberty -lz bfd_openr; then
137    echo "BFD library found."
138    echo "#define HAS_LIBBFD" >> s.h
139 -  echo "LIBBFD_LINK=-lbfd -ldl -liberty -lz" >> Makefile
140 +  echo "LIBBFD_LINK=-lbfd $dllib -liberty -lz" >> Makefile
141  else
142    echo "BFD library not found, 'objinfo' will be unable to display info on .cmxs files"
143    echo "LIBBFD_LINK=" >> Makefile