summaryrefslogtreecommitdiffstats
path: root/include/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'include/Makefile')
-rw-r--r--include/Makefile18
1 files changed, 14 insertions, 4 deletions
diff --git a/include/Makefile b/include/Makefile
index ae5ed7c..ba41814 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -72,10 +72,6 @@ _dev_ieee488= dev/ieee488
INCS+= hesiod.h
.endif
-.if ${MK_ICONV} != "no"
-INCS+= iconv.h
-.endif
-
.if ${MK_BLUETOOTH} != "no"
LSUBSUBDIRS+= netgraph/bluetooth/include
.endif
@@ -85,6 +81,20 @@ LSUBSUBDIRS+= netgraph/bluetooth/include
_netipx= netipx
#.endif
+# Handle the #define aliases for libiconv
+.if ${MK_ICONV} == "yes"
+CLEANFILES+= _libiconv_compat.h
+INCS+= _libiconv_compat.h iconv.h
+_libiconv_compat.h: ${.CURDIR}/Makefile
+ echo "/* Indicate whether libiconv symbols are present */" > _libiconv_compat.h
+.if ${MK_LIBICONV_COMPAT} == "yes"
+ echo "#define __LIBICONV_COMPAT" >> _libiconv_compat.h
+.else
+ echo "#undef __LIBICONV_COMPAT" >> _libiconv_compat.h
+.endif
+.endif
+
+
# Define SHARED to indicate whether you want symbolic links to the system
# source (``symlinks''), or a separate copy (``copies''). ``symlinks'' is
# probably only useful for developers and should be avoided if you do not
OpenPOWER on IntegriCloud