1471
1464
#define STATIC_BUILD 1
1474
GRASS_LIB_PREFIX='$(STLIB_PREFIX)'
1475
GRASS_LIB_SUFFIX='$(STLIB_SUFFIX)'
1476
1467
GRASS_LIBRARY_TYPE='stlib'
1483
1472
ac_save_ldflags="$LDFLAGS"
1484
# Extract the first word of "ranlib", so it can be a program name with args.
1485
set dummy ranlib; ac_word=$2
1486
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1487
echo "configure:1488: checking for $ac_word" >&5
1489
if test -n "$RANLIB"; then
1490
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1492
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1494
for ac_dir in $ac_dummy; do
1495
test -z "$ac_dir" && ac_dir=.
1496
if test -f $ac_dir/$ac_word; then
1497
ac_cv_prog_RANLIB="ranlib"
1502
test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1504
RANLIB="$ac_cv_prog_RANLIB"
1505
if test -n "$RANLIB"; then
1506
echo "$ac_t""$RANLIB" 1>&6
1508
echo "$ac_t""no" 1>&6
1511
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1512
echo "configure:1513: checking how to run the C preprocessor" >&5
1513
# On Suns, sometimes $CPP names a directory.
1514
if test -n "$CPP" && test -d "$CPP"; then
1517
if test -z "$CPP"; then
1519
# This must be in double quotes, not single quotes, because CPP may get
1520
# substituted into the Makefile and "${CC-cc}" will confuse make.
1522
# On the NeXT, cc -E runs the code through the compiler's parser,
1523
# not just through cpp.
1524
cat > conftest.$ac_ext <<EOF
1525
#line 1526 "configure"
1526
#include "confdefs.h"
1530
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1531
{ (eval echo configure:1532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1532
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1533
if test -z "$ac_err"; then
1537
echo "configure: failed program was:" >&5
1538
cat conftest.$ac_ext >&5
1540
CPP="${CC-cc} -E -traditional-cpp"
1541
cat > conftest.$ac_ext <<EOF
1542
#line 1543 "configure"
1543
#include "confdefs.h"
1547
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1548
{ (eval echo configure:1549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1549
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1550
if test -z "$ac_err"; then
1554
echo "configure: failed program was:" >&5
1555
cat conftest.$ac_ext >&5
1557
CPP="${CC-cc} -nologo -E"
1558
cat > conftest.$ac_ext <<EOF
1559
#line 1560 "configure"
1560
#include "confdefs.h"
1564
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1565
{ (eval echo configure:1566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1566
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1567
if test -z "$ac_err"; then
1571
echo "configure: failed program was:" >&5
1572
cat conftest.$ac_ext >&5
1581
ac_cv_prog_CPP="$CPP"
1582
CPP="$ac_cv_prog_CPP"
1584
ac_cv_prog_CPP="$CPP"
1586
echo "$ac_t""$CPP" 1>&6
1590
# Step 0.a: Enable 64 bit support?
1592
echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6
1593
echo "configure:1594: checking if 64bit support is requested" >&5
1594
# Check whether --enable-64bit or --disable-64bit was given.
1595
if test "${enable_64bit+set}" = set; then
1596
enableval="$enable_64bit"
1603
if test "$enableval" = "yes"; then
1608
echo "$ac_t""$do64bit" 1>&6
1610
# Step 0.b: Enable Solaris 64 bit VIS support?
1612
echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
1613
echo "configure:1614: checking if 64bit Sparc VIS support is requested" >&5
1614
# Check whether --enable-64bit-vis or --disable-64bit-vis was given.
1615
if test "${enable_64bit_vis+set}" = set; then
1616
enableval="$enable_64bit_vis"
1623
if test "$enableval" = "yes"; then
1624
# Force 64bit on with VIS
1630
echo "$ac_t""$do64bitVIS" 1>&6
1632
# Step 1: set the variable "system" to hold the name and version number
1633
# for the system. This can usually be done via the "uname" command, but
1634
# there are a few systems, like Next, where this doesn't work.
1636
echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
1637
echo "configure:1638: checking system version (for dynamic loading)" >&5
1638
if test -f /usr/lib/NextStep/software_version; then
1639
system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
1641
system=`uname -s`-`uname -r`
1642
if test "$?" -ne 0 ; then
1643
echo "$ac_t""unknown (can't find uname command)" 1>&6
1646
# Special check for weird MP-RAS system (uname returns weird
1647
# results, and the version is kept in special file).
1649
if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
1650
system=MP-RAS-`awk '{print }' /etc/.relid`
1652
if test "`uname -s`" = "AIX" ; then
1653
system=AIX-`uname -v`.`uname -r`
1655
echo "$ac_t""$system" 1>&6
1659
# Step 2: check for existence of -ldl library. This is needed because
1660
# Linux can use either -ldl or -ldld for dynamic loading.
1662
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
1663
echo "configure:1664: checking for dlopen in -ldl" >&5
1664
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
1666
ac_save_LIBS="$LIBS"
1668
cat > conftest.$ac_ext <<EOF
1669
#line 1670 "configure"
1670
#include "confdefs.h"
1671
/* Override any gcc2 internal prototype to avoid an error. */
1672
/* We use char because int might match the return type of a gcc2
1673
builtin and then its argument prototype would still apply. */
1680
if { (eval echo configure:1681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1682
eval "ac_cv_lib_$ac_lib_var=yes"
1684
echo "configure: failed program was:" >&5
1685
cat conftest.$ac_ext >&5
1687
eval "ac_cv_lib_$ac_lib_var=no"
1690
LIBS="$ac_save_LIBS"
1692
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1693
echo "$ac_t""yes" 1>&6
1696
echo "$ac_t""no" 1>&6
1701
# Require ranlib early so we can override it in special cases below.
1705
# Step 3: set configuration options based on system name and version.
1709
GRASS_EXPORT_FILE_SUFFIX=""
1710
UNSHARED_LIB_SUFFIX=""
1711
1480
GRASS_TRIM_DOTS='`echo ${LIB_VER} | tr -d .`'
1712
ECHO_VERSION='`echo ${LIB_VER}`'
1713
1481
GRASS_LIB_VERSIONS_OK=ok
1716
if test "$GCC" = "yes" ; then
1717
CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
1721
GRASS_NEEDS_EXP_FILE=0
1722
GRASS_BUILD_EXP_FILE=""
1724
# Extract the first word of "ar", so it can be a program name with args.
1725
set dummy ar; ac_word=$2
1726
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1727
echo "configure:1728: checking for $ac_word" >&5
1729
if test -n "$AR"; then
1730
ac_cv_prog_AR="$AR" # Let the user override the test.
1732
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1734
for ac_dir in $ac_dummy; do
1735
test -z "$ac_dir" && ac_dir=.
1736
if test -f $ac_dir/$ac_word; then
1744
if test -n "$AR"; then
1745
echo "$ac_t""$AR" 1>&6
1747
echo "$ac_t""no" 1>&6
1750
if test "${AR}" = "" ; then
1751
{ echo "configure: error: Required archive tool 'ar' not found on PATH." 1>&2; exit 1; }
1754
1484
LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
1758
if test "${GRASS_THREADS}" = "1" -a "$GCC" != "yes" ; then
1759
# AIX requires the _r compiler when gcc isn't being used
1760
if test "${CC}" != "cc_r" ; then
1763
echo "$ac_t""Using $CC for compiling with threads" 1>&6
1766
# AIX-5 uses ELF style dynamic libraries
1768
# Note: need the LIBS below, otherwise Tk won't find Tcl's
1769
# symbols when dynamically loaded into tclsh.
1770
SHLIB_LD_LIBS='${LIBS}'
1775
LD_LIBRARY_PATH_VAR="LIBPATH"
1777
# Check to enable 64-bit flags for compiler/linker
1778
if test "$do64bit" = "yes" ; then
1779
if test "$GCC" = "yes" ; then
1780
echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
1785
RANLIB="${RANLIB} -X64"
1787
SHLIB_LD_FLAGS="-b64"
1791
if test "`uname -m`" = "ia64" ; then
1792
# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
1793
SHLIB_LD="/usr/ccs/bin/ld -G -z text"
1794
# AIX-5 has dl* in libc.so
1795
if test "$GCC" = "yes" ; then
1796
CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
1798
CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
1800
LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
1802
#SHLIB_LD="${SRCDIR}/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry ${SHLIB_LD_FLAGS}"
1803
SHLIB_LD="$CC -shared"
1804
CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
1805
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
1806
GRASS_NEEDS_EXP_FILE=1
1807
GRASS_EXPORT_FILE_SUFFIX='${LIB_VER}.exp'
1811
if test "${GRASS_THREADS}" = "1" -a "$GCC" != "yes" ; then
1812
# AIX requires the _r compiler when gcc isn't being used
1813
if test "${CC}" != "cc_r" ; then
1816
echo "$ac_t""Using $CC for compiling with threads" 1>&6
1820
SHLIB_LD_LIBS='${LIBS}'
1823
CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
1824
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
1825
LD_LIBRARY_PATH_VAR="LIBPATH"
1826
GRASS_NEEDS_EXP_FILE=1
1827
GRASS_EXPORT_FILE_SUFFIX='${LIB_VER}.exp'
1829
# Check to enable 64-bit flags for compiler/linker
1830
if test "$do64bit" = "yes" ; then
1831
if test "$GCC" = "yes" ; then
1832
echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
1837
RANLIB="${RANLIB} -X64"
1839
SHLIB_LD_FLAGS="-b64"
1842
#SHLIB_LD="${SRCDIR}/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry ${SHLIB_LD_FLAGS}"
1843
SHLIB_LD="$CC -shared"
1845
# On AIX <=v4 systems, libbsd.a has to be linked in to support
1846
# non-blocking file IO. This library has to be linked in after
1847
# the MATH_LIBS or it breaks the pow() function. The way to
1848
# insure proper sequencing, is to add it to the tail of MATH_LIBS.
1849
# This library also supplies gettimeofday.
1851
# AIX does not have a timezone field in struct tm. When the AIX
1852
# bsd library is used, the timezone global and the gettimeofday
1853
# methods are to be avoided for timezone deduction instead, we
1854
# deduce the timezone by comparing the localtime result on a
1857
echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
1858
echo "configure:1859: checking for gettimeofday in -lbsd" >&5
1859
ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
1861
ac_save_LIBS="$LIBS"
1863
cat > conftest.$ac_ext <<EOF
1864
#line 1865 "configure"
1865
#include "confdefs.h"
1866
/* Override any gcc2 internal prototype to avoid an error. */
1867
/* We use char because int might match the return type of a gcc2
1868
builtin and then its argument prototype would still apply. */
1869
char gettimeofday();
1875
if { (eval echo configure:1876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1877
eval "ac_cv_lib_$ac_lib_var=yes"
1879
echo "configure: failed program was:" >&5
1880
cat conftest.$ac_ext >&5
1882
eval "ac_cv_lib_$ac_lib_var=no"
1885
LIBS="$ac_save_LIBS"
1887
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1888
echo "$ac_t""yes" 1>&6
1891
echo "$ac_t""no" 1>&6
1895
if test $libbsd = yes; then
1896
MATH_LIBS="$MATH_LIBS -lbsd"
1897
cat >> confdefs.h <<\EOF
1898
#define USE_DELTA_FOR_TZ 1
1904
SHLIB_CFLAGS="-fPIC"
1905
SHLIB_LD="${CC} -nostart"
1906
SHLIB_LD_LIBS='${LIBS}'
1910
#-----------------------------------------------------------
1911
# Check for inet_ntoa in -lbind, for BeOS (which also needs
1912
# -lsocket, even if the network functions are in -lnet which
1913
# is always linked to, for compatibility.
1914
#-----------------------------------------------------------
1915
echo $ac_n "checking for inet_ntoa in -lbind""... $ac_c" 1>&6
1916
echo "configure:1917: checking for inet_ntoa in -lbind" >&5
1917
ac_lib_var=`echo bind'_'inet_ntoa | sed 'y%./+-%__p_%'`
1919
ac_save_LIBS="$LIBS"
1921
cat > conftest.$ac_ext <<EOF
1922
#line 1923 "configure"
1923
#include "confdefs.h"
1924
/* Override any gcc2 internal prototype to avoid an error. */
1925
/* We use char because int might match the return type of a gcc2
1926
builtin and then its argument prototype would still apply. */
1933
if { (eval echo configure:1934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1935
eval "ac_cv_lib_$ac_lib_var=yes"
1937
echo "configure: failed program was:" >&5
1938
cat conftest.$ac_ext >&5
1940
eval "ac_cv_lib_$ac_lib_var=no"
1943
LIBS="$ac_save_LIBS"
1945
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1946
echo "$ac_t""yes" 1>&6
1947
LIBS="$LIBS -lbind -lsocket"
1949
echo "$ac_t""no" 1>&6
1953
BSD/OS-2.1*|BSD/OS-3*)
1955
SHLIB_LD="shlicc -r"
1956
SHLIB_LD_LIBS='${LIBS}'
1963
SHLIB_CFLAGS="-export-dynamic -fPIC"
1964
SHLIB_LD="cc -shared"
1965
SHLIB_LD_LIBS='${LIBS}'
1967
LDFLAGS="-export-dynamic"
1972
SHLIB_CFLAGS="-K PIC"
1981
# Use updated header definitions where possible
1982
cat >> confdefs.h <<\EOF
1983
#define _XOPEN_SOURCE 1
1985
# Use the XOPEN network library
1986
cat >> confdefs.h <<\EOF
1987
#define _XOPEN_SOURCE_EXTENDED 1
1989
# Use the XOPEN network library
1990
LIBS="$LIBS -lxnet" # Use the XOPEN network library
1993
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
1994
echo "configure:1995: checking for shl_load in -ldld" >&5
1995
ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
1997
ac_save_LIBS="$LIBS"
1999
cat > conftest.$ac_ext <<EOF
2000
#line 2001 "configure"
2001
#include "confdefs.h"
2002
/* Override any gcc2 internal prototype to avoid an error. */
2003
/* We use char because int might match the return type of a gcc2
2004
builtin and then its argument prototype would still apply. */
2011
if { (eval echo configure:2012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2013
eval "ac_cv_lib_$ac_lib_var=yes"
2015
echo "configure: failed program was:" >&5
2016
cat conftest.$ac_ext >&5
2018
eval "ac_cv_lib_$ac_lib_var=no"
2021
LIBS="$ac_save_LIBS"
2023
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2024
echo "$ac_t""yes" 1>&6
2027
echo "$ac_t""no" 1>&6
2031
if test "$shared_ok" = yes; then
2034
SHLIB_LD_LIBS='${LIBS}'
2036
CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
2037
LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
2038
LD_LIBRARY_PATH_VAR="SHLIB_PATH"
2041
# Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
2042
#EXTRA_CFLAGS="+DAportable"
2044
# Check to enable 64-bit flags for compiler/linker
2045
if test "$do64bit" = "yes" ; then
2046
if test "$GCC" = "yes" ; then
2047
hpux_arch=`gcc -dumpmachine`
2050
# 64-bit gcc in use. Fix flags for GNU ld.
2052
SHLIB_LD="gcc -shared"
2058
echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
2063
if test "`uname -m`" = "ia64" ; then
2064
EXTRA_CFLAGS="+DD64"
2065
LDFLAGS="+DD64 $LDFLAGS"
2067
EXTRA_CFLAGS="+DA2.0W"
2068
LDFLAGS="+DA2.0W $LDFLAGS"
2073
HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
2075
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
2076
echo "configure:2077: checking for shl_load in -ldld" >&5
2077
ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
2079
ac_save_LIBS="$LIBS"
2081
cat > conftest.$ac_ext <<EOF
2082
#line 2083 "configure"
2083
#include "confdefs.h"
2084
/* Override any gcc2 internal prototype to avoid an error. */
2085
/* We use char because int might match the return type of a gcc2
2086
builtin and then its argument prototype would still apply. */
2093
if { (eval echo configure:2094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2095
eval "ac_cv_lib_$ac_lib_var=yes"
2097
echo "configure: failed program was:" >&5
2098
cat conftest.$ac_ext >&5
2100
eval "ac_cv_lib_$ac_lib_var=no"
2103
LIBS="$ac_save_LIBS"
2105
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2106
echo "$ac_t""yes" 1>&6
2109
echo "$ac_t""no" 1>&6
2113
if test "$shared_ok" = yes; then
2118
CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
2119
LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
2120
LD_LIBRARY_PATH_VAR="SHLIB_PATH"
2126
SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
2127
SHLIB_LD_LIBS='${LIBS}'
2128
LDFLAGS="-Wl,-D,08000000"
2129
CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
2130
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
2131
SHARED_LIB_SUFFIX='${LIB_VER}.a'
2135
SHLIB_LD="ld -shared -rdata_shared"
2136
SHLIB_LD_LIBS='${LIBS}'
2138
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
2139
LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
2145
SHLIB_LD="ld -shared -rdata_shared"
2146
SHLIB_LD_LIBS='${LIBS}'
2148
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
2149
LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
2151
IRIX-6.*|IRIX64-6.5*)
2153
SHLIB_LD="ld -n32 -shared -rdata_shared"
2154
SHLIB_LD_LIBS='${LIBS}'
2156
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
2157
LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
2158
if test "$GCC" = "yes" ; then
2159
EXTRA_CFLAGS="-mabi=n32"
2164
# Use to build 6.2 compatible binaries on 6.3.
2165
EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
2176
SHLIB_LD="ld -n32 -shared -rdata_shared"
2177
SHLIB_LD_LIBS='${LIBS}'
2180
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
2181
LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
2183
# Check to enable 64-bit flags for compiler/linker
2185
if test "$do64bit" = "yes" ; then
2186
if test "$GCC" = "yes" ; then
2187
echo "configure: warning: 64bit mode not supported by gcc" 1>&2
2190
SHLIB_LD="ld -64 -shared -rdata_shared"
2197
SHLIB_CFLAGS="-fPIC"
2198
SHLIB_LD_LIBS='${LIBS}'
2202
# egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
2203
# when you inline the string and math operations. Turn this off to
2204
# get rid of the warnings.
2205
#CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
2207
if test "$have_dl" = yes; then
2208
SHLIB_LD="${CC} -shared"
2209
LDFLAGS="-Wl,--export-dynamic"
2210
CC_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
2211
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
2213
ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
2214
echo $ac_n "checking for dld.h""... $ac_c" 1>&6
2215
echo "configure:2216: checking for dld.h" >&5
2217
cat > conftest.$ac_ext <<EOF
2218
#line 2219 "configure"
2219
#include "confdefs.h"
2222
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2223
{ (eval echo configure:2224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2224
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2225
if test -z "$ac_err"; then
2227
eval "ac_cv_header_$ac_safe=yes"
2230
echo "configure: failed program was:" >&5
2231
cat conftest.$ac_ext >&5
2233
eval "ac_cv_header_$ac_safe=no"
2236
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2237
echo "$ac_t""yes" 1>&6
2239
SHLIB_LD="ld -shared"
2244
echo "$ac_t""no" 1>&6
2248
if test "`uname -m`" = "alpha" ; then
2249
EXTRA_CFLAGS="-mieee"
2252
# The combo of gcc + glibc has a bug related
2253
# to inlining of functions like strtod(). The
2254
# -fno-builtin flag should address this problem
2255
# but it does not work. The -fno-inline flag
2256
# is kind of overkill but it works.
2257
# Disable inlining only when one of the
2258
# files in compat/*.c is being linked in.
2259
if test x"${USE_COMPAT}" != x ; then
2260
EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
2263
# XIM peeking works under XFree86.
2264
cat >> confdefs.h <<\EOF
2265
#define PEEK_XCLOSEIM 1
2271
SHLIB_CFLAGS="-fPIC"
2272
SHLIB_LD_LIBS='${LIBS}'
2275
if test "$have_dl" = yes; then
2276
SHLIB_LD="${CC} -shared"
2277
LDFLAGS="-Wl,--export-dynamic"
2281
ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
2282
echo $ac_n "checking for dld.h""... $ac_c" 1>&6
2283
echo "configure:2284: checking for dld.h" >&5
2285
cat > conftest.$ac_ext <<EOF
2286
#line 2287 "configure"
2287
#include "confdefs.h"
2290
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2291
{ (eval echo configure:2292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2292
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2293
if test -z "$ac_err"; then
2295
eval "ac_cv_header_$ac_safe=yes"
2298
echo "configure: failed program was:" >&5
2299
cat conftest.$ac_ext >&5
2301
eval "ac_cv_header_$ac_safe=no"
2304
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2305
echo "$ac_t""yes" 1>&6
2307
SHLIB_LD="ld -shared"
2312
echo "$ac_t""no" 1>&6
2316
if test "`uname -m`" = "alpha" ; then
2317
EXTRA_CFLAGS="-mieee"
2322
SHLIB_LD_LIBS='${LIBS}'
1487
*-linux-* | *-gnu* | *-kfreebsd*-gnu)
1488
SHLIB_CFLAGS="-fPIC"
1491
SHLIB_LD="${CC} -shared"
1492
LDFLAGS="-Wl,--export-dynamic"
1493
LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
1494
LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
2323
1497
SHLIB_SUFFIX=".dll"
2325
1498
SHLIB_LD="${CC} -shared"
2326
1499
LDFLAGS="-Wl,--export-dynamic"
2329
1500
LD_LIBRARY_PATH_VAR="PATH"
2333
SHLIB_LD_LIBS='${LIBS}'
1502
*-pc-mingw32 | *-pc-msys)
2334
1503
SHLIB_SUFFIX=".dll"
2336
1504
SHLIB_LD="${CC} -shared"
2337
1505
LDFLAGS="-Wl,--export-dynamic,--enable-runtime-pseudo-reloc"
2340
1506
LD_LIBRARY_PATH_VAR="PATH"
2343
SHLIB_CFLAGS="-K PIC"
2352
SHLIB_CFLAGS="-K PIC"
2356
LDFLAGS="-Wl,-Bexport"
1509
SHLIB_CFLAGS="-fno-common"
1510
SHLIB_SUFFIX=".dylib"
1511
SHLIB_LD="cc -dynamiclib -compatibility_version \${GRASS_VERSION_MAJOR}.\${GRASS_VERSION_MINOR} -current_version \${GRASS_VERSION_MAJOR}.\${GRASS_VERSION_MINOR} -install_name \${INST_DIR}/lib/lib\${LIB_NAME}\${SHLIB_SUFFIX}"
1512
LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
1515
# Note: If _REENTRANT isn't defined, then Solaris
1516
# won't define thread-safe library routines.
1517
cat >> confdefs.h <<\EOF
1518
#define _REENTRANT 1
1521
cat >> confdefs.h <<\EOF
1522
#define _POSIX_PTHREAD_SEMANTICS 1
1525
# Note: need the LIBS below, otherwise Tk won't find Tcl's
1526
# symbols when dynamically loaded into tclsh.
1527
if test "$GCC" = "yes" ; then
1528
SHLIB_CFLAGS="-fPIC"
1529
SHLIB_LD="$CC -shared"
1530
LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
1532
SHLIB_CFLAGS="-KPIC"
1533
SHLIB_LD="/usr/ccs/bin/ld -G -z text"
1534
LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
1537
LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
1540
# Note: Solaris is as of 2010 Oracle Solaris, not Sun Solaris
1541
# Oracle Solaris derives from Solaris 2
1542
# derives from SunOS 5
1543
# derives from UNIX System V Release 4
1544
# Note: If _REENTRANT isn't defined, then Solaris
1545
# won't define thread-safe library routines.
1546
cat >> confdefs.h <<\EOF
1547
#define _REENTRANT 1
1550
cat >> confdefs.h <<\EOF
1551
#define _POSIX_PTHREAD_SEMANTICS 1
1554
# Note: need the LIBS below, otherwise Tk won't find Tcl's
1555
# symbols when dynamically loaded into tclsh.
1556
if test "$GCC" = "yes" ; then
1557
SHLIB_CFLAGS="-fPIC"
1558
SHLIB_LD="$CC -shared"
1559
LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
1561
SHLIB_CFLAGS="-KPIC"
1562
SHLIB_LD="/usr/ccs/bin/ld -G -z text"
1563
LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
1566
LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
1569
# NOTE: only FreeBSD 4+ is supported
1570
# FreeBSD 3.* and greater have ELF.
1571
SHLIB_CFLAGS="-fPIC"
1572
#SHLIB_LD="ld -Bshareable -x"
1573
SHLIB_LD="${CC} -shared"
1575
LDFLAGS="-export-dynamic"
1576
#LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
1577
LD_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
1578
# TODO: add optional pthread support with any combination of:
1579
# CFLAGS="$CFLAGS -pthread"
1580
# LDFLAGS="$LDFLAGS -lpthread"
1581
# AC_DEFINE(_REENTRANT)
1582
# AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
2361
1585
# NetBSD has ELF.
2362
1586
SHLIB_CFLAGS="-fPIC"
2363
SHLIB_LD="ld -Bshareable -x"
1587
SHLIB_LD="${CC} -shared"
2364
1588
SHLIB_LD_LIBS="${LIBS}"
2366
1589
LDFLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
2367
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
2368
LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
2369
if test "${GRASS_THREADS}" = "1" ; then
2370
# The -pthread needs to go in the CFLAGS, not LIBS
2371
LIBS=`echo $LIBS | sed s/-pthread//`
2372
EXTRA_CFLAGS="-pthread"
2373
LDFLAGS="$LDFLAGS -pthread"
2375
# NetBSD doesn't handle version numbers with dots.
2376
UNSHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
2377
SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so',
2378
GRASS_LIB_VERSIONS_OK=nodots
2381
SHLIB_LD="${CC} -shared"
2382
SHLIB_LD_LIBS='${LIBS}'
2387
echo $ac_n "checking for ELF""... $ac_c" 1>&6
2388
echo "configure:2389: checking for ELF" >&5
2389
cat > conftest.$ac_ext <<EOF
2390
#line 2391 "configure"
2391
#include "confdefs.h"
2398
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2399
egrep "yes" >/dev/null 2>&1; then
2401
echo "$ac_t""yes" 1>&6
2402
SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so.1.0'
2405
echo "$ac_t""no" 1>&6
2406
SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so.1.0'
2412
# OpenBSD doesn't do version numbers with dots.
2413
UNSHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
2414
GRASS_LIB_VERSIONS_OK=nodots
2417
# Not available on all versions: check for include file.
2418
ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
2419
echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
2420
echo "configure:2421: checking for dlfcn.h" >&5
2422
cat > conftest.$ac_ext <<EOF
2423
#line 2424 "configure"
2424
#include "confdefs.h"
2427
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2428
{ (eval echo configure:2429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2429
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2430
if test -z "$ac_err"; then
2432
eval "ac_cv_header_$ac_safe=yes"
2435
echo "configure: failed program was:" >&5
2436
cat conftest.$ac_ext >&5
2438
eval "ac_cv_header_$ac_safe=no"
2441
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2442
echo "$ac_t""yes" 1>&6
2444
SHLIB_CFLAGS="-fPIC"
2445
SHLIB_LD="ld -Bshareable -x"
2449
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
2450
LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
2451
echo $ac_n "checking for ELF""... $ac_c" 1>&6
2452
echo "configure:2453: checking for ELF" >&5
2453
cat > conftest.$ac_ext <<EOF
2454
#line 2455 "configure"
2455
#include "confdefs.h"
2462
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2463
egrep "yes" >/dev/null 2>&1; then
2465
echo "$ac_t""yes" 1>&6
2466
SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so'
2469
echo "$ac_t""no" 1>&6
2470
SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so.1.0'
2477
echo "$ac_t""no" 1>&6
2480
SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
2481
SHLIB_LD_LIBS='${LIBS}'
2484
CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
2485
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
2486
SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
2490
UNSHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
2491
GRASS_LIB_VERSIONS_OK=nodots
2494
# FreeBSD 3.* and greater have ELF.
2495
SHLIB_CFLAGS="-fPIC"
2496
SHLIB_LD="ld -Bshareable -x"
2497
SHLIB_LD_LIBS='${LIBS}'
2499
LDFLAGS="-export-dynamic"
2500
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
2501
LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
2502
if test "${GRASS_THREADS}" = "1" ; then
2503
# The -pthread needs to go in the CFLAGS, not LIBS
2504
LIBS=`echo $LIBS | sed s/-pthread//`
2505
EXTRA_CFLAGS="-pthread"
2506
LDFLAGS="$LDFLAGS -pthread"
2510
# FreeBSD-3 doesn't handle version numbers with dots.
2511
UNSHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
2512
SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so'
2513
GRASS_LIB_VERSIONS_OK=nodots
2517
Rhapsody-*|Darwin-*)
2518
SHLIB_CFLAGS="-fno-common"
2519
SHLIB_LD="cc -dynamiclib -compatibility_version \${GRASS_VERSION_MAJOR}.\${GRASS_VERSION_MINOR} -current_version \${GRASS_VERSION_MAJOR}.\${GRASS_VERSION_MINOR} -install_name \${INST_DIR}/lib/lib\${LIB_NAME}\${SHLIB_SUFFIX}"
2520
GRASS_SHLIB_LD_EXTRAS=""
2521
SHLIB_LD_LIBS='${LIBS}'
2522
SHLIB_SUFFIX=".dylib"
2526
CFLAGS_OPTIMIZE="-Os"
2527
LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
2528
# for compatibility with autoconf vers 2.13 :
2535
SHLIB_LD="cc -nostdlib -r"
2543
CFLAGS_OPTIMIZE="" # Optimizer is buggy
2544
cat >> confdefs.h <<\EOF
2545
#define _OE_SOCKETS 1
2547
# needed in sys/socket.h
2549
OSF1-1.0|OSF1-1.1|OSF1-1.2)
2550
# OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
2552
# Hack: make package name same as library name
2553
SHLIB_LD='ld -R -export :'
2561
# OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
2562
SHLIB_CFLAGS="-fPIC"
2563
if test "$SHARED_BUILD" = "1" ; then
2564
SHLIB_LD="ld -shared"
2566
SHLIB_LD="ld -non_shared"
2577
if test "$SHARED_BUILD" = "1" ; then
2578
SHLIB_LD='ld -shared -expect_unresolved "*"'
2580
SHLIB_LD='ld -non_shared -expect_unresolved "*"'
2585
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
2586
LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
2587
if test "$GCC" = "yes" ; then
2588
EXTRA_CFLAGS="-mieee"
2590
EXTRA_CFLAGS="-DHAVE_TZSET -std1 -ieee"
2592
# see pthread_intro(3) for pthread support on osf1, k.furukawa
2593
if test "${GRASS_THREADS}" = "1" ; then
2594
EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
2595
EXTRA_CFLAGS="${EXTRA_CFLAGS} -DGRASS_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
2596
LIBS=`echo $LIBS | sed s/-lpthreads//`
2597
if test "$GCC" = "yes" ; then
2598
LIBS="$LIBS -lpthread -lmach -lexc"
2600
EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
2608
# This may work for all QNX, but it was only reported for v6.
2609
SHLIB_CFLAGS="-fPIC"
2610
SHLIB_LD="ld -Bshareable -x"
2619
SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
2620
SHLIB_LD_LIBS='${LIBS}'
2622
LDFLAGS="-Wl,-D,08000000"
2623
CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
2624
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
2627
# Note, dlopen is available only on SCO 3.2.5 and greater. However,
2628
# this test works, since "uname -s" was non-standard in 3.2.4 and
2630
if test "$GCC" = "yes" ; then
2631
SHLIB_CFLAGS="-fPIC -melf"
2632
LDFLAGS="-melf -Wl,-Bexport"
2634
SHLIB_CFLAGS="-Kpic -belf"
2635
LDFLAGS="-belf -Wl,-Bexport"
2644
SHLIB_CFLAGS="-K PIC"
2658
CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
2659
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
2661
# SunOS can't handle version numbers with dots in them in library
2662
# specs, like -ltcl7.5, so use -ltcl75 instead. Also, it
2663
# requires an extra version number at the end of .so file names.
2664
# So, the library has to have a name like libtcl75.so.1.0
2666
SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so.1.0'
2667
UNSHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
2668
GRASS_LIB_VERSIONS_OK=nodots
2672
# Note: If _REENTRANT isn't defined, then Solaris
2673
# won't define thread-safe library routines.
2675
cat >> confdefs.h <<\EOF
2676
#define _REENTRANT 1
2679
cat >> confdefs.h <<\EOF
2680
#define _POSIX_PTHREAD_SEMANTICS 1
2684
# Note: need the LIBS below, otherwise Tk won't find Tcl's
2685
# symbols when dynamically loaded into tclsh.
2687
SHLIB_LD_LIBS='${LIBS}'
2690
if test "$GCC" = "yes" ; then
2691
SHLIB_CFLAGS="-fPIC"
2692
SHLIB_LD="$CC -shared"
2693
CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
2694
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
2696
SHLIB_CFLAGS="-KPIC"
2697
SHLIB_LD="/usr/ccs/bin/ld -G -z text"
2698
CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
2699
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
2704
# Note: If _REENTRANT isn't defined, then Solaris
2705
# won't define thread-safe library routines.
2707
cat >> confdefs.h <<\EOF
2708
#define _REENTRANT 1
2711
cat >> confdefs.h <<\EOF
2712
#define _POSIX_PTHREAD_SEMANTICS 1
2718
# Check to enable 64-bit flags for compiler/linker
2719
if test "$do64bit" = "yes" ; then
2721
if test "$arch" = "sparcv9 sparc" ; then
2722
if test "$GCC" = "yes" ; then
2723
echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
2725
SHLIB_CFLAGS="-KPIC"
2727
if test "$do64bitVIS" = "yes" ; then
2728
EXTRA_CFLAGS="-xarch=v9a"
2729
LDFLAGS="-xarch=v9a"
2731
EXTRA_CFLAGS="-xarch=v9"
2736
echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
2740
# Note: need the LIBS below, otherwise Tk won't find Tcl's
2741
# symbols when dynamically loaded into tclsh.
2743
SHLIB_LD_LIBS='${LIBS}'
2745
if test "$GCC" = "yes" ; then
2746
SHLIB_CFLAGS="-fPIC"
2747
SHLIB_LD="$CC -shared"
2748
CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
2749
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
2751
SHLIB_CFLAGS="-KPIC"
2752
SHLIB_LD="CC -G -z text"
2753
CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
2754
LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
2760
SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
2761
SHLIB_LD_LIBS='${LIBS}'
2762
LDFLAGS="-Wl,-D,08000000"
2763
CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
2764
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
2765
if test "$GCC" != "yes" ; then
2766
EXTRA_CFLAGS="-DHAVE_TZSET -std1"
2769
UNIX_SV* | UnixWare-5*)
2770
SHLIB_CFLAGS="-KPIC"
2774
# Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
2775
# that don't grok the -Bexport option. Test that it does.
2776
hold_ldflags=$LDFLAGS
2777
echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
2778
echo "configure:2779: checking for ld accepts -Bexport flag" >&5
2779
LDFLAGS="${LDFLAGS} -Wl,-Bexport"
2780
cat > conftest.$ac_ext <<EOF
2781
#line 2782 "configure"
2782
#include "confdefs.h"
2788
if { (eval echo configure:2789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2792
echo "configure: failed program was:" >&5
2793
cat conftest.$ac_ext >&5
2798
LDFLAGS=$hold_ldflags
2799
echo "$ac_t""$found" 1>&6
2800
if test $found = yes; then
2801
LDFLAGS="-Wl,-Bexport"
2810
# If we're running gcc, then change the C flags for compiling shared
2811
# libraries to the right flags for gcc, instead of those for the
2812
# standard manufacturer compiler.
2814
if test "$GCC" = "yes" ; then
2824
Rhapsody-*|Darwin-*)
2833
SHLIB_CFLAGS="-fPIC"
2838
if test "$SHARED_LIB_SUFFIX" = "" ; then
2839
SHARED_LIB_SUFFIX='${LIB_VER}${SHLIB_SUFFIX}'
2841
if test "$UNSHARED_LIB_SUFFIX" = "" ; then
2842
UNSHARED_LIB_SUFFIX='${LIB_VER}.a'
2845
if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
2846
LIB_SUFFIX=${SHARED_LIB_SUFFIX}
2847
MAKE_LIB='${SHLIB_LD} -o $@ ${SHLIB_LD_FLAGS} ${OBJS} ${SHLIB_LD_LIBS} ${GRASS_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
2848
INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
2850
LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
2852
if test "$RANLIB" = "" ; then
2853
MAKE_LIB='$(STLIB_LD) $@ ${OBJS}'
2854
INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
1590
SHLIB_LD_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
1591
LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -L${LIB_RUNTIME_DIR}'
1592
# some older NetBSD versions do not handle version numbers with dots.
1593
#STLIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
1594
#SHLIB_SUFFIX='${GRASS_TRIM_DOTS}.so'
1595
#GRASS_LIB_VERSIONS_OK=nodots
1596
# NetBSD 6 does handle version numbers with dots.
1599
# TODO: add optional pthread support with any combination of:
1600
# CFLAGS="$CFLAGS -pthread"
1601
# LDFLAGS="$LDFLAGS -lpthread"
1602
# AC_DEFINE(_REENTRANT)
1603
# AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
1606
# NOTE: do we need to support aix < 6 ?
1610
if test "$GCC" = "yes" ; then
1611
SHLIB_CFLAGS="-fPIC"
1612
SHLIB_LD="$CC -shared"
1613
LD_SEARCH_FLAGS='-Wl,-bsvr4,-R,${LIB_RUNTIME_DIR}'
2856
MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@'
2857
INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))'
1616
SHLIB_CFLAGS="-qmkshrobj"
1617
SHLIB_LD="$CC -shared"
1618
LD_SEARCH_FLAGS='-Wl,-bsvr4,-R,${LIB_RUNTIME_DIR}'
2863
# Stub lib does not depend on shared/static configuration
2864
if test "$RANLIB" = "" ; then
2865
MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}'
2866
INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
2868
MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@'
2869
INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
1621
LD_LIBRARY_PATH_VAR="LIBPATH"
1622
GRASS_NEEDS_EXP_FILE=1
1623
GRASS_EXPORT_FILE_SUFFIX='${LIB_VER}.exp'
1626
{ echo "configure: error: ***Unknown platform: $host***" 1>&2; exit 1; }
5622
# Enable Curses option
5625
echo $ac_n "checking whether to use Curses""... $ac_c" 1>&6
5626
echo "configure:5627: checking whether to use Curses" >&5
5627
echo "$ac_t"""$with_curses"" 1>&6
5628
case "$with_curses" in
5629
"no") USE_CURSES= ;;
5630
"yes") USE_CURSES="1" ;;
5631
*) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
5636
if test -n "$USE_CURSES"; then
5639
ac_save_cppflags="$CPPFLAGS"
5640
CPPFLAGS=" $CPPFLAGS"
5641
for ac_hdr in curses.h
5643
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5644
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5645
echo "configure:5646: checking for $ac_hdr" >&5
5647
cat > conftest.$ac_ext <<EOF
5648
#line 5649 "configure"
5649
#include "confdefs.h"
5652
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5653
{ (eval echo configure:5654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5654
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5655
if test -z "$ac_err"; then
5657
eval "ac_cv_header_$ac_safe=yes"
5660
echo "configure: failed program was:" >&5
5661
cat conftest.$ac_ext >&5
5663
eval "ac_cv_header_$ac_safe=no"
5666
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5667
echo "$ac_t""yes" 1>&6
5668
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5669
cat >> confdefs.h <<EOF
5670
#define $ac_tr_hdr 1
5674
echo "$ac_t""no" 1>&6
5675
{ echo "configure: error: *** Unable to locate curses includes." 1>&2; exit 1; }
5680
CPPFLAGS=$ac_save_cppflags
5683
echo $ac_n "checking curses.h WINDOW structure component""... $ac_c" 1>&6
5684
echo "configure:5685: checking curses.h WINDOW structure component" >&5
5686
cat > conftest.$ac_ext <<EOF
5687
#line 5688 "configure"
5688
#include "confdefs.h"
5693
WINDOW w; w.maxy = 0;
5696
if { (eval echo configure:5697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5700
echo "configure: failed program was:" >&5
5701
cat conftest.$ac_ext >&5
5704
cat > conftest.$ac_ext <<EOF
5705
#line 5706 "configure"
5706
#include "confdefs.h"
5711
WINDOW w; w._maxy = 0;
5714
if { (eval echo configure:5715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5718
echo "configure: failed program was:" >&5
5719
cat conftest.$ac_ext >&5
5722
cat >> confdefs.h <<EOF
5723
#define CURSES_MAXY $CURSES_MAXY
5727
echo "$ac_t""$CURSES_MAXY" 1>&6
5729
echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
5730
echo "configure:5731: checking for initscr in -lncurses" >&5
5731
ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
5733
ac_save_LIBS="$LIBS"
5734
LIBS="-lncurses $LIBS"
5735
cat > conftest.$ac_ext <<EOF
5736
#line 5737 "configure"
5737
#include "confdefs.h"
5738
/* Override any gcc2 internal prototype to avoid an error. */
5739
/* We use char because int might match the return type of a gcc2
5740
builtin and then its argument prototype would still apply. */
5747
if { (eval echo configure:5748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5749
eval "ac_cv_lib_$ac_lib_var=yes"
5751
echo "configure: failed program was:" >&5
5752
cat conftest.$ac_ext >&5
5754
eval "ac_cv_lib_$ac_lib_var=no"
5757
LIBS="$ac_save_LIBS"
5759
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5760
echo "$ac_t""yes" 1>&6
5763
echo "$ac_t""no" 1>&6
5765
echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6
5766
echo "configure:5767: checking for initscr in -lcurses" >&5
5767
ac_lib_var=`echo curses'_'initscr | sed 'y%./+-%__p_%'`
5769
ac_save_LIBS="$LIBS"
5770
LIBS="-lcurses $LIBS"
5771
cat > conftest.$ac_ext <<EOF
5772
#line 5773 "configure"
5773
#include "confdefs.h"
5774
/* Override any gcc2 internal prototype to avoid an error. */
5775
/* We use char because int might match the return type of a gcc2
5776
builtin and then its argument prototype would still apply. */
5783
if { (eval echo configure:5784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5785
eval "ac_cv_lib_$ac_lib_var=yes"
5787
echo "configure: failed program was:" >&5
5788
cat conftest.$ac_ext >&5
5790
eval "ac_cv_lib_$ac_lib_var=no"
5793
LIBS="$ac_save_LIBS"
5795
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5796
echo "$ac_t""yes" 1>&6
5799
echo "$ac_t""no" 1>&6
5801
{ echo "configure: error: *** Unable to locate curses library." 1>&2; exit 1; }
5811
echo $ac_n "checking for keypad in -lncurses""... $ac_c" 1>&6
5812
echo "configure:5813: checking for keypad in -lncurses" >&5
5813
ac_lib_var=`echo ncurses'_'keypad | sed 'y%./+-%__p_%'`
5815
ac_save_LIBS="$LIBS"
5816
LIBS="-lncurses $LIBS"
5817
cat > conftest.$ac_ext <<EOF
5818
#line 5819 "configure"
5819
#include "confdefs.h"
5820
/* Override any gcc2 internal prototype to avoid an error. */
5821
/* We use char because int might match the return type of a gcc2
5822
builtin and then its argument prototype would still apply. */
5829
if { (eval echo configure:5830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5831
eval "ac_cv_lib_$ac_lib_var=yes"
5833
echo "configure: failed program was:" >&5
5834
cat conftest.$ac_ext >&5
5836
eval "ac_cv_lib_$ac_lib_var=no"
5839
LIBS="$ac_save_LIBS"
5841
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5842
echo "$ac_t""yes" 1>&6
5843
cat >> confdefs.h <<\EOF
5844
#define HAVE_KEYPAD 1
5848
echo "$ac_t""no" 1>&6
5850
echo $ac_n "checking for keypad in -lcurses""... $ac_c" 1>&6
5851
echo "configure:5852: checking for keypad in -lcurses" >&5
5852
ac_lib_var=`echo curses'_'keypad | sed 'y%./+-%__p_%'`
5854
ac_save_LIBS="$LIBS"
5855
LIBS="-lcurses $LIBS"
5856
cat > conftest.$ac_ext <<EOF
5857
#line 5858 "configure"
5858
#include "confdefs.h"
5859
/* Override any gcc2 internal prototype to avoid an error. */
5860
/* We use char because int might match the return type of a gcc2
5861
builtin and then its argument prototype would still apply. */
5868
if { (eval echo configure:5869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5870
eval "ac_cv_lib_$ac_lib_var=yes"
5872
echo "configure: failed program was:" >&5
5873
cat conftest.$ac_ext >&5
5875
eval "ac_cv_lib_$ac_lib_var=no"
5878
LIBS="$ac_save_LIBS"
5880
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5881
echo "$ac_t""yes" 1>&6
5882
cat >> confdefs.h <<\EOF
5883
#define HAVE_KEYPAD 1
5887
echo "$ac_t""no" 1>&6
5897
echo $ac_n "checking for gtty in -lcompat""... $ac_c" 1>&6
5898
echo "configure:5899: checking for gtty in -lcompat" >&5
5899
ac_lib_var=`echo compat'_'gtty | sed 'y%./+-%__p_%'`
5901
ac_save_LIBS="$LIBS"
5902
LIBS="-lcompat $LIBS"
5903
cat > conftest.$ac_ext <<EOF
5904
#line 5905 "configure"
5905
#include "confdefs.h"
5906
/* Override any gcc2 internal prototype to avoid an error. */
5907
/* We use char because int might match the return type of a gcc2
5908
builtin and then its argument prototype would still apply. */
5915
if { (eval echo configure:5916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5917
eval "ac_cv_lib_$ac_lib_var=yes"
5919
echo "configure: failed program was:" >&5
5920
cat conftest.$ac_ext >&5
5922
eval "ac_cv_lib_$ac_lib_var=no"
5925
LIBS="$ac_save_LIBS"
5927
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5928
echo "$ac_t""yes" 1>&6
5931
echo "$ac_t""no" 1>&6
5933
echo $ac_n "checking for gtty in -lbsd-compat""... $ac_c" 1>&6
5934
echo "configure:5935: checking for gtty in -lbsd-compat" >&5
5935
ac_lib_var=`echo bsd-compat'_'gtty | sed 'y%./+-%__p_%'`
5937
ac_save_LIBS="$LIBS"
5938
LIBS="-lbsd-compat $LIBS"
5939
cat > conftest.$ac_ext <<EOF
5940
#line 5941 "configure"
5941
#include "confdefs.h"
5942
/* Override any gcc2 internal prototype to avoid an error. */
5943
/* We use char because int might match the return type of a gcc2
5944
builtin and then its argument prototype would still apply. */
5951
if { (eval echo configure:5952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5953
eval "ac_cv_lib_$ac_lib_var=yes"
5955
echo "configure: failed program was:" >&5
5956
cat conftest.$ac_ext >&5
5958
eval "ac_cv_lib_$ac_lib_var=no"
5961
LIBS="$ac_save_LIBS"
5963
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5964
echo "$ac_t""yes" 1>&6
5965
COMPATLIB=-lbsd-compat
5967
echo "$ac_t""no" 1>&6
5969
echo $ac_n "checking for gtty in -lbsd""... $ac_c" 1>&6
5970
echo "configure:5971: checking for gtty in -lbsd" >&5
5971
ac_lib_var=`echo bsd'_'gtty | sed 'y%./+-%__p_%'`
5973
ac_save_LIBS="$LIBS"
5975
cat > conftest.$ac_ext <<EOF
5976
#line 5977 "configure"
5977
#include "confdefs.h"
5978
/* Override any gcc2 internal prototype to avoid an error. */
5979
/* We use char because int might match the return type of a gcc2
5980
builtin and then its argument prototype would still apply. */
5987
if { (eval echo configure:5988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5989
eval "ac_cv_lib_$ac_lib_var=yes"
5991
echo "configure: failed program was:" >&5
5992
cat conftest.$ac_ext >&5
5994
eval "ac_cv_lib_$ac_lib_var=no"
5997
LIBS="$ac_save_LIBS"
5999
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6000
echo "$ac_t""yes" 1>&6
6003
echo "$ac_t""no" 1>&6
6015
4422
# Note that some systems (FreeBSD for example) need an extra library for
6017
4424
ac_save_libs="$LIBS"
6020
4427
echo $ac_n "checking for library containing cuserid""... $ac_c" 1>&6
6021
echo "configure:6022: checking for library containing cuserid" >&5
4428
echo "configure:4429: checking for library containing cuserid" >&5
6023
4430
ac_func_search_save_LIBS="$LIBS"
6024
4431
ac_cv_search_cuserid="no"
6025
4432
cat > conftest.$ac_ext <<EOF
6026
#line 6027 "configure"
4433
#line 4434 "configure"
6027
4434
#include "confdefs.h"
6028
4435
/* Override any gcc2 internal prototype to avoid an error. */
6029
4436
/* We use char because int might match the return type of a gcc2
10099
8566
# Done checking SQLite
10102
# Enable FFMPEG option
10105
echo $ac_n "checking whether to use FFMPEG""... $ac_c" 1>&6
10106
echo "configure:10107: checking whether to use FFMPEG" >&5
10107
echo "$ac_t"""$with_ffmpeg"" 1>&6
10108
case "$with_ffmpeg" in
10109
"no") USE_FFMPEG= ;;
10110
"yes") USE_FFMPEG="1" ;;
10111
*) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
10120
if test -n "$USE_FFMPEG"; then
10122
# With FFMPEG includes directory
10125
echo $ac_n "checking for location of FFMPEG includes""... $ac_c" 1>&6
10126
echo "configure:10127: checking for location of FFMPEG includes" >&5
10127
case "$with_ffmpeg_includes" in
10128
y | ye | yes | n | no)
10129
{ echo "configure: error: *** You must supply a directory to --with-ffmpeg-includes." 1>&2; exit 1; }
10132
echo "$ac_t""$with_ffmpeg_includes" 1>&6
10134
if test -n "$with_ffmpeg_includes" ; then
10135
for dir in $with_ffmpeg_includes; do
10136
if test -d "$dir"; then
10137
FFMPEGINCPATH="$FFMPEGINCPATH -I$dir"
10139
{ echo "configure: error: *** FFMPEG includes directory $dir does not exist." 1>&2; exit 1; }
10146
ac_save_cppflags="$CPPFLAGS"
10147
CPPFLAGS="$FFMPEGINCPATH $CPPFLAGS"
10148
for ac_hdr in avcodec.h
10150
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10151
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10152
echo "configure:10153: checking for $ac_hdr" >&5
10154
cat > conftest.$ac_ext <<EOF
10155
#line 10156 "configure"
10156
#include "confdefs.h"
10159
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10160
{ (eval echo configure:10161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10161
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10162
if test -z "$ac_err"; then
10164
eval "ac_cv_header_$ac_safe=yes"
10167
echo "configure: failed program was:" >&5
10168
cat conftest.$ac_ext >&5
10170
eval "ac_cv_header_$ac_safe=no"
10173
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10174
echo "$ac_t""yes" 1>&6
10175
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10176
cat >> confdefs.h <<EOF
10177
#define $ac_tr_hdr 1
10181
echo "$ac_t""no" 1>&6
10182
{ echo "configure: error: *** Unable to locate FFMPEG includes." 1>&2; exit 1; }
10187
CPPFLAGS=$ac_save_cppflags
10190
ac_save_cppflags="$CPPFLAGS"
10191
CPPFLAGS="$FFMPEGINCPATH $CPPFLAGS"
10192
for ac_hdr in avformat.h
10194
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10195
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10196
echo "configure:10197: checking for $ac_hdr" >&5
10198
cat > conftest.$ac_ext <<EOF
10199
#line 10200 "configure"
10200
#include "confdefs.h"
10203
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10204
{ (eval echo configure:10205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10205
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10206
if test -z "$ac_err"; then
10208
eval "ac_cv_header_$ac_safe=yes"
10211
echo "configure: failed program was:" >&5
10212
cat conftest.$ac_ext >&5
10214
eval "ac_cv_header_$ac_safe=no"
10217
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10218
echo "$ac_t""yes" 1>&6
10219
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10220
cat >> confdefs.h <<EOF
10221
#define $ac_tr_hdr 1
10225
echo "$ac_t""no" 1>&6
10226
{ echo "configure: error: *** Unable to locate FFMPEG includes." 1>&2; exit 1; }
10231
CPPFLAGS=$ac_save_cppflags
10234
ac_save_cppflags="$CPPFLAGS"
10235
CPPFLAGS="$FFMPEGINCPATH $CPPFLAGS"
10236
for ac_hdr in swscale.h
10238
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10239
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10240
echo "configure:10241: checking for $ac_hdr" >&5
10242
cat > conftest.$ac_ext <<EOF
10243
#line 10244 "configure"
10244
#include "confdefs.h"
10247
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10248
{ (eval echo configure:10249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10249
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10250
if test -z "$ac_err"; then
10252
eval "ac_cv_header_$ac_safe=yes"
10255
echo "configure: failed program was:" >&5
10256
cat conftest.$ac_ext >&5
10258
eval "ac_cv_header_$ac_safe=no"
10261
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10262
echo "$ac_t""yes" 1>&6
10263
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10264
cat >> confdefs.h <<EOF
10265
#define $ac_tr_hdr 1
10269
echo "$ac_t""no" 1>&6
10270
{ echo "configure: error: *** Unable to locate FFMPEG includes." 1>&2; exit 1; }
10275
CPPFLAGS=$ac_save_cppflags
10278
cat >> confdefs.h <<\EOF
10279
#define HAVE_FFMPEG 1
10285
if test -n "$USE_FFMPEG"; then
10287
# With FFMPEG library directory
10290
echo $ac_n "checking for location of FFMPEG library""... $ac_c" 1>&6
10291
echo "configure:10292: checking for location of FFMPEG library" >&5
10292
case "$with_ffmpeg_libs" in
10293
y | ye | yes | n | no)
10294
{ echo "configure: error: *** You must supply a directory to --with-ffmpeg-libs." 1>&2; exit 1; }
10297
echo "$ac_t""$with_ffmpeg_libs" 1>&6
10299
if test -n "$with_ffmpeg_libs"; then
10300
for dir in $with_ffmpeg_libs; do
10301
if test -d "$dir"; then
10302
FFMPEGLIBPATH="$FFMPEGLIBPATH -L$dir"
10304
{ echo "configure: error: *** FFMPEG library directory $dir does not exist." 1>&2; exit 1; }
10311
ac_save_ldflags="$LDFLAGS"
10312
LDFLAGS="$FFMPEGLIBPATH $LDFLAGS"
10317
echo $ac_n "checking for av_free in -lavutil""... $ac_c" 1>&6
10318
echo "configure:10319: checking for av_free in -lavutil" >&5
10319
ac_lib_var=`echo avutil'_'av_free | sed 'y%./+-%__p_%'`
10321
ac_save_LIBS="$LIBS"
10322
LIBS="-lavutil $LIBS"
10323
cat > conftest.$ac_ext <<EOF
10324
#line 10325 "configure"
10325
#include "confdefs.h"
10326
/* Override any gcc2 internal prototype to avoid an error. */
10327
/* We use char because int might match the return type of a gcc2
10328
builtin and then its argument prototype would still apply. */
10335
if { (eval echo configure:10336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10337
eval "ac_cv_lib_$ac_lib_var=yes"
10339
echo "configure: failed program was:" >&5
10340
cat conftest.$ac_ext >&5
10342
eval "ac_cv_lib_$ac_lib_var=no"
10345
LIBS="$ac_save_LIBS"
10347
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10348
echo "$ac_t""yes" 1>&6
10349
FFMPEGLIB="$FFMPEGLIB -lavutil "
10351
echo "$ac_t""no" 1>&6
10353
echo $ac_n "checking for av_free in -lavutil""... $ac_c" 1>&6
10354
echo "configure:10355: checking for av_free in -lavutil" >&5
10355
ac_lib_var=`echo avutil'_'av_free | sed 'y%./+-%__p_%'`
10357
ac_save_LIBS="$LIBS"
10358
LIBS="-lavutil $MATHLIB $LIBS"
10359
cat > conftest.$ac_ext <<EOF
10360
#line 10361 "configure"
10361
#include "confdefs.h"
10362
/* Override any gcc2 internal prototype to avoid an error. */
10363
/* We use char because int might match the return type of a gcc2
10364
builtin and then its argument prototype would still apply. */
10371
if { (eval echo configure:10372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10373
eval "ac_cv_lib_$ac_lib_var=yes"
10375
echo "configure: failed program was:" >&5
10376
cat conftest.$ac_ext >&5
10378
eval "ac_cv_lib_$ac_lib_var=no"
10381
LIBS="$ac_save_LIBS"
10383
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10384
echo "$ac_t""yes" 1>&6
10385
FFMPEGLIB="$FFMPEGLIB -lavutil $MATHLIB"
10387
echo "$ac_t""no" 1>&6
10389
LDFLAGS=${ac_save_ldflags}
10391
{ echo "configure: error: *** Unable to locate FFMPEG library." 1>&2; exit 1; }
10406
LDFLAGS=${ac_save_ldflags}
10409
ac_save_ldflags="$LDFLAGS"
10410
LDFLAGS="$FFMPEGLIBPATH $LDFLAGS"
10415
echo $ac_n "checking for avcodec_register in -lavcodec""... $ac_c" 1>&6
10416
echo "configure:10417: checking for avcodec_register in -lavcodec" >&5
10417
ac_lib_var=`echo avcodec'_'avcodec_register | sed 'y%./+-%__p_%'`
10419
ac_save_LIBS="$LIBS"
10420
LIBS="-lavcodec $FFMPEGLIB $LIBS"
10421
cat > conftest.$ac_ext <<EOF
10422
#line 10423 "configure"
10423
#include "confdefs.h"
10424
/* Override any gcc2 internal prototype to avoid an error. */
10425
/* We use char because int might match the return type of a gcc2
10426
builtin and then its argument prototype would still apply. */
10427
char avcodec_register();
10433
if { (eval echo configure:10434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10435
eval "ac_cv_lib_$ac_lib_var=yes"
10437
echo "configure: failed program was:" >&5
10438
cat conftest.$ac_ext >&5
10440
eval "ac_cv_lib_$ac_lib_var=no"
10443
LIBS="$ac_save_LIBS"
10445
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10446
echo "$ac_t""yes" 1>&6
10447
FFMPEGLIB="$FFMPEGLIB -lavcodec "
10449
echo "$ac_t""no" 1>&6
10451
echo $ac_n "checking for avcodec_register in -lavcodec""... $ac_c" 1>&6
10452
echo "configure:10453: checking for avcodec_register in -lavcodec" >&5
10453
ac_lib_var=`echo avcodec'_'avcodec_register | sed 'y%./+-%__p_%'`
10455
ac_save_LIBS="$LIBS"
10456
LIBS="-lavcodec $FFMPEGLIB $MATHLIB $LIBS"
10457
cat > conftest.$ac_ext <<EOF
10458
#line 10459 "configure"
10459
#include "confdefs.h"
10460
/* Override any gcc2 internal prototype to avoid an error. */
10461
/* We use char because int might match the return type of a gcc2
10462
builtin and then its argument prototype would still apply. */
10463
char avcodec_register();
10469
if { (eval echo configure:10470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10471
eval "ac_cv_lib_$ac_lib_var=yes"
10473
echo "configure: failed program was:" >&5
10474
cat conftest.$ac_ext >&5
10476
eval "ac_cv_lib_$ac_lib_var=no"
10479
LIBS="$ac_save_LIBS"
10481
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10482
echo "$ac_t""yes" 1>&6
10483
FFMPEGLIB="$FFMPEGLIB -lavcodec $MATHLIB"
10485
echo "$ac_t""no" 1>&6
10487
LDFLAGS=${ac_save_ldflags}
10489
{ echo "configure: error: *** Unable to locate FFMPEG library." 1>&2; exit 1; }
10504
LDFLAGS=${ac_save_ldflags}
10507
ac_save_ldflags="$LDFLAGS"
10508
LDFLAGS="$FFMPEGLIBPATH $LDFLAGS"
10513
echo $ac_n "checking for avformat_alloc_context in -lavformat""... $ac_c" 1>&6
10514
echo "configure:10515: checking for avformat_alloc_context in -lavformat" >&5
10515
ac_lib_var=`echo avformat'_'avformat_alloc_context | sed 'y%./+-%__p_%'`
10517
ac_save_LIBS="$LIBS"
10518
LIBS="-lavformat $FFMPEGLIB $LIBS"
10519
cat > conftest.$ac_ext <<EOF
10520
#line 10521 "configure"
10521
#include "confdefs.h"
10522
/* Override any gcc2 internal prototype to avoid an error. */
10523
/* We use char because int might match the return type of a gcc2
10524
builtin and then its argument prototype would still apply. */
10525
char avformat_alloc_context();
10528
avformat_alloc_context()
10531
if { (eval echo configure:10532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10533
eval "ac_cv_lib_$ac_lib_var=yes"
10535
echo "configure: failed program was:" >&5
10536
cat conftest.$ac_ext >&5
10538
eval "ac_cv_lib_$ac_lib_var=no"
10541
LIBS="$ac_save_LIBS"
10543
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10544
echo "$ac_t""yes" 1>&6
10545
FFMPEGLIB="$FFMPEGLIB -lavformat "
10547
echo "$ac_t""no" 1>&6
10549
echo $ac_n "checking for avformat_alloc_context in -lavformat""... $ac_c" 1>&6
10550
echo "configure:10551: checking for avformat_alloc_context in -lavformat" >&5
10551
ac_lib_var=`echo avformat'_'avformat_alloc_context | sed 'y%./+-%__p_%'`
10553
ac_save_LIBS="$LIBS"
10554
LIBS="-lavformat $FFMPEGLIB $MATHLIB $LIBS"
10555
cat > conftest.$ac_ext <<EOF
10556
#line 10557 "configure"
10557
#include "confdefs.h"
10558
/* Override any gcc2 internal prototype to avoid an error. */
10559
/* We use char because int might match the return type of a gcc2
10560
builtin and then its argument prototype would still apply. */
10561
char avformat_alloc_context();
10564
avformat_alloc_context()
10567
if { (eval echo configure:10568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10569
eval "ac_cv_lib_$ac_lib_var=yes"
10571
echo "configure: failed program was:" >&5
10572
cat conftest.$ac_ext >&5
10574
eval "ac_cv_lib_$ac_lib_var=no"
10577
LIBS="$ac_save_LIBS"
10579
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10580
echo "$ac_t""yes" 1>&6
10581
FFMPEGLIB="$FFMPEGLIB -lavformat $MATHLIB"
10583
echo "$ac_t""no" 1>&6
10585
LDFLAGS=${ac_save_ldflags}
10587
{ echo "configure: error: *** Unable to locate FFMPEG library." 1>&2; exit 1; }
10602
LDFLAGS=${ac_save_ldflags}
10613
# Done checking FFMPEG
10615
8568
# Enable OpenGL option
11516
9516
# Done checking OpenGL
11518
# Enable TCLTK option
11521
echo $ac_n "checking whether to use Tcl/Tk""... $ac_c" 1>&6
11522
echo "configure:11523: checking whether to use Tcl/Tk" >&5
11523
echo "$ac_t"""$with_tcltk"" 1>&6
11524
case "$with_tcltk" in
11525
"no") USE_TCLTK= ;;
11526
"yes") USE_TCLTK="1" ;;
11527
*) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
11536
if test -n "$USE_TCLTK"; then
11538
# With Tcl/Tk includes directory
11541
echo $ac_n "checking for location of Tcl/Tk includes""... $ac_c" 1>&6
11542
echo "configure:11543: checking for location of Tcl/Tk includes" >&5
11543
case "$with_tcltk_includes" in
11544
y | ye | yes | n | no)
11545
{ echo "configure: error: *** You must supply a directory to --with-tcltk-includes." 1>&2; exit 1; }
11548
echo "$ac_t""$with_tcltk_includes" 1>&6
11550
if test -n "$with_tcltk_includes" ; then
11551
for dir in $with_tcltk_includes; do
11552
if test -d "$dir"; then
11553
TCLINCDIR="$TCLINCDIR -I$dir"
11555
{ echo "configure: error: *** Tcl/Tk includes directory $dir does not exist." 1>&2; exit 1; }
11562
ac_save_cppflags="$CPPFLAGS"
11563
CPPFLAGS="$TCLINCDIR $CPPFLAGS"
11564
for ac_hdr in tcl.h
11566
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11567
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11568
echo "configure:11569: checking for $ac_hdr" >&5
11570
cat > conftest.$ac_ext <<EOF
11571
#line 11572 "configure"
11572
#include "confdefs.h"
11575
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11576
{ (eval echo configure:11577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11577
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11578
if test -z "$ac_err"; then
11580
eval "ac_cv_header_$ac_safe=yes"
11583
echo "configure: failed program was:" >&5
11584
cat conftest.$ac_ext >&5
11586
eval "ac_cv_header_$ac_safe=no"
11589
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11590
echo "$ac_t""yes" 1>&6
11591
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11592
cat >> confdefs.h <<EOF
11593
#define $ac_tr_hdr 1
11597
echo "$ac_t""no" 1>&6
11598
{ echo "configure: error: *** Unable to locate Tcl includes." 1>&2; exit 1; }
11603
CPPFLAGS=$ac_save_cppflags
11607
ac_save_cppflags="$CPPFLAGS"
11608
CPPFLAGS="$TCLINCDIR $X_CFLAGS $CPPFLAGS"
11611
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11612
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11613
echo "configure:11614: checking for $ac_hdr" >&5
11615
cat > conftest.$ac_ext <<EOF
11616
#line 11617 "configure"
11617
#include "confdefs.h"
11620
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11621
{ (eval echo configure:11622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11622
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11623
if test -z "$ac_err"; then
11625
eval "ac_cv_header_$ac_safe=yes"
11628
echo "configure: failed program was:" >&5
11629
cat conftest.$ac_ext >&5
11631
eval "ac_cv_header_$ac_safe=no"
11634
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11635
echo "$ac_t""yes" 1>&6
11636
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11637
cat >> confdefs.h <<EOF
11638
#define $ac_tr_hdr 1
11642
echo "$ac_t""no" 1>&6
11643
{ echo "configure: error: *** Unable to locate Tk includes." 1>&2; exit 1; }
11648
CPPFLAGS=$ac_save_cppflags
11651
# Tcl/Tk version checks
11653
echo $ac_n "checking Tcl version""... $ac_c" 1>&6
11654
echo "configure:11655: checking Tcl version" >&5
11655
ac_save_cppflags="$CPPFLAGS"
11656
CPPFLAGS="$TCLINCDIR $CPPFLAGS"
11657
if test "$cross_compiling" = yes; then
11659
echo "$ac_t""unknown (cross-compiling)" 1>&6
11661
cat > conftest.$ac_ext <<EOF
11662
#line 11663 "configure"
11663
#include "confdefs.h"
11668
FILE *fp = fopen("conftestdata","w");
11669
fputs(TCL_VERSION, fp);
11674
if { (eval echo configure:11675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11676
tcl_ver=`cat conftestdata`
11677
echo "$ac_t""$tcl_ver" 1>&6
11679
echo "configure: failed program was:" >&5
11680
cat conftest.$ac_ext >&5
11682
{ echo "configure: error: *** Could not determine Tcl version." 1>&2; exit 1; }
11687
CPPFLAGS=$ac_save_cppflags
11691
echo $ac_n "checking Tk version""... $ac_c" 1>&6
11692
echo "configure:11693: checking Tk version" >&5
11693
ac_save_cppflags="$CPPFLAGS"
11694
CPPFLAGS="$TCLINCDIR $X_CFLAGS $CPPFLAGS"
11695
if test "$cross_compiling" = yes; then
11697
echo "$ac_t""unknown (cross-compiling)" 1>&6
11699
cat > conftest.$ac_ext <<EOF
11700
#line 11701 "configure"
11701
#include "confdefs.h"
11706
FILE *fp = fopen("conftestdata","w");
11707
fputs(TK_VERSION, fp);
11712
if { (eval echo configure:11713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11714
tk_ver=`cat conftestdata`
11715
echo "$ac_t""$tk_ver" 1>&6
11717
echo "configure: failed program was:" >&5
11718
cat conftest.$ac_ext >&5
11720
{ echo "configure: error: *** Could not determine Tk version." 1>&2; exit 1; }
11725
CPPFLAGS=$ac_save_cppflags
11728
if test "$tcl_ver" = "$tk_ver" ; then
11729
tcltk_ver="$tcl_ver"
11731
{ echo "configure: error: *** Tcl/Tk version mismatch." 1>&2; exit 1; }
11734
TCL_VERSION="$tcl_ver"
11736
# FreeBSD and CygWin don't have a "dot" between major/minor version number
11737
tcltk_ver2=`echo "$tcltk_ver" | sed 's/\.//g'`
11739
# With Tcl/Tk library directory
11742
echo $ac_n "checking for location of Tcl/Tk library""... $ac_c" 1>&6
11743
echo "configure:11744: checking for location of Tcl/Tk library" >&5
11744
case "$with_tcltk_libs" in
11745
y | ye | yes | n | no)
11746
{ echo "configure: error: *** You must supply a directory to --with-tcltk-libs." 1>&2; exit 1; }
11749
echo "$ac_t""$with_tcltk_libs" 1>&6
11751
if test -n "$with_tcltk_libs"; then
11752
for dir in $with_tcltk_libs; do
11753
if test -d "$dir"; then
11754
TCLTKLIBPATH="$TCLTKLIBPATH -L$dir"
11756
{ echo "configure: error: *** Tcl/Tk library directory $dir does not exist." 1>&2; exit 1; }
11764
MACOSX_ARCHS_TCLTK=
11766
# Can't test tcl/tk libs on 64bit OSX Aqua for now
11767
# assume that if OpenGL Aqua, then user specifies TclTk Aqua
11768
if test "$OPENGL_AQUA" = 1 ; then
11769
save_CFLAGS="$CFLAGS"
11770
CFLAGS="`echo \"$CFLAGS\" | sed -E 's/-arch +x86_64//g' | sed -E 's/-arch +ppc64//g'`"
11771
save_LDFLAGS="$LDFLAGS"
11772
LDFLAGS="`echo \"$LDFLAGS\" | sed -E 's/-arch +x86_64//g' | sed -E 's/-arch +ppc64//g'`"
11776
ac_save_ldflags="$LDFLAGS"
11777
LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
11782
echo $ac_n "checking for Tcl_Init in -ltcl""... $ac_c" 1>&6
11783
echo "configure:11784: checking for Tcl_Init in -ltcl" >&5
11784
ac_lib_var=`echo tcl'_'Tcl_Init | sed 'y%./+-%__p_%'`
11786
ac_save_LIBS="$LIBS"
11787
LIBS="-ltcl $MATHLIB $LIBS"
11788
cat > conftest.$ac_ext <<EOF
11789
#line 11790 "configure"
11790
#include "confdefs.h"
11791
/* Override any gcc2 internal prototype to avoid an error. */
11792
/* We use char because int might match the return type of a gcc2
11793
builtin and then its argument prototype would still apply. */
11800
if { (eval echo configure:11801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11802
eval "ac_cv_lib_$ac_lib_var=yes"
11804
echo "configure: failed program was:" >&5
11805
cat conftest.$ac_ext >&5
11807
eval "ac_cv_lib_$ac_lib_var=no"
11810
LIBS="$ac_save_LIBS"
11812
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11813
echo "$ac_t""yes" 1>&6
11814
TCLLIB="$TCLLIB -ltcl $MATHLIB"
11816
echo "$ac_t""no" 1>&6
11818
echo $ac_n "checking for Tcl_Init in -ltcl""... $ac_c" 1>&6
11819
echo "configure:11820: checking for Tcl_Init in -ltcl" >&5
11820
ac_lib_var=`echo tcl'_'Tcl_Init | sed 'y%./+-%__p_%'`
11822
ac_save_LIBS="$LIBS"
11823
LIBS="-ltcl $MATHLIB $DLLIB $LIBS"
11824
cat > conftest.$ac_ext <<EOF
11825
#line 11826 "configure"
11826
#include "confdefs.h"
11827
/* Override any gcc2 internal prototype to avoid an error. */
11828
/* We use char because int might match the return type of a gcc2
11829
builtin and then its argument prototype would still apply. */
11836
if { (eval echo configure:11837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11838
eval "ac_cv_lib_$ac_lib_var=yes"
11840
echo "configure: failed program was:" >&5
11841
cat conftest.$ac_ext >&5
11843
eval "ac_cv_lib_$ac_lib_var=no"
11846
LIBS="$ac_save_LIBS"
11848
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11849
echo "$ac_t""yes" 1>&6
11850
TCLLIB="$TCLLIB -ltcl $MATHLIB $DLLIB"
11852
echo "$ac_t""no" 1>&6
11854
LDFLAGS=${ac_save_ldflags}
11856
ac_save_ldflags="$LDFLAGS"
11857
LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
11862
echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver""... $ac_c" 1>&6
11863
echo "configure:11864: checking for Tcl_Init in -ltcl$tcltk_ver" >&5
11864
ac_lib_var=`echo tcl$tcltk_ver'_'Tcl_Init | sed 'y%./+-%__p_%'`
11866
ac_save_LIBS="$LIBS"
11867
LIBS="-ltcl$tcltk_ver $MATHLIB $LIBS"
11868
cat > conftest.$ac_ext <<EOF
11869
#line 11870 "configure"
11870
#include "confdefs.h"
11871
/* Override any gcc2 internal prototype to avoid an error. */
11872
/* We use char because int might match the return type of a gcc2
11873
builtin and then its argument prototype would still apply. */
11880
if { (eval echo configure:11881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11882
eval "ac_cv_lib_$ac_lib_var=yes"
11884
echo "configure: failed program was:" >&5
11885
cat conftest.$ac_ext >&5
11887
eval "ac_cv_lib_$ac_lib_var=no"
11890
LIBS="$ac_save_LIBS"
11892
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11893
echo "$ac_t""yes" 1>&6
11894
TCLLIB="$TCLLIB -ltcl$tcltk_ver $MATHLIB"
11896
echo "$ac_t""no" 1>&6
11898
echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver""... $ac_c" 1>&6
11899
echo "configure:11900: checking for Tcl_Init in -ltcl$tcltk_ver" >&5
11900
ac_lib_var=`echo tcl$tcltk_ver'_'Tcl_Init | sed 'y%./+-%__p_%'`
11902
ac_save_LIBS="$LIBS"
11903
LIBS="-ltcl$tcltk_ver $MATHLIB $DLLIB $LIBS"
11904
cat > conftest.$ac_ext <<EOF
11905
#line 11906 "configure"
11906
#include "confdefs.h"
11907
/* Override any gcc2 internal prototype to avoid an error. */
11908
/* We use char because int might match the return type of a gcc2
11909
builtin and then its argument prototype would still apply. */
11916
if { (eval echo configure:11917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11918
eval "ac_cv_lib_$ac_lib_var=yes"
11920
echo "configure: failed program was:" >&5
11921
cat conftest.$ac_ext >&5
11923
eval "ac_cv_lib_$ac_lib_var=no"
11926
LIBS="$ac_save_LIBS"
11928
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11929
echo "$ac_t""yes" 1>&6
11930
TCLLIB="$TCLLIB -ltcl$tcltk_ver $MATHLIB $DLLIB"
11932
echo "$ac_t""no" 1>&6
11934
LDFLAGS=${ac_save_ldflags}
11936
ac_save_ldflags="$LDFLAGS"
11937
LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
11942
echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver2""... $ac_c" 1>&6
11943
echo "configure:11944: checking for Tcl_Init in -ltcl$tcltk_ver2" >&5
11944
ac_lib_var=`echo tcl$tcltk_ver2'_'Tcl_Init | sed 'y%./+-%__p_%'`
11946
ac_save_LIBS="$LIBS"
11947
LIBS="-ltcl$tcltk_ver2 $MATHLIB $LIBS"
11948
cat > conftest.$ac_ext <<EOF
11949
#line 11950 "configure"
11950
#include "confdefs.h"
11951
/* Override any gcc2 internal prototype to avoid an error. */
11952
/* We use char because int might match the return type of a gcc2
11953
builtin and then its argument prototype would still apply. */
11960
if { (eval echo configure:11961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11962
eval "ac_cv_lib_$ac_lib_var=yes"
11964
echo "configure: failed program was:" >&5
11965
cat conftest.$ac_ext >&5
11967
eval "ac_cv_lib_$ac_lib_var=no"
11970
LIBS="$ac_save_LIBS"
11972
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11973
echo "$ac_t""yes" 1>&6
11974
TCLLIB="$TCLLIB -ltcl$tcltk_ver2 $MATHLIB"
11976
echo "$ac_t""no" 1>&6
11978
echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver2""... $ac_c" 1>&6
11979
echo "configure:11980: checking for Tcl_Init in -ltcl$tcltk_ver2" >&5
11980
ac_lib_var=`echo tcl$tcltk_ver2'_'Tcl_Init | sed 'y%./+-%__p_%'`
11982
ac_save_LIBS="$LIBS"
11983
LIBS="-ltcl$tcltk_ver2 $MATHLIB $DLLIB $LIBS"
11984
cat > conftest.$ac_ext <<EOF
11985
#line 11986 "configure"
11986
#include "confdefs.h"
11987
/* Override any gcc2 internal prototype to avoid an error. */
11988
/* We use char because int might match the return type of a gcc2
11989
builtin and then its argument prototype would still apply. */
11996
if { (eval echo configure:11997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11998
eval "ac_cv_lib_$ac_lib_var=yes"
12000
echo "configure: failed program was:" >&5
12001
cat conftest.$ac_ext >&5
12003
eval "ac_cv_lib_$ac_lib_var=no"
12006
LIBS="$ac_save_LIBS"
12008
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12009
echo "$ac_t""yes" 1>&6
12010
TCLLIB="$TCLLIB -ltcl$tcltk_ver2 $MATHLIB $DLLIB"
12012
echo "$ac_t""no" 1>&6
12014
LDFLAGS=${ac_save_ldflags}
12016
{ echo "configure: error: *** Unable to locate Tcl library." 1>&2; exit 1; }
12031
LDFLAGS=${ac_save_ldflags}
12047
LDFLAGS=${ac_save_ldflags}
12063
LDFLAGS=${ac_save_ldflags}
12067
ac_save_ldflags="$LDFLAGS"
12068
LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
12073
echo $ac_n "checking for Tk_MainWindow in -ltk""... $ac_c" 1>&6
12074
echo "configure:12075: checking for Tk_MainWindow in -ltk" >&5
12075
ac_lib_var=`echo tk'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
12077
ac_save_LIBS="$LIBS"
12078
LIBS="-ltk $TCLLIB $MATHLIB $LIBS"
12079
cat > conftest.$ac_ext <<EOF
12080
#line 12081 "configure"
12081
#include "confdefs.h"
12082
/* Override any gcc2 internal prototype to avoid an error. */
12083
/* We use char because int might match the return type of a gcc2
12084
builtin and then its argument prototype would still apply. */
12085
char Tk_MainWindow();
12091
if { (eval echo configure:12092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12093
eval "ac_cv_lib_$ac_lib_var=yes"
12095
echo "configure: failed program was:" >&5
12096
cat conftest.$ac_ext >&5
12098
eval "ac_cv_lib_$ac_lib_var=no"
12101
LIBS="$ac_save_LIBS"
12103
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12104
echo "$ac_t""yes" 1>&6
12105
TKLIB="$TKLIB -ltk $MATHLIB"
12107
echo "$ac_t""no" 1>&6
12109
echo $ac_n "checking for Tk_MainWindow in -ltk""... $ac_c" 1>&6
12110
echo "configure:12111: checking for Tk_MainWindow in -ltk" >&5
12111
ac_lib_var=`echo tk'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
12113
ac_save_LIBS="$LIBS"
12114
LIBS="-ltk $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
12115
cat > conftest.$ac_ext <<EOF
12116
#line 12117 "configure"
12117
#include "confdefs.h"
12118
/* Override any gcc2 internal prototype to avoid an error. */
12119
/* We use char because int might match the return type of a gcc2
12120
builtin and then its argument prototype would still apply. */
12121
char Tk_MainWindow();
12127
if { (eval echo configure:12128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12129
eval "ac_cv_lib_$ac_lib_var=yes"
12131
echo "configure: failed program was:" >&5
12132
cat conftest.$ac_ext >&5
12134
eval "ac_cv_lib_$ac_lib_var=no"
12137
LIBS="$ac_save_LIBS"
12139
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12140
echo "$ac_t""yes" 1>&6
12141
TKLIB="$TKLIB -ltk $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
12143
echo "$ac_t""no" 1>&6
12145
LDFLAGS=${ac_save_ldflags}
12147
ac_save_ldflags="$LDFLAGS"
12148
LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
12153
echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver""... $ac_c" 1>&6
12154
echo "configure:12155: checking for Tk_MainWindow in -ltk$tcltk_ver" >&5
12155
ac_lib_var=`echo tk$tcltk_ver'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
12157
ac_save_LIBS="$LIBS"
12158
LIBS="-ltk$tcltk_ver $TCLLIB $MATHLIB $LIBS"
12159
cat > conftest.$ac_ext <<EOF
12160
#line 12161 "configure"
12161
#include "confdefs.h"
12162
/* Override any gcc2 internal prototype to avoid an error. */
12163
/* We use char because int might match the return type of a gcc2
12164
builtin and then its argument prototype would still apply. */
12165
char Tk_MainWindow();
12171
if { (eval echo configure:12172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12173
eval "ac_cv_lib_$ac_lib_var=yes"
12175
echo "configure: failed program was:" >&5
12176
cat conftest.$ac_ext >&5
12178
eval "ac_cv_lib_$ac_lib_var=no"
12181
LIBS="$ac_save_LIBS"
12183
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12184
echo "$ac_t""yes" 1>&6
12185
TKLIB="$TKLIB -ltk$tcltk_ver $MATHLIB"
12187
echo "$ac_t""no" 1>&6
12189
echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver""... $ac_c" 1>&6
12190
echo "configure:12191: checking for Tk_MainWindow in -ltk$tcltk_ver" >&5
12191
ac_lib_var=`echo tk$tcltk_ver'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
12193
ac_save_LIBS="$LIBS"
12194
LIBS="-ltk$tcltk_ver $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
12195
cat > conftest.$ac_ext <<EOF
12196
#line 12197 "configure"
12197
#include "confdefs.h"
12198
/* Override any gcc2 internal prototype to avoid an error. */
12199
/* We use char because int might match the return type of a gcc2
12200
builtin and then its argument prototype would still apply. */
12201
char Tk_MainWindow();
12207
if { (eval echo configure:12208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12209
eval "ac_cv_lib_$ac_lib_var=yes"
12211
echo "configure: failed program was:" >&5
12212
cat conftest.$ac_ext >&5
12214
eval "ac_cv_lib_$ac_lib_var=no"
12217
LIBS="$ac_save_LIBS"
12219
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12220
echo "$ac_t""yes" 1>&6
12221
TKLIB="$TKLIB -ltk$tcltk_ver $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
12223
echo "$ac_t""no" 1>&6
12225
LDFLAGS=${ac_save_ldflags}
12227
ac_save_ldflags="$LDFLAGS"
12228
LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
12233
echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver2""... $ac_c" 1>&6
12234
echo "configure:12235: checking for Tk_MainWindow in -ltk$tcltk_ver2" >&5
12235
ac_lib_var=`echo tk$tcltk_ver2'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
12237
ac_save_LIBS="$LIBS"
12238
LIBS="-ltk$tcltk_ver2 $TCLLIB $MATHLIB $LIBS"
12239
cat > conftest.$ac_ext <<EOF
12240
#line 12241 "configure"
12241
#include "confdefs.h"
12242
/* Override any gcc2 internal prototype to avoid an error. */
12243
/* We use char because int might match the return type of a gcc2
12244
builtin and then its argument prototype would still apply. */
12245
char Tk_MainWindow();
12251
if { (eval echo configure:12252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12253
eval "ac_cv_lib_$ac_lib_var=yes"
12255
echo "configure: failed program was:" >&5
12256
cat conftest.$ac_ext >&5
12258
eval "ac_cv_lib_$ac_lib_var=no"
12261
LIBS="$ac_save_LIBS"
12263
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12264
echo "$ac_t""yes" 1>&6
12265
TKLIB="$TKLIB -ltk$tcltk_ver2 $MATHLIB"
12267
echo "$ac_t""no" 1>&6
12269
echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver2""... $ac_c" 1>&6
12270
echo "configure:12271: checking for Tk_MainWindow in -ltk$tcltk_ver2" >&5
12271
ac_lib_var=`echo tk$tcltk_ver2'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
12273
ac_save_LIBS="$LIBS"
12274
LIBS="-ltk$tcltk_ver2 $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
12275
cat > conftest.$ac_ext <<EOF
12276
#line 12277 "configure"
12277
#include "confdefs.h"
12278
/* Override any gcc2 internal prototype to avoid an error. */
12279
/* We use char because int might match the return type of a gcc2
12280
builtin and then its argument prototype would still apply. */
12281
char Tk_MainWindow();
12287
if { (eval echo configure:12288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12289
eval "ac_cv_lib_$ac_lib_var=yes"
12291
echo "configure: failed program was:" >&5
12292
cat conftest.$ac_ext >&5
12294
eval "ac_cv_lib_$ac_lib_var=no"
12297
LIBS="$ac_save_LIBS"
12299
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12300
echo "$ac_t""yes" 1>&6
12301
TKLIB="$TKLIB -ltk$tcltk_ver2 $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
12303
echo "$ac_t""no" 1>&6
12305
LDFLAGS=${ac_save_ldflags}
12307
{ echo "configure: error: *** Unable to locate Tk library." 1>&2; exit 1; }
12322
LDFLAGS=${ac_save_ldflags}
12338
LDFLAGS=${ac_save_ldflags}
12354
LDFLAGS=${ac_save_ldflags}
12357
# restore CFLAGS/LDLFAGS from Aqua 64bit strip
12358
# only Tcl/Tk-based makefiles will strip 64bit out during compile
12359
if test "$OPENGL_AQUA" = 1 ; then
12360
CFLAGS="$save_CFLAGS"
12361
LDFLAGS="$save_LDFLAGS"
12364
TCLTKLIBS="$TKLIB $TCLLIB"
12366
# check for available OSX archs in TclTk
12367
if test -n "$MACOSX_ARCHS" ; then
12368
save_LDFLAGS="$LDFLAGS"
12370
save_CFLAGS="$CFLAGS"
12372
tlib=`echo "$TCLLIB" | sed -e 's/-l//' -e 's/^ *//' -e 's/ *$//'`
12373
for a in i386 ppc x86_64 ppc64
12375
# add only if in MACOSX_ARCHS
12376
echo $ac_n "checking for Tcl_Init in -l$tlib""... $ac_c" 1>&6
12377
echo "configure:12378: checking for Tcl_Init in -l$tlib" >&5
12378
ac_lib_var=`echo $tlib'_'Tcl_Init | sed 'y%./+-%__p_%'`
12380
ac_save_LIBS="$LIBS"
12381
LIBS="-l$tlib -arch $a $MACOSX_SDK $TCLTKLIBPATH $LIBS"
12382
cat > conftest.$ac_ext <<EOF
12383
#line 12384 "configure"
12384
#include "confdefs.h"
12385
/* Override any gcc2 internal prototype to avoid an error. */
12386
/* We use char because int might match the return type of a gcc2
12387
builtin and then its argument prototype would still apply. */
12394
if { (eval echo configure:12395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12396
eval "ac_cv_lib_$ac_lib_var=yes"
12398
echo "configure: failed program was:" >&5
12399
cat conftest.$ac_ext >&5
12401
eval "ac_cv_lib_$ac_lib_var=no"
12404
LIBS="$ac_save_LIBS"
12406
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12407
echo "$ac_t""yes" 1>&6
12409
if test -n "`echo "$MACOSX_ARCHS" | grep $a`" ; then
12410
MACOSX_ARCHS_TCLTK="$MACOSX_ARCHS_TCLTK -arch $a"
12414
echo "$ac_t""no" 1>&6
12418
LDFLAGS="$save_LDFLAGS"
12419
CFLAGS="$save_CFLAGS"
12422
cat >> confdefs.h <<\EOF
12423
#define HAVE_TCLTK 1
12429
TKINCDIR=$TCLINCDIR
12437
# Done checking Tcl/Tk
12439
9518
# Enable ODBC option
12442
9521
echo $ac_n "checking whether to use ODBC""... $ac_c" 1>&6
12443
echo "configure:12444: checking whether to use ODBC" >&5
9522
echo "configure:9523: checking whether to use ODBC" >&5
12444
9523
echo "$ac_t"""$with_odbc"" 1>&6
12445
9524
case "$with_odbc" in
12446
9525
"no") USE_ODBC= ;;
14476
11385
# Done checking Cairo
14478
# Enable GLw option
14481
echo $ac_n "checking whether to use GLw""... $ac_c" 1>&6
14482
echo "configure:14483: checking whether to use GLw" >&5
14483
echo "$ac_t"""$with_glw"" 1>&6
14484
case "$with_glw" in
14486
"yes") USE_GLW="1" ;;
14487
*) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
14495
if test -n "$USE_GLW"; then
14497
# With GLw includes directory
14500
echo $ac_n "checking for location of GLw includes""... $ac_c" 1>&6
14501
echo "configure:14502: checking for location of GLw includes" >&5
14502
case "$with_glw_includes" in
14503
y | ye | yes | n | no)
14504
{ echo "configure: error: *** You must supply a directory to --with-glw-includes." 1>&2; exit 1; }
14507
echo "$ac_t""$with_glw_includes" 1>&6
14509
if test -n "$with_glw_includes" ; then
14510
for dir in $with_glw_includes; do
14511
if test -d "$dir"; then
14512
OPENGLWINC="$OPENGLWINC -I$dir"
14514
{ echo "configure: error: *** GLw includes directory $dir does not exist." 1>&2; exit 1; }
14521
ac_save_cppflags="$CPPFLAGS"
14522
CPPFLAGS="$OPENGLWINC $XMINC $X_CFLAGS $OPENGLINC $CPPFLAGS"
14523
for ac_hdr in GL/GLwMDrawA.h
14525
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14526
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14527
echo "configure:14528: checking for $ac_hdr" >&5
14529
cat > conftest.$ac_ext <<EOF
14530
#line 14531 "configure"
14531
#include "confdefs.h"
14534
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14535
{ (eval echo configure:14536: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14536
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14537
if test -z "$ac_err"; then
14539
eval "ac_cv_header_$ac_safe=yes"
14542
echo "configure: failed program was:" >&5
14543
cat conftest.$ac_ext >&5
14545
eval "ac_cv_header_$ac_safe=no"
14548
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14549
echo "$ac_t""yes" 1>&6
14550
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14551
cat >> confdefs.h <<EOF
14552
#define $ac_tr_hdr 1
14556
echo "$ac_t""no" 1>&6
14557
ac_save_cppflags="$CPPFLAGS"
14558
CPPFLAGS=" $CPPFLAGS"
14559
for ac_hdr in X11/GLw/GLwMDrawA.h
14561
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14562
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14563
echo "configure:14564: checking for $ac_hdr" >&5
14565
cat > conftest.$ac_ext <<EOF
14566
#line 14567 "configure"
14567
#include "confdefs.h"
14570
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14571
{ (eval echo configure:14572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14572
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14573
if test -z "$ac_err"; then
14575
eval "ac_cv_header_$ac_safe=yes"
14578
echo "configure: failed program was:" >&5
14579
cat conftest.$ac_ext >&5
14581
eval "ac_cv_header_$ac_safe=no"
14584
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14585
echo "$ac_t""yes" 1>&6
14586
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14587
cat >> confdefs.h <<EOF
14588
#define $ac_tr_hdr 1
14592
echo "$ac_t""no" 1>&6
14593
{ echo "configure: error: *** Unable to locate GLwM includes." 1>&2; exit 1; }
14598
CPPFLAGS=$ac_save_cppflags
14604
CPPFLAGS=$ac_save_cppflags
14607
# With GLw library directory
14610
echo $ac_n "checking for location of GLw library""... $ac_c" 1>&6
14611
echo "configure:14612: checking for location of GLw library" >&5
14612
case "$with_glw_libs" in
14613
y | ye | yes | n | no)
14614
{ echo "configure: error: *** You must supply a directory to --with-glw-libs." 1>&2; exit 1; }
14617
echo "$ac_t""$with_glw_libs" 1>&6
14619
if test -n "$with_glw_libs"; then
14620
for dir in $with_glw_libs; do
14621
if test -d "$dir"; then
14622
OPENGLWM="$OPENGLWM -L$dir"
14624
{ echo "configure: error: *** GLw library directory $dir does not exist." 1>&2; exit 1; }
14631
ac_save_ldflags="$LDFLAGS"
14632
LDFLAGS="$OPENGLWM $XMLIB $OPENGL_LIB_PATH $LDFLAGS"
14635
echo $ac_n "checking for GLwCreateMDrawingArea in -lGLw""... $ac_c" 1>&6
14636
echo "configure:14637: checking for GLwCreateMDrawingArea in -lGLw" >&5
14637
ac_lib_var=`echo GLw'_'GLwCreateMDrawingArea | sed 'y%./+-%__p_%'`
14639
ac_save_LIBS="$LIBS"
14640
LIBS="-lGLw $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
14641
cat > conftest.$ac_ext <<EOF
14642
#line 14643 "configure"
14643
#include "confdefs.h"
14644
/* Override any gcc2 internal prototype to avoid an error. */
14645
/* We use char because int might match the return type of a gcc2
14646
builtin and then its argument prototype would still apply. */
14647
char GLwCreateMDrawingArea();
14650
GLwCreateMDrawingArea()
14653
if { (eval echo configure:14654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14655
eval "ac_cv_lib_$ac_lib_var=yes"
14657
echo "configure: failed program was:" >&5
14658
cat conftest.$ac_ext >&5
14660
eval "ac_cv_lib_$ac_lib_var=no"
14663
LIBS="$ac_save_LIBS"
14665
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14666
echo "$ac_t""yes" 1>&6
14667
OPENGLWM="$OPENGLWM -lGLw "
14669
echo "$ac_t""no" 1>&6
14671
LDFLAGS=${ac_save_ldflags}
14673
ac_save_ldflags="$LDFLAGS"
14674
LDFLAGS="$OPENGLWM $XMLIB $OPENGL_LIB_PATH $LDFLAGS"
14677
echo $ac_n "checking for GLwCreateM1DrawingArea in -lGLw""... $ac_c" 1>&6
14678
echo "configure:14679: checking for GLwCreateM1DrawingArea in -lGLw" >&5
14679
ac_lib_var=`echo GLw'_'GLwCreateM1DrawingArea | sed 'y%./+-%__p_%'`
14681
ac_save_LIBS="$LIBS"
14682
LIBS="-lGLw $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
14683
cat > conftest.$ac_ext <<EOF
14684
#line 14685 "configure"
14685
#include "confdefs.h"
14686
/* Override any gcc2 internal prototype to avoid an error. */
14687
/* We use char because int might match the return type of a gcc2
14688
builtin and then its argument prototype would still apply. */
14689
char GLwCreateM1DrawingArea();
14692
GLwCreateM1DrawingArea()
14695
if { (eval echo configure:14696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14697
eval "ac_cv_lib_$ac_lib_var=yes"
14699
echo "configure: failed program was:" >&5
14700
cat conftest.$ac_ext >&5
14702
eval "ac_cv_lib_$ac_lib_var=no"
14705
LIBS="$ac_save_LIBS"
14707
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14708
echo "$ac_t""yes" 1>&6
14709
OPENGLWM="$OPENGLWM -lGLw "
14711
echo "$ac_t""no" 1>&6
14713
LDFLAGS=${ac_save_ldflags}
14715
ac_save_ldflags="$LDFLAGS"
14716
LDFLAGS="$OPENGLWM $XMLIB $OPENGL_LIB_PATH $LDFLAGS"
14719
echo $ac_n "checking for GLwCreateM2DrawingArea in -lGLw""... $ac_c" 1>&6
14720
echo "configure:14721: checking for GLwCreateM2DrawingArea in -lGLw" >&5
14721
ac_lib_var=`echo GLw'_'GLwCreateM2DrawingArea | sed 'y%./+-%__p_%'`
14723
ac_save_LIBS="$LIBS"
14724
LIBS="-lGLw $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
14725
cat > conftest.$ac_ext <<EOF
14726
#line 14727 "configure"
14727
#include "confdefs.h"
14728
/* Override any gcc2 internal prototype to avoid an error. */
14729
/* We use char because int might match the return type of a gcc2
14730
builtin and then its argument prototype would still apply. */
14731
char GLwCreateM2DrawingArea();
14734
GLwCreateM2DrawingArea()
14737
if { (eval echo configure:14738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14739
eval "ac_cv_lib_$ac_lib_var=yes"
14741
echo "configure: failed program was:" >&5
14742
cat conftest.$ac_ext >&5
14744
eval "ac_cv_lib_$ac_lib_var=no"
14747
LIBS="$ac_save_LIBS"
14749
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14750
echo "$ac_t""yes" 1>&6
14751
OPENGLWM="$OPENGLWM -lGLw "
14753
echo "$ac_t""no" 1>&6
14755
LDFLAGS=${ac_save_ldflags}
14757
ac_save_ldflags="$LDFLAGS"
14758
LDFLAGS="$OPENGLWM $XMLIB $OPENGL_LIB_PATH $LDFLAGS"
14761
echo $ac_n "checking for GLwCreateMDrawingArea in -lGLwM""... $ac_c" 1>&6
14762
echo "configure:14763: checking for GLwCreateMDrawingArea in -lGLwM" >&5
14763
ac_lib_var=`echo GLwM'_'GLwCreateMDrawingArea | sed 'y%./+-%__p_%'`
14765
ac_save_LIBS="$LIBS"
14766
LIBS="-lGLwM $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
14767
cat > conftest.$ac_ext <<EOF
14768
#line 14769 "configure"
14769
#include "confdefs.h"
14770
/* Override any gcc2 internal prototype to avoid an error. */
14771
/* We use char because int might match the return type of a gcc2
14772
builtin and then its argument prototype would still apply. */
14773
char GLwCreateMDrawingArea();
14776
GLwCreateMDrawingArea()
14779
if { (eval echo configure:14780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14781
eval "ac_cv_lib_$ac_lib_var=yes"
14783
echo "configure: failed program was:" >&5
14784
cat conftest.$ac_ext >&5
14786
eval "ac_cv_lib_$ac_lib_var=no"
14789
LIBS="$ac_save_LIBS"
14791
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14792
echo "$ac_t""yes" 1>&6
14793
OPENGLWM="$OPENGLWM -lGLwM "
14795
echo "$ac_t""no" 1>&6
14797
LDFLAGS=${ac_save_ldflags}
14799
ac_save_ldflags="$LDFLAGS"
14800
LDFLAGS="$OPENGLWM $XMLIB $OPENGL_LIB_PATH $LDFLAGS"
14803
echo $ac_n "checking for GLwCreateM1DrawingArea in -lGLwM""... $ac_c" 1>&6
14804
echo "configure:14805: checking for GLwCreateM1DrawingArea in -lGLwM" >&5
14805
ac_lib_var=`echo GLwM'_'GLwCreateM1DrawingArea | sed 'y%./+-%__p_%'`
14807
ac_save_LIBS="$LIBS"
14808
LIBS="-lGLwM $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
14809
cat > conftest.$ac_ext <<EOF
14810
#line 14811 "configure"
14811
#include "confdefs.h"
14812
/* Override any gcc2 internal prototype to avoid an error. */
14813
/* We use char because int might match the return type of a gcc2
14814
builtin and then its argument prototype would still apply. */
14815
char GLwCreateM1DrawingArea();
14818
GLwCreateM1DrawingArea()
14821
if { (eval echo configure:14822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14823
eval "ac_cv_lib_$ac_lib_var=yes"
14825
echo "configure: failed program was:" >&5
14826
cat conftest.$ac_ext >&5
14828
eval "ac_cv_lib_$ac_lib_var=no"
14831
LIBS="$ac_save_LIBS"
14833
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14834
echo "$ac_t""yes" 1>&6
14835
OPENGLWM="$OPENGLWM -lGLwM "
14837
echo "$ac_t""no" 1>&6
14839
LDFLAGS=${ac_save_ldflags}
14841
ac_save_ldflags="$LDFLAGS"
14842
LDFLAGS="$OPENGLWM $XMLIB $OPENGL_LIB_PATH $LDFLAGS"
14845
echo $ac_n "checking for GLwCreateM2DrawingArea in -lGLwM""... $ac_c" 1>&6
14846
echo "configure:14847: checking for GLwCreateM2DrawingArea in -lGLwM" >&5
14847
ac_lib_var=`echo GLwM'_'GLwCreateM2DrawingArea | sed 'y%./+-%__p_%'`
14849
ac_save_LIBS="$LIBS"
14850
LIBS="-lGLwM $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
14851
cat > conftest.$ac_ext <<EOF
14852
#line 14853 "configure"
14853
#include "confdefs.h"
14854
/* Override any gcc2 internal prototype to avoid an error. */
14855
/* We use char because int might match the return type of a gcc2
14856
builtin and then its argument prototype would still apply. */
14857
char GLwCreateM2DrawingArea();
14860
GLwCreateM2DrawingArea()
14863
if { (eval echo configure:14864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14865
eval "ac_cv_lib_$ac_lib_var=yes"
14867
echo "configure: failed program was:" >&5
14868
cat conftest.$ac_ext >&5
14870
eval "ac_cv_lib_$ac_lib_var=no"
14873
LIBS="$ac_save_LIBS"
14875
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14876
echo "$ac_t""yes" 1>&6
14877
OPENGLWM="$OPENGLWM -lGLwM "
14879
echo "$ac_t""no" 1>&6
14881
LDFLAGS=${ac_save_ldflags}
14883
ac_save_ldflags="$LDFLAGS"
14884
LDFLAGS="$OPENGLWM $XMLIB $OPENGL_LIB_PATH $LDFLAGS"
14889
echo $ac_n "checking for GLwCreateMDrawingArea in -lMesaGLw""... $ac_c" 1>&6
14890
echo "configure:14891: checking for GLwCreateMDrawingArea in -lMesaGLw" >&5
14891
ac_lib_var=`echo MesaGLw'_'GLwCreateMDrawingArea | sed 'y%./+-%__p_%'`
14893
ac_save_LIBS="$LIBS"
14894
LIBS="-lMesaGLw $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
14895
cat > conftest.$ac_ext <<EOF
14896
#line 14897 "configure"
14897
#include "confdefs.h"
14898
/* Override any gcc2 internal prototype to avoid an error. */
14899
/* We use char because int might match the return type of a gcc2
14900
builtin and then its argument prototype would still apply. */
14901
char GLwCreateMDrawingArea();
14904
GLwCreateMDrawingArea()
14907
if { (eval echo configure:14908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14909
eval "ac_cv_lib_$ac_lib_var=yes"
14911
echo "configure: failed program was:" >&5
14912
cat conftest.$ac_ext >&5
14914
eval "ac_cv_lib_$ac_lib_var=no"
14917
LIBS="$ac_save_LIBS"
14919
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14920
echo "$ac_t""yes" 1>&6
14921
OPENGLWM="$OPENGLWM -lMesaGLw "
14923
echo "$ac_t""no" 1>&6
14925
echo $ac_n "checking for GLwCreateMDrawingArea in -lMesaGLw""... $ac_c" 1>&6
14926
echo "configure:14927: checking for GLwCreateMDrawingArea in -lMesaGLw" >&5
14927
ac_lib_var=`echo MesaGLw'_'GLwCreateMDrawingArea | sed 'y%./+-%__p_%'`
14929
ac_save_LIBS="$LIBS"
14930
LIBS="-lMesaGLw $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $OPENGLULIB $LIBS"
14931
cat > conftest.$ac_ext <<EOF
14932
#line 14933 "configure"
14933
#include "confdefs.h"
14934
/* Override any gcc2 internal prototype to avoid an error. */
14935
/* We use char because int might match the return type of a gcc2
14936
builtin and then its argument prototype would still apply. */
14937
char GLwCreateMDrawingArea();
14940
GLwCreateMDrawingArea()
14943
if { (eval echo configure:14944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14945
eval "ac_cv_lib_$ac_lib_var=yes"
14947
echo "configure: failed program was:" >&5
14948
cat conftest.$ac_ext >&5
14950
eval "ac_cv_lib_$ac_lib_var=no"
14953
LIBS="$ac_save_LIBS"
14955
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14956
echo "$ac_t""yes" 1>&6
14957
OPENGLWM="$OPENGLWM -lMesaGLw $OPENGLULIB"
14959
echo "$ac_t""no" 1>&6
14961
LDFLAGS=${ac_save_ldflags}
14963
ac_save_ldflags="$LDFLAGS"
14964
LDFLAGS="$OPENGLWM $XMLIB $OPENGL_LIB_PATH $LDFLAGS"
14969
echo $ac_n "checking for GLwCreateMDrawingArea in -lMesaGLwM""... $ac_c" 1>&6
14970
echo "configure:14971: checking for GLwCreateMDrawingArea in -lMesaGLwM" >&5
14971
ac_lib_var=`echo MesaGLwM'_'GLwCreateMDrawingArea | sed 'y%./+-%__p_%'`
14973
ac_save_LIBS="$LIBS"
14974
LIBS="-lMesaGLwM $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $LIBS"
14975
cat > conftest.$ac_ext <<EOF
14976
#line 14977 "configure"
14977
#include "confdefs.h"
14978
/* Override any gcc2 internal prototype to avoid an error. */
14979
/* We use char because int might match the return type of a gcc2
14980
builtin and then its argument prototype would still apply. */
14981
char GLwCreateMDrawingArea();
14984
GLwCreateMDrawingArea()
14987
if { (eval echo configure:14988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14989
eval "ac_cv_lib_$ac_lib_var=yes"
14991
echo "configure: failed program was:" >&5
14992
cat conftest.$ac_ext >&5
14994
eval "ac_cv_lib_$ac_lib_var=no"
14997
LIBS="$ac_save_LIBS"
14999
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15000
echo "$ac_t""yes" 1>&6
15001
OPENGLWM="$OPENGLWM -lMesaGLwM "
15003
echo "$ac_t""no" 1>&6
15005
echo $ac_n "checking for GLwCreateMDrawingArea in -lMesaGLwM""... $ac_c" 1>&6
15006
echo "configure:15007: checking for GLwCreateMDrawingArea in -lMesaGLwM" >&5
15007
ac_lib_var=`echo MesaGLwM'_'GLwCreateMDrawingArea | sed 'y%./+-%__p_%'`
15009
ac_save_LIBS="$LIBS"
15010
LIBS="-lMesaGLwM $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $OPENGLULIB $LIBS"
15011
cat > conftest.$ac_ext <<EOF
15012
#line 15013 "configure"
15013
#include "confdefs.h"
15014
/* Override any gcc2 internal prototype to avoid an error. */
15015
/* We use char because int might match the return type of a gcc2
15016
builtin and then its argument prototype would still apply. */
15017
char GLwCreateMDrawingArea();
15020
GLwCreateMDrawingArea()
15023
if { (eval echo configure:15024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15025
eval "ac_cv_lib_$ac_lib_var=yes"
15027
echo "configure: failed program was:" >&5
15028
cat conftest.$ac_ext >&5
15030
eval "ac_cv_lib_$ac_lib_var=no"
15033
LIBS="$ac_save_LIBS"
15035
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15036
echo "$ac_t""yes" 1>&6
15037
OPENGLWM="$OPENGLWM -lMesaGLwM $OPENGLULIB"
15039
echo "$ac_t""no" 1>&6
15041
LDFLAGS=${ac_save_ldflags}
15043
{ echo "configure: error: *** Unable to locate GLwM library." 1>&2; exit 1; }
15058
LDFLAGS=${ac_save_ldflags}
15074
LDFLAGS=${ac_save_ldflags}
15082
LDFLAGS=${ac_save_ldflags}
15090
LDFLAGS=${ac_save_ldflags}
15098
LDFLAGS=${ac_save_ldflags}
15106
LDFLAGS=${ac_save_ldflags}
15114
LDFLAGS=${ac_save_ldflags}
15122
LDFLAGS=${ac_save_ldflags}
15125
fi # $USE_OPENGL && $USE_MOTIF
15130
# Done checking GLw
15132
11387
# Enable FreeType option
15135
11390
echo $ac_n "checking whether to use FreeType""... $ac_c" 1>&6
15136
echo "configure:15137: checking whether to use FreeType" >&5
11391
echo "configure:11392: checking whether to use FreeType" >&5
15137
11392
echo "$ac_t"""$with_freetype"" 1>&6
15138
11393
case "$with_freetype" in
15139
11394
"no") USE_FREETYPE= ;;
15754
12009
# Done checking OPENDWG
15756
# Enable LFS (from cdr-tools)
12011
# Enable pthread option
12014
echo $ac_n "checking whether to use POSIX threads""... $ac_c" 1>&6
12015
echo "configure:12016: checking whether to use POSIX threads" >&5
12016
echo "$ac_t"""$with_pthread"" 1>&6
12017
case "$with_pthread" in
12018
"no") USE_PTHREAD= ;;
12019
"yes") USE_PTHREAD="1" ;;
12020
*) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
12029
if test -n "$USE_PTHREAD"; then
12031
# With pthread includes directory
12034
echo $ac_n "checking for location of POSIX threads includes""... $ac_c" 1>&6
12035
echo "configure:12036: checking for location of POSIX threads includes" >&5
12036
case "$with_pthread_includes" in
12037
y | ye | yes | n | no)
12038
{ echo "configure: error: *** You must supply a directory to --with-pthread-includes." 1>&2; exit 1; }
12041
echo "$ac_t""$with_pthread_includes" 1>&6
12043
if test -n "$with_pthread_includes" ; then
12044
for dir in $with_pthread_includes; do
12045
if test -d "$dir"; then
12046
PTHREADINCPATH="$PTHREADINCPATH -I$dir"
12048
{ echo "configure: error: *** POSIX threads includes directory $dir does not exist." 1>&2; exit 1; }
12055
ac_save_cppflags="$CPPFLAGS"
12056
CPPFLAGS="$PTHREADINCPATH $CPPFLAGS"
12057
for ac_hdr in pthread.h
12059
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12060
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12061
echo "configure:12062: checking for $ac_hdr" >&5
12063
cat > conftest.$ac_ext <<EOF
12064
#line 12065 "configure"
12065
#include "confdefs.h"
12068
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12069
{ (eval echo configure:12070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12070
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12071
if test -z "$ac_err"; then
12073
eval "ac_cv_header_$ac_safe=yes"
12076
echo "configure: failed program was:" >&5
12077
cat conftest.$ac_ext >&5
12079
eval "ac_cv_header_$ac_safe=no"
12082
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12083
echo "$ac_t""yes" 1>&6
12084
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12085
cat >> confdefs.h <<EOF
12086
#define $ac_tr_hdr 1
12090
echo "$ac_t""no" 1>&6
12091
{ echo "configure: error: *** Unable to locate POSIX threads includes." 1>&2; exit 1; }
12096
CPPFLAGS=$ac_save_cppflags
12099
# With pthread library directory
12102
echo $ac_n "checking for location of POSIX threads library""... $ac_c" 1>&6
12103
echo "configure:12104: checking for location of POSIX threads library" >&5
12104
case "$with_pthread_libs" in
12105
y | ye | yes | n | no)
12106
{ echo "configure: error: *** You must supply a directory to --with-pthread-libs." 1>&2; exit 1; }
12109
echo "$ac_t""$with_pthread_libs" 1>&6
12111
if test -n "$with_pthread_libs"; then
12112
for dir in $with_pthread_libs; do
12113
if test -d "$dir"; then
12114
PTHREADLIBPATH="$PTHREADLIBPATH -L$dir"
12116
{ echo "configure: error: *** POSIX threads library directory $dir does not exist." 1>&2; exit 1; }
12123
ac_save_libs="$LIBS"
12124
ac_save_ldflags="$LDFLAGS"
12126
LDFLAGS=" $LDFLAGS"
12127
echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
12128
echo "configure:12129: checking for pthread_create" >&5
12130
cat > conftest.$ac_ext <<EOF
12131
#line 12132 "configure"
12132
#include "confdefs.h"
12133
/* System header to define __stub macros and hopefully few prototypes,
12134
which can conflict with char pthread_create(); below. */
12135
#include <assert.h>
12136
/* Override any gcc2 internal prototype to avoid an error. */
12137
/* We use char because int might match the return type of a gcc2
12138
builtin and then its argument prototype would still apply. */
12139
char pthread_create();
12143
/* The GNU C library defines this for functions which it implements
12144
to always fail with ENOSYS. Some functions are actually named
12145
something starting with __ and the normal name is an alias. */
12146
#if defined (__stub_pthread_create) || defined (__stub___pthread_create)
12154
if { (eval echo configure:12155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12156
eval "ac_cv_func_pthread_create=yes"
12158
echo "configure: failed program was:" >&5
12159
cat conftest.$ac_ext >&5
12161
eval "ac_cv_func_pthread_create=no"
12165
if eval "test \"`echo '$ac_cv_func_'pthread_create`\" = yes"; then
12166
echo "$ac_t""yes" 1>&6
12169
PTHREADLIB="$PTHREADLIB "
12173
echo "$ac_t""no" 1>&6
12176
ac_save_ldflags="$LDFLAGS"
12177
LDFLAGS="$PTHREADLIBPATH $LDFLAGS"
12180
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
12181
echo "configure:12182: checking for pthread_create in -lpthread" >&5
12182
ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
12184
ac_save_LIBS="$LIBS"
12185
LIBS="-lpthread $LIBS"
12186
cat > conftest.$ac_ext <<EOF
12187
#line 12188 "configure"
12188
#include "confdefs.h"
12189
/* Override any gcc2 internal prototype to avoid an error. */
12190
/* We use char because int might match the return type of a gcc2
12191
builtin and then its argument prototype would still apply. */
12192
char pthread_create();
12198
if { (eval echo configure:12199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12200
eval "ac_cv_lib_$ac_lib_var=yes"
12202
echo "configure: failed program was:" >&5
12203
cat conftest.$ac_ext >&5
12205
eval "ac_cv_lib_$ac_lib_var=no"
12208
LIBS="$ac_save_LIBS"
12210
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12211
echo "$ac_t""yes" 1>&6
12212
PTHREADLIB="$PTHREADLIB -lpthread "
12214
echo "$ac_t""no" 1>&6
12216
LDFLAGS=${ac_save_ldflags}
12218
{ echo "configure: error: *** Unable to locate POSIX threads library." 1>&2; exit 1; }
12225
LDFLAGS=${ac_save_ldflags}
12231
LIBS=${ac_save_libs}
12232
LDFLAGS=${ac_save_ldflags}
12242
# Done checking pthread
12244
# Enable OpenMP option
12247
echo $ac_n "checking whether to use OpenMP""... $ac_c" 1>&6
12248
echo "configure:12249: checking whether to use OpenMP" >&5
12249
echo "$ac_t"""$with_openmp"" 1>&6
12250
case "$with_openmp" in
12251
"no") USE_OPENMP= ;;
12252
"yes") USE_OPENMP="1" ;;
12253
*) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
12263
if test -n "$USE_OPENMP"; then
12265
# With OpenMP includes directory
12268
echo $ac_n "checking for location of OpenMP includes""... $ac_c" 1>&6
12269
echo "configure:12270: checking for location of OpenMP includes" >&5
12270
case "$with_openmp_includes" in
12271
y | ye | yes | n | no)
12272
{ echo "configure: error: *** You must supply a directory to --with-openmp-includes." 1>&2; exit 1; }
12275
echo "$ac_t""$with_openmp_includes" 1>&6
12277
if test -n "$with_openmp_includes" ; then
12278
for dir in $with_openmp_includes; do
12279
if test -d "$dir"; then
12280
OMPINCPATH="$OMPINCPATH -I$dir"
12282
{ echo "configure: error: *** OpenMP includes directory $dir does not exist." 1>&2; exit 1; }
12289
ac_save_cppflags="$CPPFLAGS"
12290
CPPFLAGS="$OMPINCPATH $CPPFLAGS"
12291
for ac_hdr in omp.h
12293
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12294
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12295
echo "configure:12296: checking for $ac_hdr" >&5
12297
cat > conftest.$ac_ext <<EOF
12298
#line 12299 "configure"
12299
#include "confdefs.h"
12302
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12303
{ (eval echo configure:12304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12304
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12305
if test -z "$ac_err"; then
12307
eval "ac_cv_header_$ac_safe=yes"
12310
echo "configure: failed program was:" >&5
12311
cat conftest.$ac_ext >&5
12313
eval "ac_cv_header_$ac_safe=no"
12316
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12317
echo "$ac_t""yes" 1>&6
12318
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12319
cat >> confdefs.h <<EOF
12320
#define $ac_tr_hdr 1
12324
echo "$ac_t""no" 1>&6
12325
{ echo "configure: error: *** Unable to locate OpenMP includes." 1>&2; exit 1; }
12330
CPPFLAGS=$ac_save_cppflags
12333
# With OpenMP library directory
12334
# GCC et al.: -lgomp
12335
# Solaris cc: -lmtsk
12337
# SGI IRIX 6.5 MIPSpro C/C++: -lmp
12340
echo $ac_n "checking for location of OpenMP library""... $ac_c" 1>&6
12341
echo "configure:12342: checking for location of OpenMP library" >&5
12342
case "$with_openmp_libs" in
12343
y | ye | yes | n | no)
12344
{ echo "configure: error: *** You must supply a directory to --with-openmp-libs." 1>&2; exit 1; }
12347
echo "$ac_t""$with_openmp_libs" 1>&6
12349
if test -n "$with_openmp_libs"; then
12350
for dir in $with_openmp_libs; do
12351
if test -d "$dir"; then
12352
OMPLIBPATH="$OMPLIBPATH -L$dir"
12354
{ echo "configure: error: *** OpenMP library directory $dir does not exist." 1>&2; exit 1; }
12361
ac_save_libs="$LIBS"
12362
ac_save_ldflags="$LDFLAGS"
12364
LDFLAGS=" $LDFLAGS"
12365
echo $ac_n "checking for GOMP_parallel_start""... $ac_c" 1>&6
12366
echo "configure:12367: checking for GOMP_parallel_start" >&5
12368
cat > conftest.$ac_ext <<EOF
12369
#line 12370 "configure"
12370
#include "confdefs.h"
12371
/* System header to define __stub macros and hopefully few prototypes,
12372
which can conflict with char GOMP_parallel_start(); below. */
12373
#include <assert.h>
12374
/* Override any gcc2 internal prototype to avoid an error. */
12375
/* We use char because int might match the return type of a gcc2
12376
builtin and then its argument prototype would still apply. */
12377
char GOMP_parallel_start();
12381
/* The GNU C library defines this for functions which it implements
12382
to always fail with ENOSYS. Some functions are actually named
12383
something starting with __ and the normal name is an alias. */
12384
#if defined (__stub_GOMP_parallel_start) || defined (__stub___GOMP_parallel_start)
12387
GOMP_parallel_start();
12392
if { (eval echo configure:12393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12394
eval "ac_cv_func_GOMP_parallel_start=yes"
12396
echo "configure: failed program was:" >&5
12397
cat conftest.$ac_ext >&5
12399
eval "ac_cv_func_GOMP_parallel_start=no"
12403
if eval "test \"`echo '$ac_cv_func_'GOMP_parallel_start`\" = yes"; then
12404
echo "$ac_t""yes" 1>&6
12411
echo "$ac_t""no" 1>&6
12414
ac_save_ldflags="$LDFLAGS"
12415
LDFLAGS="$OMPLIBPATH $LDFLAGS"
12418
echo $ac_n "checking for GOMP_parallel_start in -lgomp""... $ac_c" 1>&6
12419
echo "configure:12420: checking for GOMP_parallel_start in -lgomp" >&5
12420
ac_lib_var=`echo gomp'_'GOMP_parallel_start | sed 'y%./+-%__p_%'`
12422
ac_save_LIBS="$LIBS"
12423
LIBS="-lgomp $LIBS"
12424
cat > conftest.$ac_ext <<EOF
12425
#line 12426 "configure"
12426
#include "confdefs.h"
12427
/* Override any gcc2 internal prototype to avoid an error. */
12428
/* We use char because int might match the return type of a gcc2
12429
builtin and then its argument prototype would still apply. */
12430
char GOMP_parallel_start();
12433
GOMP_parallel_start()
12436
if { (eval echo configure:12437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12438
eval "ac_cv_lib_$ac_lib_var=yes"
12440
echo "configure: failed program was:" >&5
12441
cat conftest.$ac_ext >&5
12443
eval "ac_cv_lib_$ac_lib_var=no"
12446
LIBS="$ac_save_LIBS"
12448
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12449
echo "$ac_t""yes" 1>&6
12450
OMPLIB="$OMPLIB -lgomp "
12452
echo "$ac_t""no" 1>&6
12454
LDFLAGS=${ac_save_ldflags}
12456
{ echo "configure: error: *** Unable to locate OpenMP library." 1>&2; exit 1; }
12463
LDFLAGS=${ac_save_ldflags}
12469
LIBS=${ac_save_libs}
12470
LDFLAGS=${ac_save_ldflags}
12473
# compiler dependent
12474
#if test ${CC} = "gcc" ; then
12475
if test x$GCC = xyes ; then
12476
# GNU C compiler (>= 4.2.1)
12478
elif test ${CC} = "icc" ; then
12481
elif test ${CC} = "opencc" ; then
12482
# AMD's x86 Open64 compiler
12484
elif test ${CC} = "pgcc" ; then
12485
# Portland Group's compiler
12487
# ... anybody else?
12490
# try to build a test program with "$CC $OMPCLFAGS" to confirm it works
12492
#echo "int main() {return 0;}" > test.c
12493
#$CC $OMPCLFAGS test.c -o test
12503
# Done checking OpenMP
12505
# Enable OpenCL option
12508
echo $ac_n "checking whether to use OpenCL""... $ac_c" 1>&6
12509
echo "configure:12510: checking whether to use OpenCL" >&5
12510
echo "$ac_t"""$with_opencl"" 1>&6
12511
case "$with_opencl" in
12512
"no") USE_OPENCL= ;;
12513
"yes") USE_OPENCL="1" ;;
12514
*) { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; } ;;
12523
if test -n "$USE_OPENCL"; then
12525
# With OpenCL includes directory
12528
echo $ac_n "checking for location of OpenCL includes""... $ac_c" 1>&6
12529
echo "configure:12530: checking for location of OpenCL includes" >&5
12530
case "$with_opencl_includes" in
12531
y | ye | yes | n | no)
12532
{ echo "configure: error: *** You must supply a directory to --with-opencl-includes." 1>&2; exit 1; }
12535
echo "$ac_t""$with_opencl_includes" 1>&6
12537
if test -n "$with_opencl_includes" ; then
12538
for dir in $with_opencl_includes; do
12539
if test -d "$dir"; then
12540
OCLINCPATH="$OCLINCPATH -I$dir"
12542
{ echo "configure: error: *** OpenCL includes directory $dir does not exist." 1>&2; exit 1; }
12548
if test -n "$MACOSX_APP" ; then
12550
ac_save_cppflags="$CPPFLAGS"
12551
CPPFLAGS="$OCLINCPATH $CPPFLAGS"
12552
for ac_hdr in OpenCL/opencl.h
12554
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12555
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12556
echo "configure:12557: checking for $ac_hdr" >&5
12558
cat > conftest.$ac_ext <<EOF
12559
#line 12560 "configure"
12560
#include "confdefs.h"
12563
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12564
{ (eval echo configure:12565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12565
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12566
if test -z "$ac_err"; then
12568
eval "ac_cv_header_$ac_safe=yes"
12571
echo "configure: failed program was:" >&5
12572
cat conftest.$ac_ext >&5
12574
eval "ac_cv_header_$ac_safe=no"
12577
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12578
echo "$ac_t""yes" 1>&6
12579
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12580
cat >> confdefs.h <<EOF
12581
#define $ac_tr_hdr 1
12585
echo "$ac_t""no" 1>&6
12586
{ echo "configure: error: *** Unable to locate OpenCL includes." 1>&2; exit 1; }
12591
CPPFLAGS=$ac_save_cppflags
12594
# With OpenCL library directory
12596
#LOC_CHECK_FRAMEWORK_PATH(opencl,OpenCL,OPENCLPATH)
12597
# last term in following would become ',$OPENCLPATH)' if above is uncommented
12599
ac_save_libs="$LIBS"
12600
ac_save_ldflags="$LDFLAGS"
12601
LIBS="-framework OpenCL $LIBS"
12602
LDFLAGS=" $LDFLAGS"
12603
echo $ac_n "checking for clGetPlatformInfo""... $ac_c" 1>&6
12604
echo "configure:12605: checking for clGetPlatformInfo" >&5
12606
cat > conftest.$ac_ext <<EOF
12607
#line 12608 "configure"
12608
#include "confdefs.h"
12609
/* System header to define __stub macros and hopefully few prototypes,
12610
which can conflict with char clGetPlatformInfo(); below. */
12611
#include <assert.h>
12612
/* Override any gcc2 internal prototype to avoid an error. */
12613
/* We use char because int might match the return type of a gcc2
12614
builtin and then its argument prototype would still apply. */
12615
char clGetPlatformInfo();
12619
/* The GNU C library defines this for functions which it implements
12620
to always fail with ENOSYS. Some functions are actually named
12621
something starting with __ and the normal name is an alias. */
12622
#if defined (__stub_clGetPlatformInfo) || defined (__stub___clGetPlatformInfo)
12625
clGetPlatformInfo();
12630
if { (eval echo configure:12631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12632
eval "ac_cv_func_clGetPlatformInfo=yes"
12634
echo "configure: failed program was:" >&5
12635
cat conftest.$ac_ext >&5
12637
eval "ac_cv_func_clGetPlatformInfo=no"
12641
if eval "test \"`echo '$ac_cv_func_'clGetPlatformInfo`\" = yes"; then
12642
echo "$ac_t""yes" 1>&6
12645
OCLLIB="$OCLLIB -framework OpenCL"
12649
echo "$ac_t""no" 1>&6
12652
{ echo "configure: error: *** Unable to locate OpenCL library." 1>&2; exit 1; }
12658
LIBS=${ac_save_libs}
12659
LDFLAGS=${ac_save_ldflags}
12663
ac_save_cppflags="$CPPFLAGS"
12664
CPPFLAGS="$OCLINCPATH $CPPFLAGS"
12665
for ac_hdr in CL/cl.h
12667
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
12668
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
12669
echo "configure:12670: checking for $ac_hdr" >&5
12671
cat > conftest.$ac_ext <<EOF
12672
#line 12673 "configure"
12673
#include "confdefs.h"
12676
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12677
{ (eval echo configure:12678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12678
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12679
if test -z "$ac_err"; then
12681
eval "ac_cv_header_$ac_safe=yes"
12684
echo "configure: failed program was:" >&5
12685
cat conftest.$ac_ext >&5
12687
eval "ac_cv_header_$ac_safe=no"
12690
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12691
echo "$ac_t""yes" 1>&6
12692
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12693
cat >> confdefs.h <<EOF
12694
#define $ac_tr_hdr 1
12698
echo "$ac_t""no" 1>&6
12699
{ echo "configure: error: *** Unable to locate OpenCL includes." 1>&2; exit 1; }
12704
CPPFLAGS=$ac_save_cppflags
12707
# With OpenCL library directory
12709
echo $ac_n "checking for location of OpenCL library""... $ac_c" 1>&6
12710
echo "configure:12711: checking for location of OpenCL library" >&5
12711
case "$with_opencl_libs" in
12712
y | ye | yes | n | no)
12713
{ echo "configure: error: *** You must supply a directory to --with-opencl-libs." 1>&2; exit 1; }
12716
echo "$ac_t""$with_opencl_libs" 1>&6
12718
if test -n "$with_opencl_libs"; then
12719
for dir in $with_opencl_libs; do
12720
if test -d "$dir"; then
12721
OCLLIBPATH="$OCLLIBPATH -L$dir"
12723
{ echo "configure: error: *** OpenCL library directory $dir does not exist." 1>&2; exit 1; }
12729
ac_save_ldflags="$LDFLAGS"
12730
LDFLAGS="$OCLLIBPATH $LDFLAGS"
12733
echo $ac_n "checking for clGetPlatformInfo in -lOpenCL""... $ac_c" 1>&6
12734
echo "configure:12735: checking for clGetPlatformInfo in -lOpenCL" >&5
12735
ac_lib_var=`echo OpenCL'_'clGetPlatformInfo | sed 'y%./+-%__p_%'`
12737
ac_save_LIBS="$LIBS"
12738
LIBS="-lOpenCL $LIBS"
12739
cat > conftest.$ac_ext <<EOF
12740
#line 12741 "configure"
12741
#include "confdefs.h"
12742
/* Override any gcc2 internal prototype to avoid an error. */
12743
/* We use char because int might match the return type of a gcc2
12744
builtin and then its argument prototype would still apply. */
12745
char clGetPlatformInfo();
12748
clGetPlatformInfo()
12751
if { (eval echo configure:12752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12753
eval "ac_cv_lib_$ac_lib_var=yes"
12755
echo "configure: failed program was:" >&5
12756
cat conftest.$ac_ext >&5
12758
eval "ac_cv_lib_$ac_lib_var=no"
12761
LIBS="$ac_save_LIBS"
12763
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12764
echo "$ac_t""yes" 1>&6
12765
OCLLIB="$OCLLIB -lOpenCL "
12767
echo "$ac_t""no" 1>&6
12769
LDFLAGS=${ac_save_ldflags}
12771
{ echo "configure: error: *** Unable to locate OpenCL library." 1>&2; exit 1; }
12778
LDFLAGS=${ac_save_ldflags}
12780
# expanded symbol check: yes? no?
12781
#LOC_CHECK_FUNC(clGetPlatformInfo,OpenCL functions,OCLLIB,,,,,[
12782
#LOC_CHECK_LIBS(OpenCL,clGetPlatformInfo,OpenCL,$OCLLIBPATH,OCLLIB,,,)
12793
# Done checking OpenCL
12795
# Enable LFS (from cdr-tools, tar, and autoconf 2.68)
15757
12796
# Check whether --enable-largefile or --disable-largefile was given.
15758
12797
if test "${enable_largefile+set}" = set; then
15759
12798
enableval="$enable_largefile"
15763
if test "$enable_largefile" = yes; then
12803
if test "$enable_largefile" != no; then
12804
ac_save_cflags=$CFLAGS
12805
if test "`which getconf 2>&5`" ; then
12806
LFS_CFLAGS=`getconf LFS_CFLAGS 2>&5`
12807
CFLAGS="$LFS_CFLAGS $ac_save_cflags"
15765
12810
echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
15766
echo "configure:15767: checking for special C compiler options needed for large files" >&5
12811
echo "configure:12812: checking for special C compiler options needed for large files" >&5
15768
12813
ac_cv_sys_largefile_CC=no
15769
12814
largefile_cc_opt=""