Changeset 7e5a38 in git for Singular/configure.in


Ignore:
Timestamp:
Dec 7, 2000, 4:04:03 PM (23 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
8f79d773fb56da78b5f8ed5221984b47fb7404a5
Parents:
3c13f654591de9411714b65349412f92daf673a4
Message:
* dynamic loading of p_Procs


git-svn-id: file:///usr/local/Singular/svn/trunk@4833 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/configure.in

    r3c13f6 r7e5a38  
    254254AC_CHECK_LIB(nsl, gethostbyname)
    255255AC_CHECK_LIB(ucb, index)
     256
     257# check for dl lib
     258case "$ac_cv_singuname" in
     259        HPUX*)
     260          AC_CHECK_LIB(dld, shl_load)
     261          if test "$ac_cv_lib_dld_shl_load" = yes; then
     262                LD_DYN_FLAGS="-ldld -Xlinker -E"
     263                SFLAGS="-fPIC -DPIC"
     264                SLDFLAGS=-shared
     265                ac_lib_dl=yes
     266          fi
     267        ;;
     268        *Linux*)
     269          AC_CHECK_LIB(dl, dlopen)
     270          if test "$ac_cv_lib_dl_dlopen" = yes; then
     271                LD_DYN_FLAGS="-ldl -rdynamic"
     272                SFLAGS="-fPIC -DPIC"
     273                SLDFLAGS=-shared
     274                ac_lib_dl=yes
     275          fi
     276        ;;
     277esac
     278AC_SUBST(LD_DYN_FLAGS)
     279AC_SUBST(SFLAGS)
     280AC_SUBST(SLDFLAGS)
    256281
    257282# heder file checks
     
    373398AC_ARG_WITH(
    374399  readline,
    375   [  --with-readline          do use static readline for fancy display])
     400  [  --with-readline=[dynamic,static,no]         
     401                          do use dynamic/static/no readline for fancy display])
    376402AC_ARG_WITH(
    377403  MP,
     
    391417AC_ARG_WITH(
    392418  dl,
    393   [  --with-dl               do use dl (dynamic linking)])
     419  [  --without-dl            do not use dynamic linking, modules, and kernel])
     420AC_ARG_WITH(
     421  dynamic-modules,
     422  [  --with-dynamic-modules  do compile with dynamic modules support])
     423AC_ARG_WITH(
     424  dynamic-kernel,
     425  [  --without-dynamic-kernel               
     426                          do not compile with dynamic kernel parts])
    394427AC_ARG_WITH(apint,
    395428  [  --with-apint=PACKAGE    use PACKAGE for arbitary integer arithmetic])
     
    405438dnl
    406439
     440
     441AC_MSG_CHECKING(whether to use dynamic linking)
     442if test "$with_dl" != no && test "$ac_lib_dl" = yes; then
     443  AC_DEFINE(HAVE_DL)
     444  ac_have_dl=yes
     445  AC_MSG_RESULT(yes)
     446else
     447  AC_MSG_RESULT(no)
     448fi
     449
    407450AC_CHECK_LIB(ncurses,tgetent,,\
    408451 AC_CHECK_LIB(curses,tgetent,,\
     
    410453
    411454# readline
    412 if test "$with_readline" = yes; then
     455if test "$with_readline" = dynamic && test "$ac_cv_have_dl" != yes; then
     456  AC_MSG_WARN(can not build dynamic readline without dynamic linking)
     457  with_readline=static
     458fi
     459
     460
     461if test "$with_readline" != dynamic && test "$with_readline" != no; then
    413462AC_LANG_SAVE
    414463AC_LANG_CPLUSPLUS
     
    490539  if test "$ac_cv_have_readline" = yes; then
    491540    AC_DEFINE(HAVE_READLINE)
    492   else
    493     AC_MSG_WARN(building without readline: disabling fancy display)
    494541  fi
    495542AC_LANG_RESTORE
    496543fi
    497544
     545AC_MSG_CHECKING(which readline to use)
     546if test "$ac_cv_with_readline" = dynamic; then
     547  AC_MSG_RESULT(dynamic)
     548  AC_DEFINE(HAVE_DYN_RL)
     549elif test "$ac_cv_have_readline" = yes; then
     550  AC_MSG_RESULT(static)
     551else
     552  AC_MSG_RESULT(none)
     553  AC_MSG_WARN(building without readline: disabling fancy display)
     554fi
     555 
    498556NEED_LIBS=$LIBS
    499557
     
    505563AC_CHECK_LIB(smallgmp, main)
    506564AC_CHECK_LIB(MP, IMP_PutGmpInt)
    507 AC_CHECK_LIB(MPT, MPT_GetTree)
     565AC_CHECK_LIB(MPT, MPT_GetTre)
    508566AC_CHECK_LIB(singcf, atof)
    509567AC_CHECK_LIB(singfac, atof)
     
    683741fi
    684742
    685 AC_MSG_CHECKING(whether to have dl lib)
    686 
    687 case "$ac_cv_singuname" in
    688         HPUX-9)
    689           AC_MSG_RESULT(dld)
    690           AC_CHECK_LIB(dld, shl_load)
    691           LD_DYN_FLAGS="-ldld -Xlinker -E"
    692           AC_DEFINE(HAVE_DL)
    693         ;;
    694         HPUX-10)
    695           AC_MSG_RESULT(dld)
    696           AC_CHECK_LIB(dld, shl_load)
    697           LD_DYN_FLAGS="-ldld -Xlinker -E"
    698           AC_DEFINE(HAVE_DL)
    699         ;;
    700         *Linux*)
    701           AC_MSG_RESULT(dl)
    702           AC_CHECK_LIB(dl, dlopen)
    703           LD_DYN_FLAGS="-ldl -rdynamic"
    704           AC_DEFINE(HAVE_DL)
    705         ;;
    706         *)
    707           AC_MSG_RESULT(no)
    708           ;;
    709 esac
    710 
    711 AC_MSG_CHECKING(whether to have dynamic loading)
    712 if test "$with_dl" != yes; then
     743AC_MSG_CHECKING(whether to have dynamic modules)
     744if test "$with_dynamic_modules" != yes || test "$ac_have_dl" != yes; then
    713745  AC_MSG_RESULT(no)
    714746else
    715747  AC_DEFINE(HAVE_DYNAMIC_LOADING)
     748  AC_MSG_RESULT(yes)
     749fi
     750
     751AC_MSG_CHECKING(whether to have dynamic kernel)
     752if test "$with_dynamic_kernel" != no && test "$ac_lib_dl" = yes; then
     753  DL_KERNEL=1
     754  AC_SUBST(DL_KERNEL)
    716755  AC_MSG_RESULT(yes)
    717756fi
     
    725764fi
    726765
    727 AC_SUBST(LD_DYN_FLAGS)
    728766
    729767OUTPUT_MAKEFILES=Makefile
Note: See TracChangeset for help on using the changeset viewer.