mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
* configure.in: Add --with-glib-static option.
This commit is contained in:
parent
6f35fce869
commit
949f2c3167
@ -1,3 +1,7 @@
|
|||||||
|
2003-03-07 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* configure.in: Add --with-glib-static option.
|
||||||
|
|
||||||
2003-03-06 Pavel Roskin <proski@gnu.org>
|
2003-03-06 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
* syntax/spec.syntax: Add BuildArch.
|
* syntax/spec.syntax: Add BuildArch.
|
||||||
|
5
INSTALL
5
INSTALL
@ -89,6 +89,11 @@ incomplete, use `configure --help' to get the full list):
|
|||||||
flag for testing or if you want to use the binary on systems that
|
flag for testing or if you want to use the binary on systems that
|
||||||
don't have glib 2.0.x installed.
|
don't have glib 2.0.x installed.
|
||||||
|
|
||||||
|
`--with-glib-static'
|
||||||
|
Force linking against glib statically. This option is intended for
|
||||||
|
building binaries for distribution purposes and may not work on
|
||||||
|
some operating systems.
|
||||||
|
|
||||||
`--with-mmap', `--without-mmap'
|
`--with-mmap', `--without-mmap'
|
||||||
Force using or not using the mmap function. It is currently used
|
Force using or not using the mmap function. It is currently used
|
||||||
in the internal viewer. `--with-mmap' may be useful on some
|
in the internal viewer. `--with-mmap' may be useful on some
|
||||||
|
39
configure.in
39
configure.in
@ -28,6 +28,9 @@ dnl
|
|||||||
AC_ARG_WITH(glib12,
|
AC_ARG_WITH(glib12,
|
||||||
[ --with-glib12 Force using glib 1.2.x [[no]]])
|
[ --with-glib12 Force using glib 1.2.x [[no]]])
|
||||||
|
|
||||||
|
AC_ARG_WITH([glib_static],
|
||||||
|
[ --with-glib-static Link glib statically [[no]]])
|
||||||
|
|
||||||
glib_found=no
|
glib_found=no
|
||||||
if test "x$with_glib12" != "xyes"; then
|
if test "x$with_glib12" != "xyes"; then
|
||||||
PKG_CHECK_MODULES(GLIB, [glib-2.0], [glib_found=yes], [:])
|
PKG_CHECK_MODULES(GLIB, [glib-2.0], [glib_found=yes], [:])
|
||||||
@ -56,8 +59,10 @@ GNU Midnight Commander requires glib 1.2.6 or above.])])
|
|||||||
GMODULE_LIBS="$GLIB_LIBS"
|
GMODULE_LIBS="$GLIB_LIBS"
|
||||||
GLIB_CFLAGS="$save_GLIB_CFLAGS"
|
GLIB_CFLAGS="$save_GLIB_CFLAGS"
|
||||||
GLIB_LIBS="$save_GLIB_LIBS"
|
GLIB_LIBS="$save_GLIB_LIBS"
|
||||||
|
GLIB_LIBDIR="`$GLIB_CONFIG --exec-prefix`/lib"
|
||||||
else
|
else
|
||||||
PKG_CHECK_MODULES(GMODULE, [gmodule-2.0], [gmodule_found=yes])
|
PKG_CHECK_MODULES(GMODULE, [gmodule-2.0], [gmodule_found=yes])
|
||||||
|
GLIB_LIBDIR="`$PKG_CONFIG --variable=libdir glib-2.0`"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$gmodule_found" = "xyes" ; then
|
if test "x$gmodule_found" = "xyes" ; then
|
||||||
@ -254,6 +259,40 @@ else
|
|||||||
textmode_x11_support="yes"
|
textmode_x11_support="yes"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Try to find static libraries for glib and gmodule.
|
||||||
|
dnl
|
||||||
|
if test x$with_glib_static = xyes; then
|
||||||
|
new_GLIB_LIBS=
|
||||||
|
for i in $GLIB_LIBS; do
|
||||||
|
case x$i in
|
||||||
|
x-lglib*)
|
||||||
|
lib=glib ;;
|
||||||
|
x-lgmodule*)
|
||||||
|
lib=gmodule ;;
|
||||||
|
*)
|
||||||
|
lib=
|
||||||
|
add="$i" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test -n "$lib"; then
|
||||||
|
lib1=`echo $i | sed 's/^-l//'`
|
||||||
|
if test -f "$GLIB_LIBDIR/lib${lib1}.a"; then
|
||||||
|
add="$GLIB_LIBDIR/lib${lib1}.a"
|
||||||
|
else
|
||||||
|
if test -f "$GLIB_LIBDIR/lib${lib}.a"; then
|
||||||
|
add="$GLIB_LIBDIR/lib${lib}.a"
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([Cannot find static $lib])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
new_GLIB_LIBS="$new_GLIB_LIBS $add"
|
||||||
|
done
|
||||||
|
GLIB_LIBS="$new_GLIB_LIBS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Network related functions
|
dnl Network related functions
|
||||||
dnl
|
dnl
|
||||||
|
Loading…
Reference in New Issue
Block a user