Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Improve support for AIX shared libraries.

Closed / Fixed218559ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:02:17
OriginalBugID: 1110 Bug
Version: 8.0.4
SubmitDate: '1999-01-26'
LastModified: '1999-03-05'
Severity: SER
Status: Released
Submitter: welch
ChangedBy: stanton
OS: Other
Machine: NA
FixedDate: '1999-03-05'
FixedInVersion: 8.0.6
ClosedDate: '2000-10-25'


Name:

Paul Duffin


ReproducibleScript:

The problem is that at the moment Tcl and Tk are built as archives containing

a shared object which means that Tk in particular is not dynamically loadable

and neither is any other extension which is also a library. The solution is to

build shared libraries on AIX as shared objects and to use an export / import

file to manage the linking.


The patch can be applied directly to Tcl8.1b1 although the configure file will

need regenerating.


Patch:

*** tcl8.0/unix/.configureThu Jan 14 11:14:24 1999

--- tcl8.0/unix/configureThu Jan 14 11:14:25 1999

***************

*** 3751,3756 ****

--- 3751,3767 ----

  #a .a extension whereas shared objects for loadable

  #extensions have a .so extension.  Defaults to

  #${VERSION}${SHLIB_SUFFIX}.

+ #TCL_NEEDS_EXP_FILE -

+ #1 means that an export file is needed to link to a

+ #shared library.

+ #

+ #TCL_EXP_FILE -  The name of the installed export / import file which 

+ #should be used to link to the Tcl shared library.

+ #Empty if Tcl is unshared.

+ #TCL_BUILD_EXP_FILE -

+ #The name of the built export / import file which

+ #should be used to link to the Tcl shared library.

+ #Empty if Tcl is unshared.

  #--------------------------------------------------------------------


  # Step 1: set the variable "system" to hold the name and version number

***************

*** 3790,3796 ****

    ac_save_LIBS="$LIBS"

  LIBS="-ldl  $LIBS"

  cat > conftest.$ac_ext <<EOF

! #line 3794 "configure"

  #include "confdefs.h"

  /* Override any gcc2 internal prototype to avoid an error.  */

  char dlopen();

--- 3801,3807 ----

    ac_save_LIBS="$LIBS"

  LIBS="-ldl  $LIBS"

  cat > conftest.$ac_ext <<EOF

! #line 3805 "configure"

  #include "confdefs.h"

  /* Override any gcc2 internal prototype to avoid an error.  */

  char dlopen();

***************

*** 3800,3806 ****

  dlopen()

  ; return 0; }

  EOF

! if { (eval echo configure:3804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then

    rm -rf conftest*

    eval "ac_cv_lib_$ac_lib_var=yes"

  else

--- 3811,3817 ----

  dlopen()

  ; return 0; }

  EOF

! if { (eval echo configure:3815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then

    rm -rf conftest*

    eval "ac_cv_lib_$ac_lib_var=yes"

  else

***************

*** 3824,3829 ****

--- 3835,3841 ----


  fullSrcDir=`cd $srcdir; pwd`

  EXTRA_CFLAGS=""

+ TCL_EXPORT_FILE_SUFFIX=""

  TCL_UNSHARED_LIB_SUFFIX=""

  TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'

  ECHO_VERSION='`echo ${VERSION}`'

***************

*** 3830,3835 ****

--- 3842,3850 ----

  TCL_LIB_VERSIONS_OK=ok

  CFLAGS_DEBUG=-g

  CFLAGS_OPTIMIZE=-O

+ TCL_NEEDS_EXP_FILE=0

+ TCL_BUILD_EXP_FILE=""

+ TCL_EXP_FILE=""

  case $system in

      AIX-4.[2-9])

  SHLIB_CFLAGS=""

***************

*** 3840,3847 ****

  DL_LIBS="-ldl"

  LD_FLAGS=""

  LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'

! AIX=yes

! TCL_SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'

  ;;

      AIX-*)

  SHLIB_CFLAGS=""

--- 3855,3862 ----

  DL_LIBS="-ldl"

  LD_FLAGS=""

  LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'

! TCL_NEEDS_EXP_FILE=1

! TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'

  ;;

      AIX-*)

  SHLIB_CFLAGS=""

***************

*** 3852,3858 ****

  DL_LIBS="-lld"

  LD_FLAGS=""

  LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'

