mirror of
https://github.com/irssi/irssi.git
synced 2025-02-02 15:08:01 -05:00
--with-perl-path -> --with-perl-lib=[site|vendor|DIR] with some fixes to
make it work better. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1693 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
7a7b7a1c1a
commit
642622624d
67
configure.in
67
configure.in
@ -12,6 +12,9 @@ AC_STDC_HEADERS
|
|||||||
AC_ARG_PROGRAM
|
AC_ARG_PROGRAM
|
||||||
AM_PROG_LIBTOOL
|
AM_PROG_LIBTOOL
|
||||||
|
|
||||||
|
AC_PATH_PROG(sedpath, sed)
|
||||||
|
AC_PATH_PROG(perlpath, perl)
|
||||||
|
|
||||||
dnl * --disable-static isn't a good idea, complain if it's used
|
dnl * --disable-static isn't a good idea, complain if it's used
|
||||||
if test "x$enable_static" = "xno"; then
|
if test "x$enable_static" = "xno"; then
|
||||||
AC_ERROR([Don't give --disable-static option to configure])
|
AC_ERROR([Don't give --disable-static option to configure])
|
||||||
@ -94,24 +97,35 @@ AC_ARG_WITH(modules,
|
|||||||
build_modules="$withval"
|
build_modules="$withval"
|
||||||
fi)
|
fi)
|
||||||
|
|
||||||
if test "x$prefix" = "xNONE"; then
|
if test "x$prefix" != "xNONE"; then
|
||||||
PERL_LIB_DIR=""
|
PERL_MM_PARAMS="INSTALLDIRS=perl PREFIX=$prefix"
|
||||||
else
|
PERL_USE_LIB="$prefix`$perlpath -e 'use Config; $dir = $Config{archlibexp}; $prefix = $Config{prefixexp}; $dir =~ s/^$prefix//; print $dir;'`"
|
||||||
PERL_LIB_DIR="$prefix"
|
|
||||||
|
perl_library_dir="$PERL_USE_LIB"
|
||||||
|
perl_prefix_note=yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_ARG_WITH(perl-path,
|
AC_ARG_WITH(perl-lib,
|
||||||
[ --with-perl-path=dir Specify where to install the Perl libraries for irssi],
|
[ --with-perl-lib=[site|vendor|DIR] Specify where to install the
|
||||||
if test x$withval = xyes; then
|
Perl libraries for irssi, default is site],
|
||||||
|
if test "x$withval" = xyes; then
|
||||||
want_perl=yes
|
want_perl=yes
|
||||||
else
|
elif test "x$withval" = xno; then
|
||||||
if test "x$withval" = xno; then
|
want_perl=no
|
||||||
want_perl=no
|
elif test "x$withval" = xsite; then
|
||||||
|
want_perl=yes
|
||||||
|
elif test "x$withval" = xvendor; then
|
||||||
|
want_perl=yes
|
||||||
|
if test -z "`$perlpath -v|grep '5\.0'`"; then
|
||||||
|
PERL_MM_PARAMS="INSTALLDIRS=vendor"
|
||||||
else
|
else
|
||||||
want_perl=yes
|
PERL_MM_PARAMS="INSTALLDIRS=perl PREFIX=`perl -e 'use Config; print $Config{prefix}'`"
|
||||||
PERL_LIB_DIR="$withval"
|
|
||||||
perl_lib_dir_given=yes
|
|
||||||
fi
|
fi
|
||||||
|
perl_library_dir="(vendor default - `$perlpath -e 'use Config; print $Config{archlib}'`)"
|
||||||
|
else
|
||||||
|
want_perl=yes
|
||||||
|
PERL_MM_PARAMS="INSTALLDIRS=perl LIB=$withval"
|
||||||
|
PERL_USE_LIB="$withval"
|
||||||
fi,
|
fi,
|
||||||
want_perl=yes)
|
want_perl=yes)
|
||||||
|
|
||||||
@ -235,8 +249,6 @@ dnl **
|
|||||||
dnl ** fe-text checks
|
dnl ** fe-text checks
|
||||||
dnl **
|
dnl **
|
||||||
|
|
||||||
AC_PATH_PROG(sedpath, sed)
|
|
||||||
|
|
||||||
AC_DEFUN(AC_CHECK_GLIBDIR,[
|
AC_DEFUN(AC_CHECK_GLIBDIR,[
|
||||||
AC_MSG_CHECKING([whether GLib is unpacked to irssi dir])
|
AC_MSG_CHECKING([whether GLib is unpacked to irssi dir])
|
||||||
|
|
||||||
@ -435,7 +447,6 @@ dnl ** perl checks
|
|||||||
dnl **
|
dnl **
|
||||||
|
|
||||||
if test "$want_perl" != "no"; then
|
if test "$want_perl" != "no"; then
|
||||||
AC_PATH_PROG(perlpath, perl)
|
|
||||||
AC_MSG_CHECKING(for working Perl support)
|
AC_MSG_CHECKING(for working Perl support)
|
||||||
|
|
||||||
if test -z "$perlpath"; then
|
if test -z "$perlpath"; then
|
||||||
@ -574,7 +585,9 @@ if test "$want_perl" != "no"; then
|
|||||||
|
|
||||||
AC_SUBST(PERL_LDFLAGS)
|
AC_SUBST(PERL_LDFLAGS)
|
||||||
AC_SUBST(PERL_CFLAGS)
|
AC_SUBST(PERL_CFLAGS)
|
||||||
AC_SUBST(PERL_LIB_DIR)
|
|
||||||
|
AC_SUBST(PERL_USE_LIB)
|
||||||
|
AC_SUBST(PERL_MM_PARAMS)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -767,17 +780,15 @@ if test "x$want_perl" != "xno" -a "x$perl_mod_error" != "x"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$want_perl" = "xyes"; then
|
if test "x$want_perl" = "xyes"; then
|
||||||
if test -z "$PERL_LIB_DIR"; then
|
if test -z "$perl_library_dir"; then
|
||||||
echo "Perl library directory ..... : (default - usually /usr/local/lib/perl_site)"
|
perl_library_dir="(site default - `$perlpath -e 'use Config; print $Config{sitearch}'`)"
|
||||||
else
|
fi
|
||||||
echo "Perl library directory ..... : $PERL_LIB_DIR"
|
echo "Perl library directory ..... : $perl_library_dir"
|
||||||
if test "x$perl_lib_dir_given" != "xyes"; then
|
if test "x$perl_prefix_note" = "xyes"; then
|
||||||
echo " - NOTE: This was automatically set to the same directory you gave with"
|
echo " - NOTE: This was automatically set to the same directory you gave with"
|
||||||
echo " --prefix. If you want the perl libraries to install to their 'correct'"
|
echo " --prefix. If you want the perl libraries to install to their 'correct'"
|
||||||
echo " path, you'll need to give --enable-perl-path= (nothing after '=') option"
|
echo " path, you'll need to give --with-perl-lib=site option to configure."
|
||||||
echo " to configure. Anyway, installing perl to this directory should work"
|
echo " Anyway, installing perl to this directory should work just as well."
|
||||||
echo " just as well.."
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo "Install prefix ............. : $prefix"
|
echo "Install prefix ............. : $prefix"
|
||||||
|
@ -148,7 +148,12 @@
|
|||||||
|
|
||||||
--with-perl=static Build Perl support statically to irssi binary
|
--with-perl=static Build Perl support statically to irssi binary
|
||||||
(default is to build a module)
|
(default is to build a module)
|
||||||
--with-perl-path=dir Specify installation dir for Perl libraries
|
--with-perl-lib=[site|vendor|DIR] Specify installation dir for
|
||||||
|
Perl libraries. Site is the default (usually
|
||||||
|
/usr/local/lib/perl/...), vendor uses the path
|
||||||
|
where the base of the perl is installed
|
||||||
|
(/usr/lib/perl/...), or DIR specifies exactly
|
||||||
|
where you want to install it.
|
||||||
--without-perl Disable Perl support
|
--without-perl Disable Perl support
|
||||||
|
|
||||||
--with-socks Build with socks library
|
--with-socks Build with socks library
|
||||||
|
@ -15,7 +15,7 @@ perl-core.c: perl-signals-list.h irssi-core.pl.h
|
|||||||
|
|
||||||
INCLUDES = $(GLIB_CFLAGS) \
|
INCLUDES = $(GLIB_CFLAGS) \
|
||||||
-DSCRIPTDIR=\""$(libdir)/irssi/scripts"\" \
|
-DSCRIPTDIR=\""$(libdir)/irssi/scripts"\" \
|
||||||
-DPERL_LIB_DIR=\""$(PERL_LIB_DIR)"\" \
|
-DPERL_USE_LIB=\""$(PERL_USE_LIB)"\" \
|
||||||
$(PERL_CFLAGS) \
|
$(PERL_CFLAGS) \
|
||||||
-I$(top_srcdir)/src \
|
-I$(top_srcdir)/src \
|
||||||
-I$(top_srcdir)/src/core \
|
-I$(top_srcdir)/src/core \
|
||||||
@ -121,11 +121,7 @@ all-local:
|
|||||||
for dir in common irc ui; do \
|
for dir in common irc ui; do \
|
||||||
cd $$dir && \
|
cd $$dir && \
|
||||||
if [ ! -f Makefile ]; then \
|
if [ ! -f Makefile ]; then \
|
||||||
if [ "x$(PERL_LIB_DIR)" = "x" ]; then \
|
$(perlpath) Makefile.PL $(PERL_MM_PARAMS); \
|
||||||
$(perlpath) Makefile.PL; \
|
|
||||||
else \
|
|
||||||
$(perlpath) Makefile.PL PREFIX=$(PERL_LIB_DIR) INSTALLDIRS=perl; \
|
|
||||||
fi; \
|
|
||||||
fi && \
|
fi && \
|
||||||
($(MAKE) || $(MAKE)) && \
|
($(MAKE) || $(MAKE)) && \
|
||||||
cd ..; \
|
cd ..; \
|
||||||
|
@ -175,8 +175,8 @@ char *perl_get_use_list(void)
|
|||||||
|
|
||||||
str = g_string_new(NULL);
|
str = g_string_new(NULL);
|
||||||
|
|
||||||
if (*PERL_LIB_DIR != '\0')
|
if (*PERL_USE_LIB != '\0')
|
||||||
g_string_append(str, "use lib \""PERL_LIB_DIR"\";");
|
g_string_append(str, "use lib \""PERL_USE_LIB"\";");
|
||||||
|
|
||||||
g_string_append(str, "use Irssi;");
|
g_string_append(str, "use Irssi;");
|
||||||
if (irssi_gui != IRSSI_GUI_NONE)
|
if (irssi_gui != IRSSI_GUI_NONE)
|
||||||
|
Loading…
Reference in New Issue
Block a user