diff -rupN tesseract-4.0.0/src/ccutil/Makefile.am tesseract-4.0.0-new/src/ccutil/Makefile.am
--- tesseract-4.0.0/src/ccutil/Makefile.am	2018-10-29 09:53:12.000000000 +0100
+++ tesseract-4.0.0-new/src/ccutil/Makefile.am	2018-11-13 15:23:08.331318335 +0100
@@ -3,7 +3,7 @@ AM_CXXFLAGS =
 AM_CPPFLAGS =
 
 if !NO_TESSDATA_PREFIX
-AM_CXXFLAGS += -DTESSDATA_PREFIX=@datadir@
+AM_CXXFLAGS += -DTESSDATA_PREFIX=@datadir@/tesseract/
 endif
 
 if VISIBILITY
diff -rupN tesseract-4.0.0/src/lstm/Makefile.am tesseract-4.0.0-new/src/lstm/Makefile.am
--- tesseract-4.0.0/src/lstm/Makefile.am	2018-10-29 09:53:12.000000000 +0100
+++ tesseract-4.0.0-new/src/lstm/Makefile.am	2018-11-13 15:23:08.332317564 +0100
@@ -12,7 +12,7 @@ SUBDIRS =
 AM_CXXFLAGS = $(OPENMP_CXXFLAGS)
 
 if !NO_TESSDATA_PREFIX
-AM_CXXFLAGS += -DTESSDATA_PREFIX=@datadir@
+AM_CXXFLAGS += -DTESSDATA_PREFIX=@datadir@/tesseract/
 endif
 
 if VISIBILITY
diff -rupN tesseract-4.0.0/tessdata/configs/Makefile.am tesseract-4.0.0-new/tessdata/configs/Makefile.am
--- tesseract-4.0.0/tessdata/configs/Makefile.am	2018-10-29 09:53:12.000000000 +0100
+++ tesseract-4.0.0-new/tessdata/configs/Makefile.am	2018-11-13 15:23:08.332317564 +0100
@@ -1,3 +1,3 @@
-datadir = @datadir@/tessdata/configs
+datadir = @datadir@/tesseract/tessdata/configs
 data_DATA = inter makebox box.train unlv ambigs.train lstm.train lstmdebug api_config kannada box.train.stderr quiet logfile digits hocr tsv linebox pdf rebox strokewidth bigram txt
 EXTRA_DIST = inter makebox box.train unlv ambigs.train lstm.train lstmdebug api_config kannada box.train.stderr quiet logfile digits hocr tsv linebox pdf rebox strokewidth bigram txt
diff -rupN tesseract-4.0.0/tessdata/Makefile.am tesseract-4.0.0-new/tessdata/Makefile.am
--- tesseract-4.0.0/tessdata/Makefile.am	2018-10-29 09:53:12.000000000 +0100
+++ tesseract-4.0.0-new/tessdata/Makefile.am	2018-11-13 15:23:08.332317564 +0100
@@ -1,4 +1,4 @@
-datadir = @datadir@/tessdata
+datadir = @datadir@/tesseract/tessdata
 
 data_DATA = pdf.ttf
 EXTRA_DIST = $(data_DATA)
diff -rupN tesseract-4.0.0/tessdata/tessconfigs/Makefile.am tesseract-4.0.0-new/tessdata/tessconfigs/Makefile.am
--- tesseract-4.0.0/tessdata/tessconfigs/Makefile.am	2018-10-29 09:53:12.000000000 +0100
+++ tesseract-4.0.0-new/tessdata/tessconfigs/Makefile.am	2018-11-13 15:23:08.332317564 +0100
@@ -1,3 +1,3 @@
-datadir = @datadir@/tessdata/tessconfigs
+datadir = @datadir@/tesseract/tessdata/tessconfigs
 data_DATA = batch batch.nochop nobatch matdemo segdemo msdemo
 EXTRA_DIST = batch batch.nochop nobatch matdemo segdemo msdemo
