rolled back to 2.9.2 because 2.9.4 doesn't work with XML validator
[platform/upstream/libxml2.git] / os400 / initscript.sh
index cc52e45..fb80507 100644 (file)
@@ -165,38 +165,15 @@ action_needed()
 }
 
 
-#       make_module [option] module_name source_name
+#       make_module module_name source_name [additional_definitions]
 #
 #       Compile source name into ASCII module if needed.
 #       As side effect, append the module name to variable MODULES.
 #       Set LINK to "YES" if the module has been compiled.
-#       Options are:
-#         --define <additional definitions>
-#         --ebcdic
-#         --sysiconv
 
 make_module()
 
 {
-        DEFN=
-        EBCDIC=
-        SYSICONV=
-        while true
-        do      case "${1}" in
-                --define)
-                        DEFN="${2}"
-                        shift
-                        ;;
-                --ebcdic)
-                        EBCDIC=yes
-                        ;;
-                --sysiconv)
-                        SYSICONV=yes
-                        ;;
-                *)      break
-                esac
-                shift
-        done
         MODULES="${MODULES} ${1}"
         MODIFSNAME="${LIBIFSNAME}/${1}.MODULE"
         action_needed "${MODIFSNAME}" "${2}" || return 0;
@@ -208,7 +185,7 @@ make_module()
         #               the source file and we compile that temporary file.
 
         rm -f __tmpsrcf.c
-        if [ -z "${EBCDIC}" ]
+        if [ "${4}" != 'ebcdic' ]
         then    echo "#line 1 \"${2}\"" >> __tmpsrcf.c
                 echo "#pragma convert(819)" >> __tmpsrcf.c
                 echo '#include "wrappers.h"' >> __tmpsrcf.c
@@ -220,10 +197,8 @@ make_module()
         CMD="${CMD} OPTION(*INCDIRFIRST)"
         CMD="${CMD} SYSIFCOPT(*IFS64IO) LANGLVL(*EXTENDED) LOCALETYPE(*LOCALE)"
         CMD="${CMD} INCDIR("
-        if [  -z "${SYSICONV}" ]
-        then    CMD="${CMD} '${TOPDIR}/os400/iconv'"
-        fi
-        if [ -z "${EBCDIC}" ]
+        CMD="${CMD} '${TOPDIR}/os400/iconv'"
+        if [ "${4}" != 'ebcdic' ]
         then    CMD="${CMD} '/qibm/proddata/qadrt/include'"
         fi
         CMD="${CMD} '${TOPDIR}/os400' '${TOPDIR}/os400/dlfcn'"
@@ -236,7 +211,7 @@ make_module()
         CMD="${CMD} OUTPUT(${OUTPUT})"
         CMD="${CMD} OPTIMIZE(${OPTIMIZE})"
         CMD="${CMD} DBGVIEW(${DEBUG})"
-        CMD="${CMD} DEFINE('_REENTRANT' 'TRIO_HAVE_CONFIG_H' 'NDEBUG' ${DEFN})"
+        CMD="${CMD} DEFINE('_REENTRANT' 'TRIO_HAVE_CONFIG_H' 'NDEBUG' ${3})"
 
         system "${CMD}"
         rm -f __tmpsrcf.c