summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure26
1 files changed, 7 insertions, 19 deletions
diff --git a/configure b/configure
index dd4344d..02ec303 100755
--- a/configure
+++ b/configure
@@ -52,7 +52,6 @@ f_libclangstatic=NO
# list will be in case as specified (f_langs) and in uppercase (f_ulangs) as used in the internal perl script
#
f_langs=`ls -1 src/translator_??.h | sed -e 's%src/translator_%%g' | sed -e 's/\.h//' | tr '\012' ',' | sed -e 's/,$//'`
-f_ulangs=`echo $f_langs | tr '[a-z]' '[A-Z]'`
while test -n "$1"; do
case $1 in
@@ -800,12 +799,6 @@ TMAKE_MOC = $QTDIR/bin/moc
EOF
fi
-if test "$f_english" = YES; then
- cat >> .tmakeconfig <<EOF
-TMAKE_CXXFLAGS += -DENGLISH_ONLY
-EOF
-fi
-
if test "$f_search" = YES; then
cat >> .tmakeconfig <<EOF
LIBS += -L$XAPIAN/lib
@@ -900,23 +893,18 @@ EOF
done
# - generating src/lang_cfg.h
+# use consistent method on Linux and Windows
if test -f "src/lang_cfg.h"; then
chmod u+w src/lang_cfg.h # make sure file can be overwritten
fi
echo " Generating src/lang_cfg.h..."
-echo $f_langs | $f_perl -e '@l=split(/,/,<STDIN>);
- chomp @l;
- @allowed=(split(/,/,"'$f_ulangs'"));
- foreach my $elem (@l){
- $elem =~ tr/a-z/A-Z/;
- $r=0;
- foreach my $tst (@allowed){
- if ($tst eq $elem) { $r=1; last; }
- }
- if ($r!=1) { die "ERROR: Invalid language $elem was selected!\n"; }
- print "#define LANG_$elem\n";
- };' > ./src/lang_cfg.h
+if test "$f_english" = YES; then
+ $f_python src/lang_cfg.py ENONLY > src/lang_cfg.h
+else
+ f_ulangs=`echo $f_langs | tr '[a-z,]' '[A-Z ]'`
+ $f_python src/lang_cfg.py $f_ulangs > src/lang_cfg.h
+fi
if test -f "src/config.h"; then
chmod u+w src/config.h