configure.in
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:5k
源码类别:

通讯编程

开发平台:

Visual C++

  1. AC_INIT(otcl.c)
  2. #XXX
  3. V_PROG="otclsh"
  4. V_ALL="$V_PROG"
  5. V_SHM="-DUSE_SHM"
  6. builtin(include, ./conf/configure.in.fns)
  7. builtin(include, ./conf/configure.in.head)
  8. builtin(include, ./conf/configure.in.tcl)
  9. builtin(include, ./conf/configure.in.tk)
  10. builtin(include, ./conf/configure.in.x11)
  11. # These must follow configure.in.head because they mess
  12. # with $*.
  13. AC_PROG_RANLIB
  14. AC_PROG_INSTALL
  15. #
  16. # deal with dynamic loading, code snarfed from tcl distribution
  17. #
  18. AC_MSG_CHECKING([system version (for dynamic loading)])
  19. system=`uname -s`-`uname -r`
  20. if test "$status" = 1 ; then
  21.     AC_MSG_RESULT([unknown (can't find uname command)])
  22.     system=unknown
  23. else
  24.     # Special check for weird MP-RAS system (uname returns weird
  25.     # results, and the version is kept in special file).
  26.     if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
  27.         system=MP-RAS-`awk '{print $3}' /etc/.relid`
  28.     fi
  29.     AC_MSG_RESULT($system)
  30. fi
  31. case $system in
  32.     Darwin-5.*|Darwin-6.*)
  33. SHLIB_CFLAGS="-fno-common -fPIC -pipe"
  34. SHLIB_LD="cc -dynamiclib -flat_namespace -undefined suppress"
  35. SHLIB_SUFFIX=".dylib"
  36. DL_LIBS=""
  37. SHLD_FLAGS="-Wl,-bind_at_load -Wl,-multiply_defined -Wl,suppress"
  38. ;;
  39.     Darwin-7.*|Darwin-8.*) # Remove `-mcpu=7450' for G5 (PPC970) optimization:
  40. SHLIB_CFLAGS="-fno-common -fPIC -pipe"
  41. SHLIB_LD="cc -dynamiclib -flat_namespace -undefined suppress"
  42. SHLIB_SUFFIX=".dylib"
  43. DL_LIBS=""
  44. SHLD_FLAGS="-Wl,-bind_at_load -Wl,-multiply_defined -Wl,suppress"
  45. ;;
  46.     HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
  47.         SHLIB_CFLAGS="+z"
  48.         SHLIB_LD="ld -b"
  49.         SHLIB_SUFFIX=".sl"
  50.         DL_LIBS="-ldld"
  51.         SHLD_FLAGS="-Wl,-E"
  52.         ;;
  53.     IRIX-4.*)
  54.         SHLIB_CFLAGS="-G0"
  55.         SHLIB_LD="echo tclLdAout | tclsh -r -G 0"
  56.         SHLIB_SUFFIX="..o"
  57.         DL_LIBS=""
  58.         SHLD_FLAGS="-D 08000000"
  59.         ;;
  60.     IRIX-5.*)
  61.         SHLIB_CFLAGS=""
  62.         SHLIB_LD="ld -shared -rdata_shared"
  63.         SHLIB_SUFFIX=".so"
  64.         DL_LIBS=""
  65.         SHLD_FLAGS=""
  66.         ;;
  67.     Linux*)
  68.         SHLIB_CFLAGS="-fpic"
  69.         SHLIB_LD="ld -shared"
  70.         SHLIB_SUFFIX=".so"
  71.         DL_LIBS="-ldl"
  72.         SHLD_FLAGS=""
  73.         ;;
  74.     MP-RAS-02*)
  75.         SHLIB_CFLAGS="-K PIC"
  76.         SHLIB_LD="cc -G"
  77.         SHLIB_SUFFIX=".so"
  78.         DL_LIBS="-ldl"
  79.         SHLD_FLAGS=""
  80.         ;;
  81.     MP-RAS-*)
  82.         SHLIB_CFLAGS="-K PIC"
  83.         SHLIB_LD="cc -G"
  84.         SHLIB_SUFFIX=".so"
  85.         DL_LIBS="-ldl"
  86.         SHLD_FLAGS="-Wl,-Bexport"
  87.         ;;
  88.     NetBSD-*|FreeBSD-*)
  89.         # Not available on all versions:  check for include file.
  90.         if test -e /usr/include/dlfcn.h; then
  91.             SHLIB_CFLAGS="-fpic"
  92.             SHLIB_LD="ld -Bshareable"
  93.             SHLIB_SUFFIX=".so"
  94.             DL_LIBS=""
  95.             SHLD_FLAGS=""
  96.         else
  97.             echo "NetBSD/FreeBSD with no support for dynamic loading"
  98.             echo " or shared libraries on this system."
  99.             SHLIB_CFLAGS=""
  100.             SHLIB_LD=":  Skipping shared libaries"
  101.             SHLIB_SUFFIX=".so"
  102.             DL_LIBS=""
  103.             SHLD_FLAGS=""
  104.         fi
  105.         ;;
  106.     OSF-1.*)
  107.         SHLIB_CFLAGS="-fpic"
  108.         SHLIB_LD='ld -shared -expect_unresolved "*"'
  109.         SHLIB_SUFFIX=".so"
  110.         DL_LIBS=""
  111.         SHLD_FLAGS=""
  112.         ;;
  113.     OSF1-V*)
  114.         SHLIB_CFLAGS=""
  115.         SHLIB_LD='ld -shared -expect_unresolved "*"'
  116.         SHLIB_SUFFIX=".so"
  117.         DL_LIBS=""
  118.         SHLD_FLAGS=""
  119.         ;;
  120.     RISCos-*)
  121.         SHLIB_CFLAGS="-G0"
  122.         SHLIB_LD="echo tclLdAout | tclsh -r -G 0"
  123.         SHLIB_SUFFIX="..o"
  124.         DL_LIBS=""
  125.         SHLD_FLAGS="-D 08000000"
  126.         ;;
  127.     SCO_SV-3.2*)
  128.         # Note, dlopen is available only on SCO 3.2.5 and greater.  However,
  129.         # this test works, since "uname -s" was non-standard in 3.2.4 and
  130.         # below.
  131.         SHLIB_CFLAGS="-Kpic -belf"
  132.         SHLIB_LD="ld -G -z text"
  133.         SHLIB_SUFFIX=".so"
  134.         DL_LIBS=""
  135.         SHLD_FLAGS="-belf -Wl,-Bexport"
  136.         ;;
  137.     SunOS-4*)
  138.         SHLIB_CFLAGS="-pic"
  139.         SHLIB_LD="ld -assert pure-text"
  140.         SHLIB_SUFFIX=".so"
  141.         DL_LIBS="-ldl"
  142.         SHLD_FLAGS=""
  143.         ;;
  144.     SunOS-5*)
  145.        if test "$CC" != "gcc"; then
  146.                SHLIB_CFLAGS="-K pic"
  147.        fi
  148.         SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  149.         SHLIB_SUFFIX=".so"
  150.         DL_LIBS="-ldl"
  151.         SHLD_FLAGS=""
  152.         ;;
  153.     ULTRIX-4.*)
  154.         SHLIB_CFLAGS="-G0"
  155.         SHLIB_LD="echo tclLdAout | tclsh -r -G 0"
  156.         SHLIB_SUFFIX="..o"
  157.         DL_LIBS=""
  158.         SHLD_FLAGS="-D 08000000"
  159.         ;;
  160.     UNIX_SV*)
  161.         SHLIB_CFLAGS="-K PIC"
  162.         SHLIB_LD="cc -G"
  163.         SHLIB_SUFFIX=".so"
  164.         DL_LIBS="-ldl"
  165.         SHLD_FLAGS="-Wl,-Bexport"
  166.         ;;
  167.     *)
  168.         echo "Can't figure out how to do dynamic loading or shared libraries"
  169.         echo "on this system."
  170.         SHLIB_CFLAGS=""
  171.         SHLIB_LD=":  Skipping shared libaries"
  172.         SHLIB_SUFFIX=".so"
  173.         DL_LIBS="" 
  174.         SHLD_FLAGS=""
  175.         ;;
  176. esac
  177. if test "$CC" = "gcc" -a "X$SHLIB_CFLAGS" = "X"; then
  178.     SHLIB_CFLAGS="-fpic"
  179. fi
  180. AC_SUBST(SHLIB_CFLAGS)
  181. AC_SUBST(SHLIB_LD)
  182. AC_SUBST(SHLIB_SUFFIX)
  183. AC_SUBST(SHLD_FLAGS)
  184. AC_SUBST(DL_LIBS)
  185. #
  186. # decide where to install the shared library
  187. #
  188. INST_OLIBSH="${prefix}/lib"
  189. if test -d ${prefix}/shlib ; then
  190.   INST_OLIBSH="${prefix}/shlib"
  191. fi
  192. AC_SUBST(INST_OLIBSH)
  193. NS_FNS_TAIL
  194. builtin(include, ./conf/configure.in.tail)