View | Details | Raw Unified | Return to bug 10180
Collapse All | Expand All

(-)./configure.ac.orig (-1 / +18 lines)
Lines 63-69 Link Here
63
        BUILD_HAL=""
63
        BUILD_HAL=""
64
fi
64
fi
65
AM_CONDITIONAL(PMOUNT_HAL, test -n "$BUILD_HAL")
65
AM_CONDITIONAL(PMOUNT_HAL, test -n "$BUILD_HAL")
66
													   
66
67
AC_ARG_WITH(natspec,
68
    AC_HELP_STRING([--with-natspec], [enable automatic iocharset mount option determination (default: no)]),
69
    [],
70
    [with_natspec=no]
71
)
72
73
if test "$with_natspec" != "no"; then
74
    AC_CHECK_HEADER(natspec.h,
75
	[AC_CHECK_LIB(natspec, natspec_get_filename_encoding,
76
		[LIBS="$LIBS -lnatspec"],
77
		[AC_MSG_ERROR([Missing natspec library (install libnatspec-devel or similar?)])])],
78
	[AC_MSG_ERROR([Missing /usr/include/natspec.h (install libnatspec-devel or similar?)])])
79
	AC_DEFINE(BUILD_NATSPEC, 1, [defined if natspec should be used])
80
fi
81
82
83
67
GETTEXT_PACKAGE="pmount"
84
GETTEXT_PACKAGE="pmount"
68
AC_SUBST(GETTEXT_PACKAGE)
85
AC_SUBST(GETTEXT_PACKAGE)
69
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
86
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
(-)./src/pmount.c.orig (-2 / +17 lines)
Lines 30-35 Link Here
30
#include "luks.h"
30
#include "luks.h"
31
#include "config.h"
31
#include "config.h"
32
32
33
#ifdef BUILD_NATSPEC
34
#include "natspec.h"
35
#endif
36
37
38
33
/* Using our private realpath function */
39
/* Using our private realpath function */
34
#include "realpath.h"
40
#include "realpath.h"
35
41
Lines 727-740 Link Here
727
            /* if no charset was set explicitly, autodetect UTF-8 */
733
            /* if no charset was set explicitly, autodetect UTF-8 */
728
            if( !iocharset ) {
734
            if( !iocharset ) {
729
                const char* codeset;
735
                const char* codeset;
730
                codeset = nl_langinfo( CODESET );
731
736
732
                debug( "no iocharset given, current locale encoding is %s\n", codeset );
737
#ifdef BUILD_NATSPEC
738
		codeset = natspec_get_filename_encoding("");
739
		debug( "no iocharset given, current locale encoding is %s\n", codeset );
740
		debug("no iocharset given, using libnatspec: %s\n",codeset);
741
		iocharset = strdup(codeset);
733
742
743
#else
744
                codeset = nl_langinfo( CODESET );
745
		debug( "no iocharset given, current locale encoding is %s\n", codeset );
734
                if( codeset && !strcmp( codeset, "UTF-8" ) ) {
746
                if( codeset && !strcmp( codeset, "UTF-8" ) ) {
735
                    debug( "locale encoding uses UTF-8, setting iocharset to 'utf8'\n" );
747
                    debug( "locale encoding uses UTF-8, setting iocharset to 'utf8'\n" );
736
                    iocharset = "utf8";
748
                    iocharset = "utf8";
737
                }
749
                }
750
#endif
751
752
738
            }
753
            }
739
754
740
            /* clean stale locks */
755
            /* clean stale locks */

Return to bug 10180