]> git.eshelyaron.com Git - emacs.git/commitdiff
* configure.in (CRT_DIR): Fix netbsd/openbsd handling.
authorGlenn Morris <rgm@gnu.org>
Sat, 24 Sep 2011 19:06:20 +0000 (12:06 -0700)
committerGlenn Morris <rgm@gnu.org>
Sat, 24 Sep 2011 19:06:20 +0000 (12:06 -0700)
Ref: http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00562.html

ChangeLog
configure.in

index 7c7bff452aef5831acc918d5dce33d93db87dd74..4162152ccd03f556dbb1fbdb54174fc139a2fcee 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-09-24  Glenn Morris  <rgm@gnu.org>
+
+       * configure.in (CRT_DIR): Fix netbsd/openbsd handling.
+
 2011-09-19  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * .dir-locals.el: Change the debbugs regexp to allow having the
index 63b80e40466c931bcffce485b3b37e2425c52fc8..3d92093bedd19466df3ef75de9c2fbd7205ff7a4 100644 (file)
@@ -985,6 +985,7 @@ LIB_MATH=-lm
 LIB_STANDARD=
 START_FILES=
 
+dnl NB do not use CRT_DIR unquoted here, since it might not be set yet.
 case $opsys in
   cygwin )
     LIB_MATH=
@@ -1007,14 +1008,10 @@ case $opsys in
     LIB_STANDARD=-lc
     START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
     ;;
+  dnl NB this may be adjusted below.
   netbsd | openbsd )
-    if test -f $CRT_DIR/crti.o; then
-       LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
-        START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
-    else
-       LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
-       START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
-    fi
+    LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
+    START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
     ;;
 esac
 
@@ -1094,6 +1091,19 @@ fi                              # crt_files != ""
 
 AC_SUBST(CRT_DIR)
 
+case $opsys in
+  netbsd | openbsd )
+    if test -f $CRT_DIR/crti.o; then
+
+        test -f $CRT_DIR/crtn.o || \
+          AC_MSG_ERROR([Required file not found: crtn.o])
+
+        LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
+        START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
+    fi
+    ;;
+esac
+
 
 dnl This function definition taken from Gnome 2.0
 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)