Mercurial > octave-nkf
comparison kpathsea/acklibtool.m4 @ 4287:48d5b36ba35a
[project @ 2003-01-04 20:07:21 by jwe]
author | jwe |
---|---|
date | Sat, 04 Jan 2003 20:08:16 +0000 |
parents | 0e427b227329 |
children |
comparison
equal
deleted
inserted
replaced
4286:0e427b227329 | 4287:48d5b36ba35a |
---|---|
1 dnl Autoconf support for Klibtool. | 1 dnl Autoconf support for Klibtool. |
2 dnl $Id: acklibtool.m4,v 1.6 2003-01-04 19:30:09 jwe Exp $ | 2 dnl $Id: acklibtool.m4,v 1.7 2003-01-04 20:07:21 jwe Exp $ |
3 dnl | 3 dnl |
4 dnl | 4 dnl |
5 dnl Find the script, check for subprogs, etc. | 5 dnl Find the script, check for subprogs, etc. |
6 AC_DEFUN(kb_AC_PROG_LIBTOOL, | 6 AC_DEFUN(kb_AC_PROG_LIBTOOL, |
7 [AC_REQUIRE([AC_PROG_RANLIB]) | 7 [AC_REQUIRE([AC_PROG_RANLIB]) |
20 exit 1 | 20 exit 1 |
21 fi | 21 fi |
22 # | 22 # |
23 ## Argument parsing: we support --enable-shared and --enable-static. | 23 ## Argument parsing: we support --enable-shared and --enable-static. |
24 AC_ARG_ENABLE(shared, | 24 AC_ARG_ENABLE(shared, |
25 [ --enable-shared build shared libraries [default=no]],, | 25 [ --enable-shared build shared libraries [default=no]], |
26 [if test "$enableval" = no; then enable_shared=no; | 26 [if test "$enableval" = no; then BUILD_SHARED_LIBS=no; |
27 else enable_shared=yes; fi], | 27 else BUILD_SHARED_LIBS=yes; fi], |
28 enable_shared=no) | 28 BUILD_SHARED_LIBS=no) |
29 # | 29 # |
30 AC_ARG_ENABLE(static, | 30 AC_ARG_ENABLE(static, |
31 [ --enable-static build static libraries [default=yes]],, | 31 [ --enable-static build static libraries [default=yes]], |
32 [if test "$enableval" = no; then enable_static=no; | 32 [if test "$enableval" = no; then BUILD_STATIC_LIBS=no; |
33 else enable_static=yes; fi], | 33 else BUILD_STATIC_LIBS=yes; fi], |
34 enable_static=yes) | 34 BUILD_STATIC_LIBS=yes) |
35 # | 35 ## |
36 # If they explicitly --enable-static, make that the link type. | 36 ## For Octave, only build the kinds of objects we ask for. |
37 # More commonly, they will just --enable-shared; make that the link type. | 37 ## |
38 # If they --disable-static, implicitly --enable-shared. | 38 if test "$BUILD_STATIC_LIBS" = yes; then |
39 # In any case, prepend to any existing LIBTOOL_OBJTYPES. | 39 LIBTOOL_OBJTYPES=STATIC:$LIBTOOL_OBJTYPES |
40 # If they really want to build both and link statically, | 40 fi |
41 # then they set LIBTOOL_OBJTYPES to SHARED and --enable-static. | 41 if test "$BUILD_SHARED_LIBS" = yes; then |
42 test "$enable_static" = yes && LIBTOOL_OBJTYPES=STATIC:$LIBTOOL_OBJTYPES | 42 LIBTOOL_OBJTYPES=SHARED:$LIBTOOL_OBJTYPES |
43 (test "$enable_shared" = yes \ | 43 fi |
44 || test "$enable_static" = no) \ | |
45 && LIBTOOL_OBJTYPES=SHARED:$LIBTOOL_OBJTYPES | |
46 # Don't bother to remove the trailing :, it'll be ignored. | 44 # Don't bother to remove the trailing :, it'll be ignored. |
47 # | 45 # |
48 ## Finally: Run the klibtool configure command. | 46 ## Finally: Run the klibtool configure command. |
49 LIBTOOL_OBJTYPES=$LIBTOOL_OBJTYPES RANLIB=$RANLIB \ | 47 LIBTOOL_OBJTYPES=$LIBTOOL_OBJTYPES RANLIB=$RANLIB \ |
50 $LIBTOOL --source-dir $ac_aux_dir --config-dir . configure "$host" | 48 $LIBTOOL --source-dir $ac_aux_dir --config-dir . configure "$host" |