Move C_SWITCH_MACHINE, C_SWITCH_SYSTEM from cpp to autoconf.
[bpt/emacs.git] / src / s / aix4-2.h
index c3b2394..f6ed948 100644 (file)
@@ -1,6 +1,6 @@
 /*
-Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-  Free Software Foundation, Inc.
+Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+  2010  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -87,14 +87,23 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #define LINKER cc
 #endif
 
-/* Prevent -lg from being used for debugging.  Not needed.  */
-
-#define LIBS_DEBUG
-
 /* No need to specify -lc when linking.  */
 
 #define LIB_STANDARD
 
+/* -lpthreads seems to be necessary for Xlib in X11R6, and should be harmless
+   on older versions of X where it happens to exist.  */
+#ifdef HAVE_LIBPTHREADS
+#define LIBS_SYSTEM -lrts -lIM -liconv -lpthreads
+#else
+/* IBM's X11R5 use -lIM and -liconv in AIX 3.2.2.  */
+#define LIBS_SYSTEM -lrts -lIM -liconv
+#endif
+
+#define LD_SWITCH_SYSTEM_TEMACS -Wl,-bnodelcsect
+
+
+
 /* Use terminfo instead of termcap.  */
 
 #define TERMINFO
@@ -109,28 +118,11 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 /* AIX doesn't define this.  */
 #define unix 1
 
-#ifndef __GNUC__
-/* Some programs in src produce warnings saying certain subprograms
-   are to comples and need a MAXMEM value greater than 2000 for
-   additional optimization.  --nils@exp-math.uni-essen.de */
-#define C_SWITCH_SYSTEM -ma -qmaxmem=4000
-#endif
-
 /* string.h defines rindex as a macro, at least with native cc, so we
    lose declaring char * rindex without this.
    It is just a guess which versions of AIX need this definition.  */
 #undef HAVE_STRING_H
 
-/* For AIX, it turns out compiling emacs under AIX 3.2.4 REQUIRES "cc -g"
-   because "cc -O" crashes. Under AIX 3.2.5, "cc -O" is required because
-   "cc -g" crashes. Go figure.  --floppy@merlin.mit.edu */
-/* The above isn't generally true.  If it occurs with some compiler
-   release, seek a fixed version, be it XLC or GCC.  The XLC version
-   isn't tied to the OS version on AIX any more than elsewhere.  XLC
-   (the IBM compiler) can use -g with -O.  (-O3 is also a possibility
-   for the optimization level.)  -- fx, after David Edelsohn.  */
-#define C_DEBUG_SWITCH -g -O
-
 /* Perry Smith <pedz@ddivt1.austin.ibm.com> says these are correct.  */
 #define SIGNALS_VIA_CHARACTERS
 #define MAIL_USE_LOCKF
@@ -140,12 +132,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #define POSIX_SIGNALS
 #undef sigmask
 
-/* olson@mcs.anl.gov says -li18n is needed by -lXm.  */
-#define LIB_MOTIF -lXm -li18n
-
 #ifndef HAVE_LIBXMU
-#define LIBXMU
-
 /* Unfortunately without libXmu we cannot support EditRes.  */
 #define NO_EDITRES
 #endif
@@ -153,7 +140,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 /* On AIX Emacs uses the gmalloc.c malloc implementation.  But given
    the way this system works, libc functions that return malloced
    memory use the libc malloc implementation. Calling xfree or
-   xrealloc on the results of such functions results in a crash. 
+   xrealloc on the results of such functions results in a crash.
 
    One solution for this could be to define SYSTEM_MALLOC here, but
    that does not currently work on this system.
@@ -161,12 +148,16 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    It is possible to completely override the malloc implementation on
    AIX, but that involves putting the malloc functions in a shared
    library and setting the MALLOCTYPE environment variable to point to
-   tha shared library.
-   
+   that shared library.
+
    Emacs currently calls xrealloc on the results of get_current_dir name,
    to avoid a crash just use the Emacs implementation for that function.
 */
 #define BROKEN_GET_CURRENT_DIR_NAME 1
 
+#define UNEXEC unexaix.o
+
+#define ORDINARY_LINK
+
 /* arch-tag: 38fe75ea-6aef-42bd-8449-bc34d921a562
    (do not change this comment) */