* sim/ucsim/cmd.src/newcmdposix.cc, sim/ucsim/cmd.src/newcmdposixcl.h,
[fw/sdcc] / configure
index c3ac60410b2b0d20436b5e5d1b0ee68d8ed8f7df..08cbd2511204a45890f47a503b1d8c7f9c6abcb8 100755 (executable)
--- a/configure
+++ b/configure
@@ -310,7 +310,7 @@ ac_includes_default="\
 #endif"
 
 ac_subdirs_all="$ac_subdirs_all support/cpp2"
-ac_subdirs_all="$ac_subdirs_all packihx"
+ac_subdirs_all="$ac_subdirs_all support/packihx"
 ac_subdirs_all="$ac_subdirs_all sim/ucsim"
 ac_subdirs_all="$ac_subdirs_all device/lib/pic"
 ac_subdirs_all="$ac_subdirs_all device/lib/pic16"
@@ -6281,30 +6281,99 @@ _ACEOF
 
 
 
+echo "$as_me:$LINENO: checking whether char is unsigned" >&5
+echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
+if test "${ac_cv_c_char_unsigned+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((char) -1) < 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_char_unsigned=no
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_char_unsigned=yes
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
+echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
+if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define __CHAR_UNSIGNED__ 1
+_ACEOF
+
+fi
+
+ac_cv_c_char_unsigned=yes
+
 type_name()
 {
-    if expr "$ac_cv_sizeof_char" '>=' "$1" >/dev/null; then
-       echo "char"
-       exit
-    fi
-    if expr "$ac_cv_sizeof_short" '>=' "$1" >/dev/null; then
-       echo "short"
-       exit
-    fi
-    if expr "$ac_cv_sizeof_int" '>=' "$1" >/dev/null; then
-       echo "int"
-       exit
-    fi
-    if expr "$ac_cv_sizeof_long" '>=' "$1" >/dev/null; then
-       echo "long"
-       exit
-    fi
+  if expr "$ac_cv_sizeof_char" '>=' "$1" >/dev/null; then
+      echo "char"
+    exit
+  fi
+  if expr "$ac_cv_sizeof_short" '>=' "$1" >/dev/null; then
+    echo "short"
+    exit
+  fi
+  if expr "$ac_cv_sizeof_int" '>=' "$1" >/dev/null; then
+    echo "int"
+    exit
+  fi
+  if expr "$ac_cv_sizeof_long" '>=' "$1" >/dev/null; then
     echo "long"
+    exit
+  fi
+  echo "long"
 }
 
 echo "$as_me:$LINENO: checking type name for byte" >&5
 echo $ECHO_N "checking type name for byte... $ECHO_C" >&6
-TYPE_BYTE=`type_name 1`
+TYPE_CHAR=`type_name 1`
+if test "$ac_cv_c_char_unsigned" = "yes"; then
+  TYPE_BYTE="signed $TYPE_CHAR"
+else
+  TYPE_BYTE=$TYPE_CHAR
+fi
 echo "$as_me:$LINENO: result: $TYPE_BYTE" >&5
 echo "${ECHO_T}$TYPE_BYTE" >&6
 echo "$as_me:$LINENO: checking type name for word" >&5
@@ -6317,6 +6386,7 @@ echo $ECHO_N "checking type name for dword... $ECHO_C" >&6
 TYPE_DWORD=`type_name 4`
 echo "$as_me:$LINENO: result: $TYPE_DWORD" >&5
 echo "${ECHO_T}$TYPE_DWORD" >&6
+
 cat >>confdefs.h <<_ACEOF
 #define TYPE_BYTE $TYPE_BYTE
 _ACEOF
@@ -6330,6 +6400,19 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
+cat >>confdefs.h <<_ACEOF
+#define TYPE_UBYTE unsigned $TYPE_CHAR
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define TYPE_UWORD unsigned $TYPE_WORD
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define TYPE_UDWORD unsigned $TYPE_DWORD
+_ACEOF
+
+
 echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
 if test "${ac_cv_c_bigendian+set}" = set; then
@@ -7862,7 +7945,7 @@ subdirs="$subdirs support/cpp2"
 
 test $OPT_DISABLE_PACKIHX = 0 &&
 
-subdirs="$subdirs packihx"
+subdirs="$subdirs support/packihx"
 
 test $OPT_DISABLE_UCSIM   = 0 &&
 
@@ -8016,9 +8099,10 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
   # 1. Remove the extension, and $U if already installed.
   ac_i=`echo "$ac_i" |
         sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
-  # 2. Add them.
-  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
-  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
 done
 LIBOBJS=$ac_libobjs