diff --git a/install.sh b/install.sh
index a65e9e9..86e905e 100755
--- a/install.sh
+++ b/install.sh
@@ -26,6 +26,15 @@ CANONICAL_SOURCE=$(readlink -f "$BASH_SOURCE" 2>/dev/null) || {
 }
 cd ${CANONICAL_SOURCE%/*}
 
+touch .test_cp_a
+cp -a .test_cp_a .test_cp_a2 > /dev/null 2>&1
+if [ $? = 0 ]; then
+	CP_OPT="-a"
+else
+	CP_OPT=""
+fi
+rm .test_cp_a .test_cp_a2
+
 ################################################################################
 #
 # Environment variables
@@ -328,7 +337,7 @@ EOF
                 run $cmd || exit 1
                 test -e a.exe && mv a.exe a.out
             done
-        cp -a * $TARGET/bin/compile_to_c.d/
+        cp $CP_OPT * $TARGET/bin/compile_to_c.d/
     fi
     cd $TARGET/bin/compile_to_c.d
     mv a.out compile_to_c || exit 1
@@ -342,11 +351,11 @@ EOF
         done
     progress 30 1 $MAXTOOLCOUNT "T1: save"
     mkdir T1
-    cp -a compile_to_c* T1/
+    cp $CP_OPT compile_to_c* T1/
     progress 30 1 $MAXTOOLCOUNT "T1: check"
     if grep "^$CC" compile_to_c.make >/dev/null 2>&1; then
         rm compile_to_c.make
-        cp -a compile_to_c.new compile_to_c
+        cp $CP_OPT compile_to_c.new compile_to_c
         progress 30 2 $MAXTOOLCOUNT "T2: compile_to_c"
         run ./compile_to_c -verbose -boost -no_gc compile_to_c -o compile_to_c.new || exit 1
         grep -v '^#' compile_to_c.make |
@@ -356,16 +365,16 @@ EOF
             done
         progress 30 2 $MAXTOOLCOUNT "T2: save"
         mkdir T2
-        cp -a compile_to_c* T2/
+        cp $CP_OPT compile_to_c* T2/
         progress 30 2 $MAXTOOLCOUNT "T2: check"
         if grep "$CC" compile_to_c.make >/dev/null 2>&1; then
             rm compile_to_c.make
-            cp -a compile_to_c.new compile_to_c
+            cp $CP_OPT compile_to_c.new compile_to_c
             progress 30 3 $MAXTOOLCOUNT "T3: compile_to_c"
             run ./compile_to_c -verbose -boost -no_gc compile_to_c -o compile_to_c.new || exit 1
             progress 30 3 $MAXTOOLCOUNT "T3: save"
             mkdir T3
-            cp -a compile_to_c* T3/
+            cp $CP_OPT compile_to_c* T3/
             progress 30 3 $MAXTOOLCOUNT "T3: check"
             if grep "^$CC" compile_to_c.make >/dev/null 2>&1; then
                 echo
@@ -574,8 +583,8 @@ do_pkg_tools() {
         fi
     done
 
-    cp -a $LIBERTY_HOME/resources/short/* $SHORT
-    cp -a $LIBERTY_HOME/sys/* $SYS
+    cp $CP_OPT $LIBERTY_HOME/resources/short/* $SHORT
+    cp $CP_OPT $LIBERTY_HOME/sys/* $SYS
 
     chown -R root:root $SHORT $SYS
 
@@ -696,7 +705,7 @@ _do_pkg_src() {
             touch $SRC/loadpath.se.old
         fi
 
-        cp -l $s/* $SRC/ || cp -a $s/* $SRC/
+        cp -l $s/* $SRC/ || cp $CP_OPT $s/* $SRC/
 
         if [ -r $SRC/loadpath.se ]; then
             mv $SRC/loadpath.se $SRC/loadpath.se.new
@@ -745,8 +754,8 @@ do_pkg_tutorial() {
 do_pkg_tools_doc() {
     DOC=$USRDIR/share/doc/liberty-eiffel
     install -d -m 0755 -o root -g root $DOC/tools
-    cp -a $TARGET/doc/api/smarteiffel/* $DOC/tools/smarteiffel/
-    cp -a $TARGET/doc/api/liberty/* $DOC/tools/liberty/
+    cp $CP_OPT $TARGET/doc/api/smarteiffel/* $DOC/tools/smarteiffel/
+    cp $CP_OPT $TARGET/doc/api/liberty/* $DOC/tools/liberty/
     find $DOC -type f -exec chmod a-x {} +
     chown -R root:root $DOC
 }
@@ -754,7 +763,7 @@ do_pkg_tools_doc() {
 do_pkg_core_doc() {
     DOC=$USRDIR/share/doc/liberty-eiffel
     install -d -m 0755 -o root -g root $DOC
-    cp -a $TARGET/doc/api/libraries/* $DOC/core/
+    cp $CP_OPT $TARGET/doc/api/libraries/* $DOC/core/
     find $DOC -type f -exec chmod a-x {} +
     chown -R root:root $DOC
 }
@@ -762,7 +771,7 @@ do_pkg_core_doc() {
 do_pkg_extra_doc() {
     DOC=$USRDIR/share/doc/liberty-eiffel
     install -d -m 0755 -o root -g root $DOC
-    cp -a $TARGET/doc/api/wrappers/* $DOC/extra/
+    cp $CP_OPT $TARGET/doc/api/wrappers/* $DOC/extra/
     find $DOC -type f -exec chmod a-x {} +
     chown -R root:root $DOC
 }
@@ -770,7 +779,7 @@ do_pkg_extra_doc() {
 do_pkg_staging_doc() {
     DOC=$USRDIR/share/doc/liberty-eiffel
     install -d -m 0755 -o root -g root $DOC
-    cp -a $TARGET/doc/api/staging/* $DOC/staging/
+    cp $CP_OPT $TARGET/doc/api/staging/* $DOC/staging/
     find $DOC -type f -exec chmod a-x {} +
     chown -R root:root $DOC
 }
