Skip to content

Commit b15164f

Browse files
committed
liblouis: add -I$(LOCAL_PATH)/liblouis to CFLAGS to fix <config.h> include
Background: Upstream liblouis recently switched to `#include <config.h>` instead of `#include "config.h"`. This works fine with autotools builds because `-I.` is always added to the compiler flags. However, in the Android NDK build system `.` is not in the include path by default, which causes build failures. Fix: Explicitly add -I$(LOCAL_PATH)/liblouis to LOCAL_CFLAGS so that <config.h> is found during compilation. This keeps upstream sources untouched and solves the issue cleanly in the build system layer. Related upstream PR (proposed fix for using `"config.h"`): liblouis/liblouis#1855 Signed-off-by: Patryk Miś <[email protected]>
1 parent cfef35c commit b15164f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

braille/translate/src/phone/jni/Android.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ include $(CLEAR_VARS)
3939
LOCAL_PATH := $(LIBLOUIS_PATH)
4040
LOCAL_LDLIBS := -llog -landroid
4141
LOCAL_CFLAGS += -DTABLESDIR='"__non_existent_path__"'
42+
LOCAL_CFLAGS += -I$(LOCAL_PATH)/liblouis
4243
LOCAL_MODULE := louis
4344
LOCAL_SRC_FILES := \
4445
liblouis/compileTranslationTable.c \

0 commit comments

Comments
 (0)