! TCL_SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'

  ;;

      BSD/OS-2.1*|BSD/OS-3*)

  SHLIB_CFLAGS=""

--- 3867,3874 ----

  DL_LIBS="-lld"

  LD_FLAGS=""

  LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'

! TCL_NEEDS_EXP_FILE=1

! TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'

  ;;

      BSD/OS-2.1*|BSD/OS-3*)

  SHLIB_CFLAGS=""

***************

*** 3883,3889 ****

    ac_save_LIBS="$LIBS"

  LIBS="-ldld  $LIBS"

  cat > conftest.$ac_ext <<EOF

! #line 3887 "configure"

  #include "confdefs.h"

  /* Override any gcc2 internal prototype to avoid an error.  */

  char shl_load();

--- 3899,3905 ----

    ac_save_LIBS="$LIBS"

  LIBS="-ldld  $LIBS"

  cat > conftest.$ac_ext <<EOF

! #line 3903 "configure"

  #include "confdefs.h"

  /* Override any gcc2 internal prototype to avoid an error.  */

  char shl_load();

***************

*** 3893,3899 ****

  shl_load()

  ; return 0; }

  EOF

! if { (eval echo configure:3897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then

    rm -rf conftest*

    eval "ac_cv_lib_$ac_lib_var=yes"

  else

--- 3909,3915 ----

  shl_load()

  ; return 0; }

  EOF

! if { (eval echo configure:3913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then

    rm -rf conftest*

    eval "ac_cv_lib_$ac_lib_var=yes"

  else

***************

*** 3985,3996 ****

    echo $ac_n "(cached) $ac_c" 1>&6

  else

    cat > conftest.$ac_ext <<EOF

! #line 3989 "configure"

  #include "confdefs.h"

  #include <dld.h>

  EOF

  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"

! { (eval echo configure:3994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }

  ac_err=`grep -v '^ *+' conftest.out`

  if test -z "$ac_err"; then

    rm -rf conftest*

--- 4001,4012 ----

    echo $ac_n "(cached) $ac_c" 1>&6

  else

    cat > conftest.$ac_ext <<EOF

! #line 4005 "configure"

  #include "confdefs.h"

  #include <dld.h>

  EOF

  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"

! { (eval echo configure:4010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }

  ac_err=`grep -v '^ *+' conftest.out`

  if test -z "$ac_err"; then

    rm -rf conftest*

***************

*** 4044,4055 ****

    echo $ac_n "(cached) $ac_c" 1>&6

  else

    cat > conftest.$ac_ext <<EOF

! #line 4048 "configure"

  #include "confdefs.h"

  #include <dlfcn.h>

  EOF

  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"

! { (eval echo configure:4053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }

  ac_err=`grep -v '^ *+' conftest.out`

  if test -z "$ac_err"; then

    rm -rf conftest*

--- 4060,4071 ----

    echo $ac_n "(cached) $ac_c" 1>&6

  else

    cat > conftest.$ac_ext <<EOF

! #line 4064 "configure"

  #include "confdefs.h"

  #include <dlfcn.h>

  EOF

  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"

! { (eval echo configure:4069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }

  ac_err=`grep -v '^ *+' conftest.out`

  if test -z "$ac_err"; then

    rm -rf conftest*

***************

*** 4228,4234 ****

  echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6

  LDFLAGS="${LDFLAGS} -Wl,-Bexport"

  cat > conftest.$ac_ext <<EOF

! #line 4232 "configure"

  #include "confdefs.h"


  int main() { return 0; }

--- 4244,4250 ----

  echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6

  LDFLAGS="${LDFLAGS} -Wl,-Bexport"

  cat > conftest.$ac_ext <<EOF

! #line 4248 "configure"

  #include "confdefs.h"


  int main() { return 0; }

***************

*** 4236,4242 ****

  int i;

  ; return 0; }

  EOF

! if { (eval echo configure:4240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then

    rm -rf conftest*

    found=yes

  else

--- 4252,4258 ----

  int i;

  ; return 0; }

  EOF

! if { (eval echo configure:4256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then

    rm -rf conftest*

    found=yes

  else

***************

*** 4278,4284 ****

  if test "x$DL_OBJS" = "xtclLoadAout.o" ; then

      echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6

      cat > conftest.$ac_ext <<EOF

! #line 4282 "configure"

  #include "confdefs.h"

  #include <sys/exec.h>

  int main() { return 0; }

--- 4294,4300 ----

  if test "x$DL_OBJS" = "xtclLoadAout.o" ; then

      echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6

      cat > conftest.$ac_ext <<EOF

! #line 4298 "configure"

  #include "confdefs.h"

  #include <sys/exec.h>

  int main() { return 0; }

***************

*** 4297,4303 ****


  ; return 0; }

  EOF

! if { (eval echo configure:4301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then

    rm -rf conftest*

    tcl_ok=usable

  else

--- 4313,4319 ----


  ; return 0; }

  EOF

! if { (eval echo configure:4317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then

    rm -rf conftest*

    tcl_ok=usable

  else

***************

*** 4315,4321 ****

      else

  echo $ac_n "checking a.out.h""... $ac_c" 1>&6

  cat > conftest.$ac_ext <<EOF

! #line 4319 "configure"

  #include "confdefs.h"

  #include <a.out.h>

  int main() { return 0; }

--- 4331,4337 ----

      else

  echo $ac_n "checking a.out.h""... $ac_c" 1>&6

  cat > conftest.$ac_ext <<EOF

! #line 4335 "configure"

  #include "confdefs.h"

  #include <a.out.h>

  int main() { return 0; }

***************

*** 4334,4340 ****


  ; return 0; }

  EOF

! if { (eval echo configure:4338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then

    rm -rf conftest*

    tcl_ok=usable

  else

--- 4350,4356 ----


  ; return 0; }

  EOF

! if { (eval echo configure:4354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then

    rm -rf conftest*

    tcl_ok=usable

  else

***************

*** 4352,4358 ****

  else

      echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6

      cat > conftest.$ac_ext <<EOF

! #line 4356 "configure"

  #include "confdefs.h"

  #include <sys/exec_aout.h>

  int main() { return 0; }

--- 4368,4374 ----

  else

      echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6

      cat > conftest.$ac_ext <<EOF

! #line 4372 "configure"

  #include "confdefs.h"

  #include <sys/exec_aout.h>

  int main() { return 0; }

***************

*** 4371,4377 ****


  ; return 0; }

  EOF

! if { (eval echo configure:4375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then

    rm -rf conftest*

    tcl_ok=usable

  else

--- 4387,4393 ----


  ; return 0; }

  EOF

! if { (eval echo configure:4391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then

    rm -rf conftest*

    tcl_ok=usable

  else

***************

*** 4481,4492 ****

    echo $ac_n "(cached) $ac_c" 1>&6

  else

    cat > conftest.$ac_ext <<EOF

! #line 4485 "configure"

  #include "confdefs.h"

  #include <$ac_hdr>

  EOF

  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"

! { (eval echo configure:4490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }

  ac_err=`grep -v '^ *+' conftest.out`

  if test -z "$ac_err"; then

    rm -rf conftest*

--- 4497,4508 ----

    echo $ac_n "(cached) $ac_c" 1>&6

  else

    cat > conftest.$ac_ext <<EOF

! #line 4501 "configure"

  #include "confdefs.h"

  #include <$ac_hdr>

  EOF

  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"

! { (eval echo configure:4506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }

  ac_err=`grep -v '^ *+' conftest.out`

  if test -z "$ac_err"; then

    rm -rf conftest*

***************

*** 4518,4529 ****

    echo $ac_n "(cached) $ac_c" 1>&6

  else

    cat > conftest.$ac_ext <<EOF

! #line 4522 "configure"

  #include "confdefs.h"

  #include <$ac_hdr>

  EOF

  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"

! { (eval echo configure:4527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }

  ac_err=`grep -v '^ *+' conftest.out`

  if test -z "$ac_err"; then

    rm -rf conftest*

--- 4534,4545 ----

    echo $ac_n "(cached) $ac_c" 1>&6

  else

    cat > conftest.$ac_ext <<EOF

! #line 4538 "configure"

  #include "confdefs.h"

  #include <$ac_hdr>

  EOF

  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"

! { (eval echo configure:4543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }

  ac_err=`grep -v '^ *+' conftest.out`

  if test -z "$ac_err"; then

    rm -rf conftest*

***************

*** 4648,4676 ****

      MAKE_LIB="ar cr \${TCL_LIB_FILE} \${OBJS}"

  fi


  # Note:  in the following variable, it's important to use the absolute

  # path name of the Tcl directory rather than "..":  this is because

  # AIX remembers this path and will attempt to use it at run-time to look

  # up the Tcl library.


! if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then

!     TCL_LIB_FLAG="-ltcl${TCL_VERSION}\${TCL_DBGX}"

  else

!     TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}"

  fi

- TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}"

- TCL_LIB_SPEC="-L${exec_prefix}/lib ${TCL_LIB_FLAG}"


- # tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed

- # so that the backslashes quoting the DBX braces are dropped.

- 

- # Trick to replace DBGX with TCL_DBGX

- DBGX='${TCL_DBGX}'

- eval "TCL_LIB_FILE=${TCL_LIB_FILE}"

- 

  VERSION='${VERSION}'

  eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"

  eval "CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"


  #--------------------------------------------------------------------

  #The statements below define the symbol TCL_PACKAGE_PATH, which

--- 4664,4704 ----

      MAKE_LIB="ar cr \${TCL_LIB_FILE} \${OBJS}"

  fi


+ # tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed

+ # so that the backslashes quoting the DBX braces are dropped.

+ 

+ # Trick to replace DBGX with TCL_DBGX

+ DBGX='${TCL_DBGX}'

+ eval "TCL_LIB_FILE=${TCL_LIB_FILE}"

+ 

  # Note:  in the following variable, it's important to use the absolute

  # path name of the Tcl directory rather than "..":  this is because

  # AIX remembers this path and will attempt to use it at run-time to look

  # up the Tcl library.


! if test $TCL_SHARED_BUILD = 0 -o $TCL_NEEDS_EXP_FILE = 0; then

!     if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then

!         TCL_LIB_FLAG="-ltcl${TCL_VERSION}\${TCL_DBGX}"

!     else

!         TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}"

!     fi

!     TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}"

!     TCL_LIB_SPEC="-L${exec_prefix}/lib ${TCL_LIB_FLAG}"

  else

!     TCL_BUILD_EXP_FILE="lib.exp"

!     eval "TCL_EXP_FILE=libtcl${TCL_EXPORT_FILE_SUFFIX}"

! 

!     # Replace DBGX with TCL_DBGX

!     eval "TCL_EXP_FILE=\"${TCL_EXP_FILE}\""

!     

!     TCL_BUILD_LIB_SPEC="-bI:`pwd`/${TCL_BUILD_EXP_FILE}"

!     TCL_LIB_SPEC="-bI:${LIB_RUNTIME_DIR}/${TCL_EXP_FILE}"    

  fi


  VERSION='${VERSION}'

  eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"

  eval "CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"

+ eval "CFG_TCL_EXPORT_FILE_SUFFIX=${TCL_EXPORT_FILE_SUFFIX}"


  #--------------------------------------------------------------------

  #The statements below define the symbol TCL_PACKAGE_PATH, which

***************

*** 4720,4725 ****

--- 4748,4757 ----


+ 

+ 

+ 

+ 

  trap '' 1 2 15

  cat > confcache <<\EOF

  # This file is a shell script that caches the results of configure

***************

*** 4859,4864 ****

--- 4891,4897 ----

  s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g

  s%@CFG_TCL_SHARED_LIB_SUFFIX@%$CFG_TCL_SHARED_LIB_SUFFIX%g

  s%@CFG_TCL_UNSHARED_LIB_SUFFIX@%$CFG_TCL_UNSHARED_LIB_SUFFIX%g

+ s%@CFG_TCL_EXPORT_FILE_SUFFIX@%$CFG_TCL_EXPORT_FILE_SUFFIX%g

  s%@TCL_DBGX@%$TCL_DBGX%g

  s%@DL_LIBS@%$DL_LIBS%g

  s%@DL_OBJS@%$DL_OBJS%g

***************

*** 4874,4879 ****

--- 4907,4915 ----

  s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g

  s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g

  s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g

+ s%@TCL_NEEDS_EXP_FILE@%$TCL_NEEDS_EXP_FILE%g

+ s%@TCL_BUILD_EXP_FILE@%$TCL_BUILD_EXP_FILE%g

+ s%@TCL_EXP_FILE@%$TCL_EXP_FILE%g

  s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g

  s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g

  s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g

*** tcl8.0/unix/.configure.inThu Jan 14 11:14:26 1999

--- tcl8.0/unix/configure.inThu Jan 14 11:14:27 1999

***************

*** 624,629 ****

--- 624,640 ----

  #a .a extension whereas shared objects for loadable

  #extensions have a .so extension.  Defaults to

  #${VERSION}${SHLIB_SUFFIX}.

+ #TCL_NEEDS_EXP_FILE -

+ #1 means that an export file is needed to link to a

+ #shared library.

+ #

+ #TCL_EXP_FILE -  The name of the installed export / import file which 

+ #should be used to link to the Tcl shared library.

+ #Empty if Tcl is unshared.

+ #TCL_BUILD_EXP_FILE -

+ #The name of the built export / import file which

+ #should be used to link to the Tcl shared library.

+ #Empty if Tcl is unshared.

  #--------------------------------------------------------------------


  # Step 1: set the variable "system" to hold the name and version number

***************

*** 661,666 ****

--- 672,678 ----


  fullSrcDir=`cd $srcdir; pwd`

  EXTRA_CFLAGS=""

+ TCL_EXPORT_FILE_SUFFIX=""

  TCL_UNSHARED_LIB_SUFFIX=""

  TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'

  ECHO_VERSION='`echo ${VERSION}`'

***************

*** 667,672 ****

--- 679,687 ----

  TCL_LIB_VERSIONS_OK=ok

  CFLAGS_DEBUG=-g

  CFLAGS_OPTIMIZE=-O

+ TCL_NEEDS_EXP_FILE=0

+ TCL_BUILD_EXP_FILE=""

+ TCL_EXP_FILE=""

  case $system in

      AIX-4.[[2-9]])

  SHLIB_CFLAGS=""

***************

*** 677,684 ****

  DL_LIBS="-ldl"

  LD_FLAGS=""

  LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'

! AIX=yes

! TCL_SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'

  ;;

      AIX-*)

  SHLIB_CFLAGS=""

--- 692,699 ----

  DL_LIBS="-ldl"

  LD_FLAGS=""

  LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'

! TCL_NEEDS_EXP_FILE=1

! TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'

  ;;

      AIX-*)

  SHLIB_CFLAGS=""

***************

*** 689,695 ****

  DL_LIBS="-lld"

  LD_FLAGS=""

  LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'

! TCL_SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'

  ;;

      BSD/OS-2.1*|BSD/OS-3*)

  SHLIB_CFLAGS=""

--- 704,711 ----

  DL_LIBS="-lld"

  LD_FLAGS=""

  LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'

! TCL_NEEDS_EXP_FILE=1

! TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'

  ;;

      BSD/OS-2.1*|BSD/OS-3*)

  SHLIB_CFLAGS=""

***************

*** 1215,1243 ****

      MAKE_LIB="ar cr \${TCL_LIB_FILE} \${OBJS}"

  fi


  # Note:  in the following variable, it's important to use the absolute

  # path name of the Tcl directory rather than "..":  this is because

  # AIX remembers this path and will attempt to use it at run-time to look

  # up the Tcl library.


! if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then

!     TCL_LIB_FLAG="-ltcl${TCL_VERSION}\${TCL_DBGX}"

  else

!     TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}"

  fi

- TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}"

- TCL_LIB_SPEC="-L${exec_prefix}/lib ${TCL_LIB_FLAG}"


- # tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed

- # so that the backslashes quoting the DBX braces are dropped.

- 

- # Trick to replace DBGX with TCL_DBGX

- DBGX='${TCL_DBGX}'

- eval "TCL_LIB_FILE=${TCL_LIB_FILE}"

- 

  VERSION='${VERSION}'

  eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"

  eval "CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"


  #--------------------------------------------------------------------

  #The statements below define the symbol TCL_PACKAGE_PATH, which

--- 1231,1271 ----

      MAKE_LIB="ar cr \${TCL_LIB_FILE} \${OBJS}"

  fi


+ # tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed

+ # so that the backslashes quoting the DBX braces are dropped.

+ 

+ # Trick to replace DBGX with TCL_DBGX

+ DBGX='${TCL_DBGX}'

+ eval "TCL_LIB_FILE=${TCL_LIB_FILE}"

+ 

  # Note:  in the following variable, it's important to use the absolute

  # path name of the Tcl directory rather than "..":  this is because

  # AIX remembers this path and will attempt to use it at run-time to look

  # up the Tcl library.


! if test $TCL_SHARED_BUILD = 0 -o $TCL_NEEDS_EXP_FILE = 0; then

!     if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then

!         TCL_LIB_FLAG="-ltcl${TCL_VERSION}\${TCL_DBGX}"

!     else

!         TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}"

!     fi

!     TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}"

!     TCL_LIB_SPEC="-L${exec_prefix}/lib ${TCL_LIB_FLAG}"

  else

!     TCL_BUILD_EXP_FILE="lib.exp"

!     eval "TCL_EXP_FILE=libtcl${TCL_EXPORT_FILE_SUFFIX}"

! 

!     # Replace DBGX with TCL_DBGX

!     eval "TCL_EXP_FILE=\"${TCL_EXP_FILE}\""

!     

!     TCL_BUILD_LIB_SPEC="-bI:`pwd`/${TCL_BUILD_EXP_FILE}"

!     TCL_LIB_SPEC="-bI:${LIB_RUNTIME_DIR}/${TCL_EXP_FILE}"    

  fi


  VERSION='${VERSION}'

  eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"

  eval "CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"

+ eval "CFG_TCL_EXPORT_FILE_SUFFIX=${TCL_EXPORT_FILE_SUFFIX}"


  #--------------------------------------------------------------------

  #The statements below define the symbol TCL_PACKAGE_PATH, which

***************

*** 1259,1264 ****

--- 1287,1293 ----

  AC_SUBST(CFLAGS_WARNING)

  AC_SUBST(CFG_TCL_SHARED_LIB_SUFFIX)

  AC_SUBST(CFG_TCL_UNSHARED_LIB_SUFFIX)

+ AC_SUBST(CFG_TCL_EXPORT_FILE_SUFFIX)

  AC_SUBST(TCL_DBGX)

  AC_SUBST(DL_LIBS)

  AC_SUBST(DL_OBJS)

***************

*** 1274,1279 ****

--- 1303,1311 ----

  AC_SUBST(TCL_LD_SEARCH_FLAGS)

  AC_SUBST(TCL_LIB_FILE)

  AC_SUBST(TCL_LIB_FLAG)

+ AC_SUBST(TCL_NEEDS_EXP_FILE)

+ AC_SUBST(TCL_BUILD_EXP_FILE)

+ AC_SUBST(TCL_EXP_FILE)

  AC_SUBST(TCL_LIB_SPEC)

  AC_SUBST(TCL_LIB_VERSIONS_OK)

  AC_SUBST(TCL_MAJOR_VERSION)

*** tcl8.0/unix/.ldAixThu Jan 14 11:14:28 1999

--- tcl8.0/unix/ldAixThu Jan 14 11:14:29 1999

***************

*** 23,28 ****

--- 23,31 ----

      fi

  done


+ # Extract the name of the object file that we're linking.

+ outputFile=`echo $args | sed -e 's/.*-o \([^ ]*\).*/\1/'`

+ 

  # Create the export file from all of the object files, using nm followed

  # by sed editing.  Here are some tricky aspects of this:

  #

***************

*** 49,61 ****

    nmopts="-e"

  fi

  rm -f lib.exp

! echo "#! " >lib.exp

  /usr/ccs/bin/nm $nmopts -h $ofiles | sed -e '/:$/d' -e '/ U /d' -e '/[ ]0|extern/d' -e '/unamex/d' -e 's/^\.//' -e 's/[ |].*//' | sort | uniq >>lib.exp


! # Extract the name of the object file that we're linking.  If it's a .a

! # file, then link all the objects together into a single file "shr.o"

! # and then put that into the archive.  Otherwise link the object files

! # directly into the .a file.


  outputFile=`echo $args | sed -e 's/.*-o \([^ ]*\).*/\1/'`

  noDotA=`echo $outputFile | sed -e '/\.a$/d'`

--- 52,63 ----

    nmopts="-e"

  fi

  rm -f lib.exp

! echo "#! $outputFile" >lib.exp

  /usr/ccs/bin/nm $nmopts -h $ofiles | sed -e '/:$/d' -e '/ U /d' -e '/[ ]0|extern/d' -e '/unamex/d' -e 's/^\.//' -e 's/[ |].*//' | sort | uniq >>lib.exp


! # If we're linking a .a file, then link all the objects together into a 

! # single file "shr.o" and then put that into the archive.  Otherwise link 

! # the object files directly into the .a file.


  outputFile=`echo $args | sed -e 's/.*-o \([^ ]*\).*/\1/'`

  noDotA=`echo $outputFile | sed -e '/\.a$/d'`

*** tcl8.0/unix/.Makefile.inThu Jan 14 11:14:30 1999

--- tcl8.0/unix/Makefile.inThu Jan 14 11:14:31 1999

***************

*** 184,189 ****

--- 184,192 ----

  TCL_LIB_FLAG = @TCL_LIB_FLAG@

  #TCL_LIB_FLAG = -ltcl


+ TCL_EXP_FILE = @TCL_EXP_FILE@

+ TCL_BUILD_EXP_FILE = @TCL_BUILD_EXP_FILE@

+ 

  #----------------------------------------------------------------

  # The information below is modified by the configure script when

  # Makefile is generated from Makefile.in.  You shouldn't normally

***************

*** 433,439 ****

  # some ranlibs write to current directory, and this might not always be

  # possible (e.g. if installing as root).


! install-binaries: $(TCL_LIB_FILE) tclsh

  @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \

      do \

      if [ ! -d $$i ] ; then \

--- 436,442 ----

  # some ranlibs write to current directory, and this might not always be

  # possible (e.g. if installing as root).


! install-binaries: $(TCL_LIB_FILE) $(TCL_BUILD_EXP_FILE) tclsh

  @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \

      do \

      if [ ! -d $$i ] ; then \

***************

*** 447,452 ****

--- 450,460 ----

  @$(INSTALL_DATA) $(TCL_LIB_FILE) $(LIB_INSTALL_DIR)/$(TCL_LIB_FILE)

  @(cd $(LIB_INSTALL_DIR); $(RANLIB) $(TCL_LIB_FILE))

  @chmod 555 $(LIB_INSTALL_DIR)/$(TCL_LIB_FILE)

+ @if test "$(TCL_BUILD_EXP_FILE)" != ""; then \

+     echo "Installing $(TCL_EXP_FILE)"; \

+     $(INSTALL_DATA) $(TCL_BUILD_EXP_FILE) \

+ $(LIB_INSTALL_DIR)/$(TCL_EXP_FILE); \

+     fi

  @echo "Installing tclsh"

  @$(INSTALL_PROGRAM) tclsh $(BIN_INSTALL_DIR)/tclsh$(VERSION)

  @echo "Installing tclConfig.sh"

*** tcl8.0/unix/.tclConfig.sh.inThu Jan 14 11:14:32 1999

--- tcl8.0/unix/tclConfig.sh.inThu Jan 14 11:14:33 1999

***************

*** 37,42 ****

--- 37,51 ----

  # The name of the Tcl library (may be either a .a file or a shared library):

  TCL_LIB_FILE='@TCL_LIB_FILE@'


+ # Flag to indicate whether shared libraries need export files.

+ TCL_NEEDS_EXP_FILE=@TCL_NEEDS_EXP_FILE@

+ 

+ # String that can be evaluated to generate the part of the export file

+ # name that comes after the "libxxx" (includes version number, if any,

+ # extension, and anything else needed).  May depend on the variables

+ # VERSION.  On most UNIX systems this is ${VERSION}.exp.

+ TCL_EXPORT_FILE_SUFFIX='@CFG_TCL_EXPORT_FILE_SUFFIX@'

+ 

  # Additional libraries to use when linking Tcl.

  TCL_LIBS='@DL_LIBS@ @LIBS@ @MATH_LIBS@'


PatchFiles:

tcl8.0/unix/configure

tcl8.0/unix/configure.in

tcl8.0/unix/ldAix

tcl8.0/unix/Makefile.in

tcl8.0/unix/tclConfig.sh.in
welch Closed ticket [218559ffff]. [History diff]2000-10-26 08:24:14
dgp Ticket [218559ffff]: 3 changes [History diff]2001-04-16 23:23:42
Log in (anonymous is fine) to add a comment.