Ticket #2419: configure script doesn't set samba configdir.
lib/vfs/mc-vfs/samba/configure can't set the value of SAMBA_CFLAGS in lib/vfs/mc-vfs/Makefile.am. The solution: to avoid configuration code duplication, use environment variables SMBCONFIGDIR and SMBCODEPAGEDIR to set up values of configdir and codepagedir variables in lib/vfs/mc-vfs/samba/Makefile because samba configure is child process of main configure. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Этот коммит содержится в:
родитель
00b1aa4a8e
Коммит
72ee546a59
@ -1,5 +1,5 @@
|
|||||||
if ENABLE_VFS_SMB
|
if ENABLE_VFS_SMB
|
||||||
SAMBA_CFLAGS = -DCONFIGDIR=\""@configdir@"\"
|
SAMBA_CFLAGS = -DCONFIGDIR=\""@smbconfigdir@"\"
|
||||||
SAMBA_SUBDIRS = samba
|
SAMBA_SUBDIRS = samba
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -524,42 +524,23 @@ AC_ARG_WITH(ssl,
|
|||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
####################################################
|
||||||
#################################################
|
# get variables from parent process (main configure)
|
||||||
# set configuration directory location
|
# set configuration directory location
|
||||||
configdir="\$(LIBDIR)"
|
if test -n "$SMBCONFIGDIR"; then
|
||||||
AC_ARG_WITH(smb-configdir,
|
configdir="$SMBCONFIGDIR"
|
||||||
[ --with-smb-configdir=DIR Where to put configuration files (\$libdir)],
|
else
|
||||||
[ case "$withval" in
|
configdir="\$(LIBDIR)"
|
||||||
yes|no)
|
fi
|
||||||
#
|
|
||||||
# Just in case anybody does it
|
|
||||||
#
|
|
||||||
AC_MSG_WARN([--with-smb-configdir called without argument - will use default])
|
|
||||||
;;
|
|
||||||
* )
|
|
||||||
configdir="$withval"
|
|
||||||
;;
|
|
||||||
esac]
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
#################################################
|
|
||||||
# set codepage directory location
|
# set codepage directory location
|
||||||
codepagedir="\$(LIBDIR)/codepages"
|
if test -n "$SMBCODEPAGEDIR"; then
|
||||||
AC_ARG_WITH(smb-codepagedir,
|
codepagedir="$SMBCODEPAGEDIR"
|
||||||
[ --with-smb-codepagedir=DIR Where to put codepage files (\$libdir/codepages)],
|
elif test -n "$SMBCONFIGDIR"; then
|
||||||
[ case "$withval" in
|
codepagedir="$SMBCONFIGDIR/codepages"
|
||||||
yes|no)
|
else
|
||||||
#
|
codepagedir="\$(LIBDIR)/codepages"
|
||||||
# Just in case anybody does it
|
fi
|
||||||
#
|
####################################################
|
||||||
AC_MSG_WARN([--with-smb-codepagedir called without argument - will use default])
|
|
||||||
;;
|
|
||||||
* )
|
|
||||||
codepagedir="$withval"
|
|
||||||
;;
|
|
||||||
esac])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([configure summary])
|
AC_MSG_CHECKING([configure summary])
|
||||||
AC_TRY_RUN([
|
AC_TRY_RUN([
|
||||||
|
@ -20,7 +20,42 @@ AC_DEFUN([AC_MC_VFS_SMB],
|
|||||||
|
|
||||||
if test "$enable_vfs_smb" = "yes"; then
|
if test "$enable_vfs_smb" = "yes"; then
|
||||||
AC_CONFIG_SUBDIRS([lib/vfs/mc-vfs/samba])
|
AC_CONFIG_SUBDIRS([lib/vfs/mc-vfs/samba])
|
||||||
fi
|
|
||||||
|
|
||||||
AM_CONDITIONAL([ENABLE_VFS_SMB], [test "$enable_vfs" = "yes" -a x"$enable_vfs_smb" = x"yes"])
|
AM_CONDITIONAL([ENABLE_VFS_SMB], [test "1" = "1"])
|
||||||
|
|
||||||
|
# set configuration directory location
|
||||||
|
smbconfigdir="/etc"
|
||||||
|
AC_ARG_WITH(smb-configdir,
|
||||||
|
[ --with-smb-configdir=DIR Where to put configuration files],
|
||||||
|
[ case "$withval" in
|
||||||
|
yes|no)
|
||||||
|
# Just in case anybody does it
|
||||||
|
AC_MSG_WARN([--with-smb-configdir called without argument - will use default])
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
smbconfigdir="$withval"
|
||||||
|
;;
|
||||||
|
esac])
|
||||||
|
|
||||||
|
AC_SUBST(smbconfigdir)
|
||||||
|
|
||||||
|
# set codepage directory location
|
||||||
|
AC_ARG_WITH(smb-codepagedir,
|
||||||
|
[ --with-smb-codepagedir=DIR Where to put codepage files],
|
||||||
|
[ case "$withval" in
|
||||||
|
yes|no)
|
||||||
|
# Just in case anybody does it
|
||||||
|
AC_MSG_WARN([--with-smb-codepagedir called without argument - will use default])
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
smbcodepagedir="$withval"
|
||||||
|
;;
|
||||||
|
esac])
|
||||||
|
|
||||||
|
# export variable for child process (configure of samba)
|
||||||
|
export SMBCONFIGDIR="$smbconfigdir"
|
||||||
|
export SMBCODEPAGEDIR="$smbcodepagedir"
|
||||||
|
else
|
||||||
|
AM_CONDITIONAL([ENABLE_VFS_SMB], [test "1" = "2"])
|
||||||
|
fi
|
||||||
])
|
])
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user