Changeset 1339:8d7f68a700d8


Ignore:
Timestamp:
09/09/09 00:54:46 (2 years ago)
Author:
niam
Branch:
default
Message:

configure: automatic dl-lib detection

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • distributions/rPath/libdodo.recipe

    r1325 r1339  
    5656 
    5757                if Use.dl: 
    58                         extraconfig +=' --enable-dl' 
     58                        extraconfig +=' --with-dl' 
    5959 
    6060                if Use.libxml2: 
  • trunk/build

    r1301 r1339  
    1919} 
    2020 
    21 build --enable-deque --enable-io-xexec --enable-graphics-xexec --enable-database-xexec --with-sqlite3 --with-postgresql --with-mysql --with-openssl --with-fast-cgi --with-pcre --enable-dl --with-libxml2 --with-bzip2 --with-zlib --with-iconv --with-imagemagick $@ 
     21build --enable-deque --enable-io-xexec --enable-graphics-xexec --enable-database-xexec --with-sqlite3 --with-postgresql --with-mysql --with-openssl --with-fast-cgi --with-pcre --with-dl --with-libxml2 --with-bzip2 --with-zlib --with-iconv --with-imagemagick $@ 
    2222 
    23 build --enable-deque --enable-io-xexec --enable-graphics-xexec --enable-database-xexec --with-sqlite3 --with-postgresql --with-mysql --with-openssl --with-fast-cgi --with-pcre --enable-dl --with-libxml2 --with-bzip2 --with-zlib --with-iconv --with-imagemagick --with-ipc=XSI $@ 
     23build --enable-deque --enable-io-xexec --enable-graphics-xexec --enable-database-xexec --with-sqlite3 --with-postgresql --with-mysql --with-openssl --with-fast-cgi --with-pcre --with-dl --with-libxml2 --with-bzip2 --with-zlib --with-iconv --with-imagemagick --with-ipc=XSI $@ 
    2424 
    25 build --enable-deque --enable-io-xexec --enable-graphics-xexec --enable-database-xexec --with-sqlite3 --with-postgresql --with-mysql --with-fast-cgi --with-pcre --enable-dl --with-libxml2 --with-bzip2 --with-zlib --with-iconv --with-imagemagick $@ 
     25build --enable-deque --enable-io-xexec --enable-graphics-xexec --enable-database-xexec --with-sqlite3 --with-postgresql --with-mysql --with-fast-cgi --with-pcre --with-dl --with-libxml2 --with-bzip2 --with-zlib --with-iconv --with-imagemagick $@ 
    2626 
    27 build --enable-deque --enable-io-xexec --enable-graphics-xexec --enable-database-xexec --with-sqlite3 --with-postgresql --with-mysql --with-openssl --with-fast-cgi --with-pcre --enable-dl --with-bzip2 --with-zlib --with-iconv --with-imagemagick $@ 
     27build --enable-deque --enable-io-xexec --enable-graphics-xexec --enable-database-xexec --with-sqlite3 --with-postgresql --with-mysql --with-openssl --with-fast-cgi --with-pcre --with-dl --with-bzip2 --with-zlib --with-iconv --with-imagemagick $@ 
    2828 
    2929build --enable-deque --enable-io-xexec --enable-graphics-xexec --enable-database-xexec --with-sqlite3 --with-postgresql --with-mysql --with-openssl --with-fast-cgi --with-pcre --with-libxml2 --with-bzip2 --with-zlib --with-iconv --with-imagemagick $@ 
    3030 
    31 build --disable-deque --enable-io-xexec --enable-graphics-xexec --enable-database-xexec --with-sqlite3 --with-postgresql --with-mysql --with-openssl --with-fast-cgi --with-pcre --enable-dl --with-libxml2 --with-bzip2 --with-zlib --with-iconv --with-imagemagick $@ 
     31build --disable-deque --enable-io-xexec --enable-graphics-xexec --enable-database-xexec --with-sqlite3 --with-postgresql --with-mysql --with-openssl --with-fast-cgi --with-pcre --with-dl --with-libxml2 --with-bzip2 --with-zlib --with-iconv --with-imagemagick $@ 
    3232 
    33 build --enable-deque --disable-io-xexec --disable-graphics-xexec --disable-database-xexec --with-sqlite3 --with-postgresql --with-mysql --with-openssl --with-fast-cgi --with-pcre --enable-dl --with-libxml2 --with-bzip2 --with-zlib --with-iconv --with-imagemagick $@ 
     33build --enable-deque --disable-io-xexec --disable-graphics-xexec --disable-database-xexec --with-sqlite3 --with-postgresql --with-mysql --with-openssl --with-fast-cgi --with-pcre --with-dl --with-libxml2 --with-bzip2 --with-zlib --with-iconv --with-imagemagick $@ 
    3434 
    3535build --enable-deque --enable-io-xexec --enable-graphics-xexec --enable-database-xexec $@ 
  • trunk/build.options

    r1127 r1339  
    44 
    55#everything enabled 
    6 ./configure --with-sqlite3 --with-postgresql --with-mysql --with-fast-cgi --enable-dl --with-libxml2 --with-threading-lib=pthread --with-bzip2 --with-zlib --with-iconv --with-imagemagick --enable-debug --with-pcre --with-bfd --with-openssl --prefix=/opt/libdodo 
     6./configure --with-sqlite3 --with-postgresql --with-mysql --with-fast-cgi --with-dl --with-libxml2 --with-threading-lib=pthread --with-bzip2 --with-zlib --with-iconv --with-imagemagick --enable-debug --with-pcre --with-bfd --with-openssl --prefix=/opt/libdodo 
    77 
    88#everything enabled except xexec actions 
    9 ./configure --with-sqlite3 --with-postgresql --with-mysql --with-fast-cgi --enable-dl --with-libxml2 --with-threading-lib=pthread --with-bzip2 --with-zlib --with-iconv --with-imagemagick --enable-debug --with-pcre --with-bfd --with-openssl --prefix=/opt/libdodo --disable-graphics-xexec --disable-database-xexec --disable-io-xexec 
     9./configure --with-sqlite3 --with-postgresql --with-mysql --with-fast-cgi --with-dl --with-libxml2 --with-threading-lib=pthread --with-bzip2 --with-zlib --with-iconv --with-imagemagick --enable-debug --with-pcre --with-bfd --with-openssl --prefix=/opt/libdodo --disable-graphics-xexec --disable-database-xexec --disable-io-xexec 
    1010 
  • trunk/configure

    r1337 r1339  
    12711271  --disable-database-xexec 
    12721272                          compile data::base:: w/o xexec support 
    1273   --enable-dl             enable dynamic loading 
    12741273  --disable-fast-dynamic-loading 
    12751274                          do not unload library to produce better performance 
     
    12781277  --disable-graphics-xexec 
    12791278                          compile graphics w/o xexec support 
    1280   --disable-dl-lib        disable dl as lib 
    12811279 
    12821280Optional Packages: 
     
    12931291  --with-fast-cgi[=DIR]   use fast CGI 
    12941292  --with-pcre[=DIR]       use pcre 
     1293  --with-dl[=DIR]         use dynamic loading 
    12951294  --with-libxml2[=DIR]    use libxml2 
    12961295  --with-threading-lib[=lib] 
     
    74407439fi 
    74417440 
    7442 # Check whether --enable-dl was given. 
    7443 if test "${enable_dl+set}" = set; then 
    7444   enableval=$enable_dl; DL="$enableval" 
    7445 else 
    7446   DL="no" 
    7447 fi 
    7448  
    7449 if test "$DL" = "yes" 
     7441 
     7442# Check whether --with-dl was given. 
     7443if test "${with_dl+set}" = set; then 
     7444  withval=$with_dl; MOD_DL_DIR="$withval" 
     7445else 
     7446  MOD_DL="no" 
     7447fi 
     7448 
     7449if test "$MOD_DL" != "no" -a "$MOD_DL_DIR" != "no" 
    74507450then 
    7451         echo -n -e "#define DL_EXT 1\n\n" >> include/libdodo/directives.runtime.h 
     7451        if test "$MOD_DL_DIR" = "yes" 
     7452        then 
     7453                MOD_DL_DIR=/usr 
     7454        fi 
     7455        CPPFLAGS="$CPPFLAGS -I$MOD_DL_DIR/include" 
     7456        LDFLAGS="$LDFLAGS -L$MOD_DL_DIR/lib" 
    74527457 
    74537458        # Check whether --enable-fast-dynamic-loading was given. 
    74547459if test "${enable_fast_dynamic_loading+set}" = set; then 
    7455   enableval=$enable_fast_dynamic_loading; DL_FAST="$enableval" 
    7456 else 
    7457   DL_FAST="yes" 
    7458 fi 
    7459  
    7460  
    7461         if test "$DL_FAST" = "yes" -a "$OS" = "Linux" 
     7460  enableval=$enable_fast_dynamic_loading; MOD_DL_FAST="$enableval" 
     7461else 
     7462  MOD_DL_FAST="yes" 
     7463fi 
     7464 
     7465 
     7466        if test "$MOD_DL_FAST" = "yes" -a "$OS" = "Linux" 
    74627467        then 
    74637468                echo -n -e "#define DL_FAST 1\n\n" >> include/libdodo/directives.runtime.h 
     
    74677472                RESULT="$RESULT\nFast dynamic loading\t\t\t\t\t\tdisabled" 
    74687473        fi 
     7474 
     7475        { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 
     7476echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } 
     7477if test "${ac_cv_lib_dl_dlopen+set}" = set; then 
     7478  echo $ECHO_N "(cached) $ECHO_C" >&6 
     7479else 
     7480  ac_check_lib_save_LIBS=$LIBS 
     7481LIBS="-ldl  $LIBS" 
     7482cat >conftest.$ac_ext <<_ACEOF 
     7483/* confdefs.h.  */ 
     7484_ACEOF 
     7485cat confdefs.h >>conftest.$ac_ext 
     7486cat >>conftest.$ac_ext <<_ACEOF 
     7487/* end confdefs.h.  */ 
     7488 
     7489/* Override any GCC internal prototype to avoid an error. 
     7490   Use char because int might match the return type of a GCC 
     7491   builtin and then its argument prototype would still apply.  */ 
     7492#ifdef __cplusplus 
     7493extern "C" 
     7494#endif 
     7495char dlopen (); 
     7496int 
     7497main () 
     7498{ 
     7499return dlopen (); 
     7500  ; 
     7501  return 0; 
     7502} 
     7503_ACEOF 
     7504rm -f conftest.$ac_objext conftest$ac_exeext 
     7505if { (ac_try="$ac_link" 
     7506case "(($ac_try" in 
     7507  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 
     7508  *) ac_try_echo=$ac_try;; 
     7509esac 
     7510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 
     7511  (eval "$ac_link") 2>conftest.er1 
     7512  ac_status=$? 
     7513  grep -v '^ *+' conftest.er1 >conftest.err 
     7514  rm -f conftest.er1 
     7515  cat conftest.err >&5 
     7516  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     7517  (exit $ac_status); } && { 
     7518         test -z "$ac_c_werror_flag" || 
     7519         test ! -s conftest.err 
     7520       } && test -s conftest$ac_exeext && 
     7521       $as_test_x conftest$ac_exeext; then 
     7522  ac_cv_lib_dl_dlopen=yes 
     7523else 
     7524  echo "$as_me: failed program was:" >&5 
     7525sed 's/^/| /' conftest.$ac_ext >&5 
     7526 
     7527        ac_cv_lib_dl_dlopen=no 
     7528fi 
     7529 
     7530rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 
     7531      conftest$ac_exeext conftest.$ac_ext 
     7532LIBS=$ac_check_lib_save_LIBS 
     7533fi 
     7534{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 
     7535echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } 
     7536if test $ac_cv_lib_dl_dlopen = yes; then 
     7537  LDFLAGS="$LDFLAGS -ldl" 
     7538fi 
     7539 
     7540        echo -n -e "#define DL_EXT 1\n\n" >> include/libdodo/directives.runtime.h 
    74697541 
    74707542        RESULT="$RESULT\nDynamic linking\t\t\t\t\t\t\tenabled" 
     
    1029310365fi 
    1029410366 
    10295 if test "$CALLSTACK_EX" = "yes" -o "$DL" = "yes" 
     10367if test "$CALLSTACK_EX" = "yes" -o "$MOD_DL" != "no" 
    1029610368then 
    1029710369        if test "${ac_cv_header_dlfcn_h+set}" = set; then 
     
    1043410506 
    1043510507 
    10436         # Check whether --enable-dl-lib was given. 
    10437 if test "${enable_dl_lib+set}" = set; then 
    10438   enableval=$enable_dl_lib; MOD_DL_LIB="$enableval" 
    10439 else 
    10440   MOD_DL_LIB="yes" 
    10441 fi 
    10442  
    10443         if test "$MOD_DL_LIB" = "yes" 
    10444         then 
    10445  
    10446 { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 
    10447 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } 
    10448 if test "${ac_cv_lib_dl_dlopen+set}" = set; then 
    10449   echo $ECHO_N "(cached) $ECHO_C" >&6 
    10450 else 
    10451   ac_check_lib_save_LIBS=$LIBS 
    10452 LIBS="-ldl  $LIBS" 
    10453 cat >conftest.$ac_ext <<_ACEOF 
    10454 /* confdefs.h.  */ 
    10455 _ACEOF 
    10456 cat confdefs.h >>conftest.$ac_ext 
    10457 cat >>conftest.$ac_ext <<_ACEOF 
    10458 /* end confdefs.h.  */ 
    10459  
    10460 /* Override any GCC internal prototype to avoid an error. 
    10461    Use char because int might match the return type of a GCC 
    10462    builtin and then its argument prototype would still apply.  */ 
    10463 #ifdef __cplusplus 
    10464 extern "C" 
    10465 #endif 
    10466 char dlopen (); 
    10467 int 
    10468 main () 
    10469 { 
    10470 return dlopen (); 
    10471   ; 
    10472   return 0; 
    10473 } 
    10474 _ACEOF 
    10475 rm -f conftest.$ac_objext conftest$ac_exeext 
    10476 if { (ac_try="$ac_link" 
    10477 case "(($ac_try" in 
    10478   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 
    10479   *) ac_try_echo=$ac_try;; 
    10480 esac 
    10481 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 
    10482   (eval "$ac_link") 2>conftest.er1 
    10483   ac_status=$? 
    10484   grep -v '^ *+' conftest.er1 >conftest.err 
    10485   rm -f conftest.er1 
    10486   cat conftest.err >&5 
    10487   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    10488   (exit $ac_status); } && { 
    10489          test -z "$ac_c_werror_flag" || 
    10490          test ! -s conftest.err 
    10491        } && test -s conftest$ac_exeext && 
    10492        $as_test_x conftest$ac_exeext; then 
    10493   ac_cv_lib_dl_dlopen=yes 
    10494 else 
    10495   echo "$as_me: failed program was:" >&5 
    10496 sed 's/^/| /' conftest.$ac_ext >&5 
    10497  
    10498         ac_cv_lib_dl_dlopen=no 
    10499 fi 
    10500  
    10501 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 
    10502       conftest$ac_exeext conftest.$ac_ext 
    10503 LIBS=$ac_check_lib_save_LIBS 
    10504 fi 
    10505 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 
    10506 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } 
    10507 if test $ac_cv_lib_dl_dlopen = yes; then 
    10508   cat >>confdefs.h <<_ACEOF 
    10509 #define HAVE_LIBDL 1 
    10510 _ACEOF 
    10511  
    10512   LIBS="-ldl $LIBS" 
    10513  
    10514 else 
    10515   { { echo "$as_me:$LINENO: error: dl lib was not found" >&5 
    10516 echo "$as_me: error: dl lib was not found" >&2;} 
    10517    { (exit 1); exit 1; }; } 
    10518 fi 
    10519  
    10520                 LDFLAGS="$LDFLAGS -ldl" 
    10521         fi 
    1052210508fi 
    1052310509 
  • trunk/configure.in

    r1337 r1339  
    445445fi 
    446446 
    447 AC_ARG_ENABLE(dl, 
    448         AS_HELP_STRING([--enable-dl], [enable dynamic loading]), 
    449                 [DL="$enableval"], [DL="no"]) 
    450 if test "$DL" = "yes" 
    451 then 
    452         echo -n -e "#define DL_EXT 1\n\n" >> include/libdodo/directives.runtime.h 
     447AC_ARG_WITH([dl], 
     448        AS_HELP_STRING([--with-dl@<:@=DIR@:>@], [use dynamic loading]), 
     449                [MOD_DL_DIR="$withval"], [MOD_DL="no"]) 
     450if test "$MOD_DL" != "no" -a "$MOD_DL_DIR" != "no" 
     451then 
     452        if test "$MOD_DL_DIR" = "yes" 
     453        then 
     454                MOD_DL_DIR=/usr 
     455        fi 
     456        CPPFLAGS="$CPPFLAGS -I$MOD_DL_DIR/include" 
     457        LDFLAGS="$LDFLAGS -L$MOD_DL_DIR/lib" 
    453458 
    454459        AC_ARG_ENABLE(fast-dynamic-loading, 
    455460                AS_HELP_STRING([--disable-fast-dynamic-loading], [do not unload library to produce better performance]), 
    456                         [DL_FAST="$enableval"], [DL_FAST="yes"]) 
    457  
    458         if test "$DL_FAST" = "yes" -a "$OS" = "Linux" 
     461                        [MOD_DL_FAST="$enableval"], [MOD_DL_FAST="yes"]) 
     462         
     463        if test "$MOD_DL_FAST" = "yes" -a "$OS" = "Linux" 
    459464        then 
    460465                echo -n -e "#define DL_FAST 1\n\n" >> include/libdodo/directives.runtime.h 
     
    464469                RESULT="$RESULT\nFast dynamic loading\t\t\t\t\t\tdisabled" 
    465470        fi 
     471         
     472        AC_CHECK_LIB([dl], [dlopen], [LDFLAGS="$LDFLAGS -ldl"], []) 
     473        echo -n -e "#define DL_EXT 1\n\n" >> include/libdodo/directives.runtime.h 
    466474 
    467475        RESULT="$RESULT\nDynamic linking\t\t\t\t\t\t\tenabled" 
     
    774782fi 
    775783 
    776 if test "$CALLSTACK_EX" = "yes" -o "$DL" = "yes" 
     784if test "$CALLSTACK_EX" = "yes" -o "$MOD_DL" != "no" 
    777785then 
    778786        AC_CHECK_HEADER([dlfcn.h], [], [AC_MSG_ERROR(dlfcn.h header was not found)]) 
    779         AC_ARG_ENABLE([dl-lib], 
    780                 AS_HELP_STRING([--disable-dl-lib], [disable dl as lib]), 
    781                         [MOD_DL_LIB="$enableval"], [MOD_DL_LIB="yes"]) 
    782         if test "$MOD_DL_LIB" = "yes" 
    783         then 
    784                 AC_CHECK_LIB([dl], [dlopen], [], AC_MSG_ERROR(dl lib was not found)) 
    785                 LDFLAGS="$LDFLAGS -ldl" 
    786         fi 
    787787fi 
    788788 
Note: See TracChangeset for help on using the changeset viewer.