Now on revision 109131. ------------------------------------------------------------ revno: 109131 committer: Dmitry Antipov branch nick: trunk timestamp: Wed 2012-07-18 09:44:36 +0400 message: Return more descriptive data from Fgarbage_collect. Suggested by Stefan Monnier in http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html. * src/alloc.c (bounded_number): New function. (total_buffers, total_vectors): New variable. (total_string_size): Rename to total_string_bytes, adjust users. (total_vector_size): Rename to total_vector_bytes, adjust users. (sweep_vectors): Account total_vectors and total_vector_bytes. (Fgarbage_collect): New return value. Adjust documentation. (gc_sweep): Account total_buffers. (Fmemory_free, Fmemory_use_counts): Use bounded_number. (VECTOR_SIZE): Remove. * src/data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global. (Qinterval, Qmisc): New symbols. (syms_of_data): Initialize them. * src/lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat) (Qcons, Qbuffer): New declarations. * lisp/emacs-lisp/chart.el (chart-emacs-storage): Change to reflect new format of data returned by Fgarbage_collect. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-17 20:27:49 +0000 +++ lisp/ChangeLog 2012-07-18 05:44:36 +0000 @@ -1,3 +1,9 @@ +2012-07-18 Dmitry Antipov + + Reflect recent changes in Fgarbage_collect. + * emacs-lisp/chart.el (chart-emacs-storage): Change to + reflect new format of data returned by Fgarbage_collect. + 2012-07-17 Fabián Ezequiel Gallina New utility functions + python-info-ppss-context fix (Bug#11910). === modified file 'lisp/emacs-lisp/chart.el' --- lisp/emacs-lisp/chart.el 2012-05-13 03:05:06 +0000 +++ lisp/emacs-lisp/chart.el 2012-07-18 05:44:36 +0000 @@ -676,23 +676,25 @@ "Chart the current storage requirements of Emacs." (interactive) (let* ((data (garbage-collect)) - (names '("strings/2" "vectors" - "conses" "free cons" - "syms" "free syms" - "markers" "free mark" - ;; "floats" "free flt" - )) - (nums (list (/ (nth 3 data) 2) - (nth 4 data) - (car (car data)) ; conses - (cdr (car data)) - (car (nth 1 data)) ; syms - (cdr (nth 1 data)) - (car (nth 2 data)) ; markers - (cdr (nth 2 data)) - ;(car (nth 5 data)) ; floats are Emacs only - ;(cdr (nth 5 data)) - ))) + (cons-info (nth 0 data)) + (symbol-info (nth 1 data)) + (misc-info (nth 2 data)) + (string-info (nth 3 data)) + (vector-info (nth 4 data)) + (float-info (nth 5 data)) + (interval-info (nth 6 data)) + (buffer-info (nth 7 data)) + (names '("conses" "symbols" "miscs" "strings" + "vectors" "floats" "intervals" "buffers")) + (nums (list (* (nth 1 cons-info) (nth 2 cons-info)) + (* (nth 1 symbol-info) (nth 2 symbol-info)) + (* (nth 1 misc-info) (nth 2 misc-info)) + (+ (* (nth 1 string-info) (nth 2 string-info)) + (nth 3 string-info)) + (nth 3 vector-info) + (* (nth 1 float-info) (nth 2 float-info)) + (* (nth 1 interval-info) (nth 2 interval-info)) + (* (nth 1 buffer-info) (nth 2 buffer-info))))) ;; Let's create the chart! (chart-bar-quickie 'vertical "Emacs Runtime Storage Usage" names "Storage Items" === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-17 16:24:57 +0000 +++ src/ChangeLog 2012-07-18 05:44:36 +0000 @@ -1,3 +1,23 @@ +2012-07-18 Dmitry Antipov + + Return more descriptive data from Fgarbage_collect. + Suggested by Stefan Monnier in + http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html. + * alloc.c (bounded_number): New function. + (total_buffers, total_vectors): New variable. + (total_string_size): Rename to total_string_bytes, adjust users. + (total_vector_size): Rename to total_vector_bytes, adjust users. + (sweep_vectors): Account total_vectors and total_vector_bytes. + (Fgarbage_collect): New return value. Adjust documentation. + (gc_sweep): Account total_buffers. + (Fmemory_free, Fmemory_use_counts): Use bounded_number. + (VECTOR_SIZE): Remove. + * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global. + (Qinterval, Qmisc): New symbols. + (syms_of_data): Initialize them. + * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat) + (Qcons, Qbuffer): New declarations. + 2012-07-17 Paul Eggert * alloc.c (Fmemory_free): Account for memory-free's own storage. === modified file 'src/alloc.c' --- src/alloc.c 2012-07-17 16:24:57 +0000 +++ src/alloc.c 2012-07-18 05:44:36 +0000 @@ -189,9 +189,9 @@ /* Number of live and free conses etc. */ -static EMACS_INT total_conses, total_markers, total_symbols, total_vector_size; +static EMACS_INT total_conses, total_markers, total_symbols, total_buffers; static EMACS_INT total_free_conses, total_free_markers, total_free_symbols; -static EMACS_INT total_free_floats, total_floats, total_free_vector_bytes; +static EMACS_INT total_free_floats, total_floats; /* Points to memory space allocated as "spare", to be freed if we run out of memory. We keep one large block, four cons-blocks, and @@ -1708,7 +1708,7 @@ /* Number of bytes used by live strings. */ -static EMACS_INT total_string_size; +static EMACS_INT total_string_bytes; /* Given a pointer to a Lisp_String S which is on the free-list string_free_list, return a pointer to its successor in the @@ -2081,7 +2081,7 @@ string_free_list = NULL; total_strings = total_free_strings = 0; - total_string_size = 0; + total_string_bytes = 0; /* Scan strings_blocks, free Lisp_Strings that aren't marked. */ for (b = string_blocks; b; b = next) @@ -2107,7 +2107,7 @@ UNMARK_BALANCE_INTERVALS (s->intervals); ++total_strings; - total_string_size += STRING_BYTES (s); + total_string_bytes += STRING_BYTES (s); } else { @@ -2957,6 +2957,14 @@ Lisp_Object zero_vector; +/* Number of live vectors. */ + +static EMACS_INT total_vectors; + +/* Number of bytes used by live and free vectors. */ + +static EMACS_INT total_vector_bytes, total_free_vector_bytes; + /* Get a new vector block. */ static struct vector_block * @@ -3047,12 +3055,6 @@ return vector; } -/* Return how many Lisp_Objects can be stored in V. */ - -#define VECTOR_SIZE(v) ((v)->header.size & PSEUDOVECTOR_FLAG ? \ - (PSEUDOVECTOR_SIZE_MASK & (v)->header.size) : \ - (v)->header.size) - /* Nonzero if VECTOR pointer is valid pointer inside BLOCK. */ #define VECTOR_IN_BLOCK(vector, block) \ @@ -3077,7 +3079,7 @@ struct vector_block *block = vector_blocks, **bprev = &vector_blocks; struct Lisp_Vector *vector, *next, **vprev = &large_vectors; - total_free_vector_bytes = total_vector_size = 0; + total_vectors = total_vector_bytes = total_free_vector_bytes = 0; memset (vector_free_lists, 0, sizeof (vector_free_lists)); /* Looking through vector blocks. */ @@ -3092,7 +3094,8 @@ if (VECTOR_MARKED_P (vector)) { VECTOR_UNMARK (vector); - total_vector_size += VECTOR_SIZE (vector); + total_vectors++; + total_vector_bytes += vector->header.next.nbytes; next = ADVANCE (vector, vector->header.next.nbytes); } else @@ -3148,7 +3151,12 @@ if (VECTOR_MARKED_P (vector)) { VECTOR_UNMARK (vector); - total_vector_size += VECTOR_SIZE (vector); + total_vectors++; + /* All pseudovectors are small enough to be allocated from + vector blocks. This code should be redesigned if some + pseudovector type grows beyond VBLOCK_BYTES_MAX. */ + eassert (!(vector->header.size & PSEUDOVECTOR_FLAG)); + total_vector_bytes += header_size + vector->header.size * word_size; vprev = &vector->header.next.vector; } else @@ -5339,16 +5347,28 @@ return count; } +/* Used to avoid possible overflows when + converting from C to Lisp integers. */ + +static inline Lisp_Object +bounded_number (EMACS_INT number) +{ + return make_number (min (MOST_POSITIVE_FIXNUM, number)); +} DEFUN ("garbage-collect", Fgarbage_collect, Sgarbage_collect, 0, 0, "", doc: /* Reclaim storage for Lisp objects no longer needed. Garbage collection happens automatically if you cons more than `gc-cons-threshold' bytes of Lisp data since previous garbage collection. `garbage-collect' normally returns a list with info on amount of space in use: - ((USED-CONSES . FREE-CONSES) (USED-SYMS . FREE-SYMS) - (USED-MISCS . FREE-MISCS) USED-STRING-CHARS USED-VECTOR-SLOTS - (USED-FLOATS . FREE-FLOATS) (USED-INTERVALS . FREE-INTERVALS) - (USED-STRINGS . FREE-STRINGS)) + ((CONS INTERNAL-SIZE USED-CONSES FREE-CONSES) + (SYMBOL INTERNAL-SIZE USED-SYMBOLS FREE-SYMBOLS) + (MISC INTERNAL-SIZE USED-MISCS FREE-MISCS) + (STRING INTERNAL-SIZE USED-STRINGS USED-STRING-BYTES FREE-STRING) + (VECTOR INTERNAL-SIZE USED-VECTORS USED-VECTOR-BYTES FREE-VECTOR-BYTES) + (FLOAT INTERNAL-SIZE USED-FLOATS FREE-FLOATS) + (INTERVAL INTERNAL-SIZE USED-INTERVALS FREE-INTERVALS) + (BUFFER INTERNAL-SIZE USED-BUFFERS)) However, if there was overflow in pure space, `garbage-collect' returns nil, because real GC can't be done. See Info node `(elisp)Garbage Collection'. */) @@ -5595,8 +5615,8 @@ tot += total_conses * sizeof (struct Lisp_Cons); tot += total_symbols * sizeof (struct Lisp_Symbol); tot += total_markers * sizeof (union Lisp_Misc); - tot += total_string_size; - tot += total_vector_size * sizeof (Lisp_Object); + tot += total_string_bytes; + tot += total_vector_bytes; tot += total_floats * sizeof (struct Lisp_Float); tot += total_intervals * sizeof (struct interval); tot += total_strings * sizeof (struct Lisp_String); @@ -5621,20 +5641,38 @@ unbind_to (count, Qnil); - total[0] = Fcons (make_number (total_conses), - make_number (total_free_conses)); - total[1] = Fcons (make_number (total_symbols), - make_number (total_free_symbols)); - total[2] = Fcons (make_number (total_markers), - make_number (total_free_markers)); - total[3] = make_number (total_string_size); - total[4] = make_number (total_vector_size); - total[5] = Fcons (make_number (total_floats), - make_number (total_free_floats)); - total[6] = Fcons (make_number (total_intervals), - make_number (total_free_intervals)); - total[7] = Fcons (make_number (total_strings), - make_number (total_free_strings)); + total[0] = list4 (Qcons, make_number (sizeof (struct Lisp_Cons)), + bounded_number (total_conses), + bounded_number (total_free_conses)); + + total[1] = list4 (Qsymbol, make_number (sizeof (struct Lisp_Symbol)), + bounded_number (total_symbols), + bounded_number (total_free_symbols)); + + total[2] = list4 (Qmisc, make_number (sizeof (union Lisp_Misc)), + bounded_number (total_markers), + bounded_number (total_free_markers)); + + total[3] = list5 (Qstring, make_number (sizeof (struct Lisp_String)), + bounded_number (total_strings), + bounded_number (total_string_bytes), + bounded_number (total_free_strings)); + + total[4] = list5 (Qvector, make_number (sizeof (struct Lisp_Vector)), + bounded_number (total_vectors), + bounded_number (total_vector_bytes), + bounded_number (total_free_vector_bytes)); + + total[5] = list4 (Qfloat, make_number (sizeof (struct Lisp_Float)), + bounded_number (total_floats), + bounded_number (total_free_floats)); + + total[6] = list4 (Qinterval, make_number (sizeof (struct interval)), + bounded_number (total_intervals), + bounded_number (total_free_intervals)); + + total[7] = list3 (Qbuffer, make_number (sizeof (struct buffer)), + bounded_number (total_buffers)); #if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES { @@ -6535,6 +6573,7 @@ { register struct buffer *buffer = all_buffers, *prev = 0, *next; + total_buffers = 0; while (buffer) if (!VECTOR_MARKED_P (buffer)) { @@ -6550,6 +6589,7 @@ { VECTOR_UNMARK (buffer); UNMARK_BALANCE_INTERVALS (BUF_INTERVALS (buffer)); + total_buffers++; prev = buffer, buffer = buffer->header.next.buffer; } } @@ -6592,22 +6632,17 @@ Lisp_Object val = Fmake_list (make_number (2), make_number (0)); XSETCAR (val, - (make_number - (min (MOST_POSITIVE_FIXNUM, - ((total_free_conses * sizeof (struct Lisp_Cons) - + total_free_markers * sizeof (union Lisp_Misc) - + total_free_symbols * sizeof (struct Lisp_Symbol) - + total_free_floats * sizeof (struct Lisp_Float) - + total_free_intervals * sizeof (struct interval) - + total_free_strings * sizeof (struct Lisp_String) - + total_free_vector_bytes - + 1023) - >> 10))))); - + bounded_number + ((total_free_conses * sizeof (struct Lisp_Cons) + + total_free_markers * sizeof (union Lisp_Misc) + + total_free_symbols * sizeof (struct Lisp_Symbol) + + total_free_floats * sizeof (struct Lisp_Float) + + total_free_intervals * sizeof (struct interval) + + total_free_strings * sizeof (struct Lisp_String) + + total_free_vector_bytes + + 1023) >> 10)); #ifdef DOUG_LEA_MALLOC - XSETCAR (XCDR (val), - make_number (min (MOST_POSITIVE_FIXNUM, - (mallinfo ().fordblks + 1023) >> 10))); + XSETCAR (XCDR (val), bounded_number ((mallinfo ().fordblks + 1023) >> 10)); #endif return val; } @@ -6629,14 +6664,14 @@ { Lisp_Object consed[8]; - consed[0] = make_number (min (MOST_POSITIVE_FIXNUM, cons_cells_consed)); - consed[1] = make_number (min (MOST_POSITIVE_FIXNUM, floats_consed)); - consed[2] = make_number (min (MOST_POSITIVE_FIXNUM, vector_cells_consed)); - consed[3] = make_number (min (MOST_POSITIVE_FIXNUM, symbols_consed)); - consed[4] = make_number (min (MOST_POSITIVE_FIXNUM, string_chars_consed)); - consed[5] = make_number (min (MOST_POSITIVE_FIXNUM, misc_objects_consed)); - consed[6] = make_number (min (MOST_POSITIVE_FIXNUM, intervals_consed)); - consed[7] = make_number (min (MOST_POSITIVE_FIXNUM, strings_consed)); + consed[0] = bounded_number (cons_cells_consed); + consed[1] = bounded_number (floats_consed); + consed[2] = bounded_number (vector_cells_consed); + consed[3] = bounded_number (symbols_consed); + consed[4] = bounded_number (string_chars_consed); + consed[5] = bounded_number (misc_objects_consed); + consed[6] = bounded_number (intervals_consed); + consed[7] = bounded_number (strings_consed); return Flist (8, consed); } === modified file 'src/data.c' --- src/data.c 2012-07-10 08:43:46 +0000 +++ src/data.c 2012-07-18 05:44:36 +0000 @@ -83,12 +83,12 @@ Lisp_Object Qfloatp; Lisp_Object Qnumberp, Qnumber_or_marker_p; -Lisp_Object Qinteger; -static Lisp_Object Qsymbol, Qstring, Qcons, Qmarker, Qoverlay; +Lisp_Object Qinteger, Qinterval, Qfloat, Qvector; +Lisp_Object Qsymbol, Qstring, Qcons, Qmisc; Lisp_Object Qwindow; -static Lisp_Object Qfloat, Qwindow_configuration; -static Lisp_Object Qprocess; -static Lisp_Object Qcompiled_function, Qframe, Qvector; +static Lisp_Object Qoverlay, Qwindow_configuration; +static Lisp_Object Qprocess, Qmarker; +static Lisp_Object Qcompiled_function, Qframe; Lisp_Object Qbuffer; static Lisp_Object Qchar_table, Qbool_vector, Qhash_table; static Lisp_Object Qsubrp, Qmany, Qunevalled; @@ -3083,7 +3083,6 @@ DEFSYM (Qwindow_configuration, "window-configuration"); DEFSYM (Qprocess, "process"); DEFSYM (Qwindow, "window"); - /* DEFSYM (Qsubr, "subr"); */ DEFSYM (Qcompiled_function, "compiled-function"); DEFSYM (Qbuffer, "buffer"); DEFSYM (Qframe, "frame"); @@ -3091,6 +3090,9 @@ DEFSYM (Qchar_table, "char-table"); DEFSYM (Qbool_vector, "bool-vector"); DEFSYM (Qhash_table, "hash-table"); + /* Used by Fgarbage_collect. */ + DEFSYM (Qinterval, "interval"); + DEFSYM (Qmisc, "misc"); DEFSYM (Qdefun, "defun"); === modified file 'src/lisp.h' --- src/lisp.h 2012-07-16 04:47:31 +0000 +++ src/lisp.h 2012-07-18 05:44:36 +0000 @@ -2332,7 +2332,8 @@ extern Lisp_Object Qfloatp; extern Lisp_Object Qnumberp, Qnumber_or_marker_p; -extern Lisp_Object Qinteger; +extern Lisp_Object Qinteger, Qinterval, Qsymbol, Qstring; +extern Lisp_Object Qmisc, Qvector, Qfloat, Qcons, Qbuffer; extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; ------------------------------------------------------------ revno: 109130 fixes bug(s): http://debbugs.gnu.org/11910 committer: Fabián Ezequiel Gallina branch nick: trunk timestamp: Tue 2012-07-17 17:27:49 -0300 message: New utility functions + python-info-ppss-context fix. * progmodes/python.el (python-info-beginning-of-block-statement-p) (python-info-ppss-comment-or-string-p): New functions. (python-info-ppss-context): Small fix for string check. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-17 18:40:15 +0000 +++ lisp/ChangeLog 2012-07-17 20:27:49 +0000 @@ -1,3 +1,10 @@ +2012-07-17 Fabián Ezequiel Gallina + + New utility functions + python-info-ppss-context fix (Bug#11910). + * progmodes/python.el (python-info-beginning-of-block-statement-p) + (python-info-ppss-comment-or-string-p): New functions. + (python-info-ppss-context): Small fix for string check. + 2012-07-17 Juri Linkov * dired-aux.el (dired-do-async-shell-command): Doc fix. === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2012-07-17 18:02:53 +0000 +++ lisp/progmodes/python.el 2012-07-17 20:27:49 +0000 @@ -2584,6 +2584,12 @@ (when names (mapconcat (lambda (string) string) names ".")))) +(defsubst python-info-beginning-of-block-statement-p () + "Return non-nil if current statement opens a block." + (save-excursion + (python-nav-beginning-of-statement) + (looking-at (python-rx block-start)))) + (defun python-info-closing-block () "Return the point of the block the current line closes." (let ((closing-word (save-excursion @@ -2736,7 +2742,8 @@ (and (nth 4 ppss) (nth 8 ppss))) ('string - (nth 8 ppss)) + (and (not (nth 4 ppss)) + (nth 8 ppss))) ('paren (nth 1 ppss)) (t nil)))) @@ -2755,6 +2762,10 @@ 'paren) (t nil)))) +(defsubst python-info-ppss-comment-or-string-p () + "Return non-nil if point is inside 'comment or 'string." + (car (member (python-info-ppss-context-type) '(string comment)))) + (defun python-info-looking-at-beginning-of-defun (&optional syntax-ppss) "Check if point is at `beginning-of-defun' using SYNTAX-PPSS." (and (not (python-info-ppss-context-type (or syntax-ppss (syntax-ppss)))) ------------------------------------------------------------ revno: 109129 fixes bug(s): http://debbugs.gnu.org/10598 committer: Juri Linkov branch nick: trunk timestamp: Tue 2012-07-17 21:40:15 +0300 message: * lisp/dired-aux.el (dired-do-async-shell-command): Doc fix. (dired-do-async-shell-command): Don't add `*' at the end of the command (Bug#11815). (dired-do-shell-command): Doc fix. (dired-shell-stuff-it): Strip the trailing "&" and ";" if any. Join the individual commands using either "&" or ";" as the separator depending on the values of these trailing characters. At the end re-add the trailing "&". (Bug#10598) * lisp/simple.el (async-shell-command): Sync the interactive spec with `shell-command'. Doc fix. (shell-command): Doc fix. diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-07-17 07:43:01 +0000 +++ etc/NEWS 2012-07-17 18:40:15 +0000 @@ -274,13 +274,13 @@ the face `diff-changed', or `diff-removed' and `diff-added' to highlight changes in context diffs. +** Ediff now uses the same color scheme as Diff mode +on high color displays. + ** Flymake uses fringe bitmaps to indicate errors and warnings. See flymake-fringe-indicator-position, flymake-error-bitmap and flymake-warning-bitmap. -** Ediff now uses the same color scheme as Diff mode -on high color displays. - ** `sh-script' *** Pairing of parens/quotes uses electric-pair-mode instead of skeleton-pair. *** `sh-electric-here-document-mode' now controls auto-insertion of here-docs. @@ -348,6 +348,12 @@ ** erc will look up server/channel names via auth-source and use the channel keys found, if any. +** Dired + +*** `dired-do-async-shell-command' executes each file sequentially +if the command ends in `;' (when operating on multiple files). +Othwerwise, it executes the command on each file in parallel. + ** FFAP *** The option `ffap-url-unwrap-remote' can now be a list of strings, === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-17 18:15:02 +0000 +++ lisp/ChangeLog 2012-07-17 18:40:15 +0000 @@ -1,5 +1,20 @@ 2012-07-17 Juri Linkov + * dired-aux.el (dired-do-async-shell-command): Doc fix. + (dired-do-async-shell-command): Don't add `*' at the end of the + command (Bug#11815). + (dired-do-shell-command): Doc fix. + (dired-shell-stuff-it): Strip the trailing "&" and ";" if any. + Join the individual commands using either "&" or ";" as the + separator depending on the values of these trailing characters. + At the end re-add the trailing "&". (Bug#10598) + + * simple.el (async-shell-command): Sync the interactive spec with + `shell-command'. Doc fix. + (shell-command): Doc fix. + +2012-07-17 Juri Linkov + * descr-text.el (describe-char): Fix format args. (Bug#10129) 2012-07-17 Fabián Ezequiel Gallina === modified file 'lisp/dired-aux.el' --- lisp/dired-aux.el 2012-06-22 07:30:33 +0000 +++ lisp/dired-aux.el 2012-07-17 18:40:15 +0000 @@ -545,8 +545,17 @@ (defun dired-do-async-shell-command (command &optional arg file-list) "Run a shell command COMMAND on the marked files asynchronously. -Like `dired-do-shell-command' but if COMMAND doesn't end in ampersand, -adds `* &' surrounded by whitespace and executes the command asynchronously. +Like `dired-do-shell-command', but adds `&' at the end of COMMAND +to execute it asynchronously. + +When operating on multiple files, asynchronous commands +are executed in the background on each file in parallel. +In shell syntax this means separating the individual commands +with `&'. However, when COMMAND ends in `;' or `;&' then commands +are executed in the background on each file sequentially waiting +for each command to terminate before running the next command. +In shell syntax this means separating the individual commands with `;'. + The output appears in the buffer `*Async Shell Command*'." (interactive (let ((files (dired-get-marked-files t current-prefix-arg))) @@ -555,18 +564,14 @@ (dired-read-shell-command "& on %s: " current-prefix-arg files) current-prefix-arg files))) - (unless (string-match "[*?][ \t]*\\'" command) - (setq command (concat command " *"))) (unless (string-match "&[ \t]*\\'" command) (setq command (concat command " &"))) (dired-do-shell-command command arg file-list)) -;; The in-background argument is only needed in Emacs 18 where -;; shell-command doesn't understand an appended ampersand `&'. ;;;###autoload (defun dired-do-shell-command (command &optional arg file-list) "Run a shell command COMMAND on the marked files. -If no files are marked or a specific numeric prefix arg is given, +If no files are marked or a numeric prefix arg is given, the next ARG files are used. Just \\[universal-argument] means the current file. The prompt mentions the file(s) or the marker, as appropriate. @@ -588,7 +593,17 @@ it, write `*\"\"' in place of just `*'. This is equivalent to just `*' in the shell, but avoids Dired's special handling. -If COMMAND produces output, it goes to a separate buffer. +If COMMAND ends in `&', `;', or `;&', it is executed in the +background asynchronously, and the output appears in the buffer +`*Async Shell Command*'. When operating on multiple files and COMMAND +ends in `&', the shell command is executed on each file in parallel. +However, when COMMAND ends in `;' or `;&' then commands are executed +in the background on each file sequentially waiting for each command +to terminate before running the next command. You can also use +`dired-do-async-shell-command' that automatically adds `&'. + +Otherwise, COMMAND is executed synchronously, and the output +appears in the buffer `*Shell Command Output*'. This feature does not try to redisplay Dired buffers afterward, as there's no telling what files COMMAND may have changed. @@ -607,10 +622,7 @@ (let ((files (dired-get-marked-files t current-prefix-arg))) (list ;; Want to give feedback whether this file or marked files are used: - (dired-read-shell-command (concat "! on " - "%s: ") - current-prefix-arg - files) + (dired-read-shell-command "! on %s: " current-prefix-arg files) current-prefix-arg files))) (let* ((on-each (not (string-match dired-star-subst-regexp command))) @@ -654,23 +666,34 @@ ;; Might be redefined for smarter things and could then use RAW-ARG ;; (coming from interactive P and currently ignored) to decide what to do. ;; Smart would be a way to access basename or extension of file names. - (let ((stuff-it - (if (or (string-match dired-star-subst-regexp command) - (string-match dired-quark-subst-regexp command)) - (lambda (x) - (let ((retval command)) - (while (string-match - "\\(^\\|[ \t]\\)\\([*?]\\)\\([ \t]\\|$\\)" retval) - (setq retval (replace-match x t t retval 2))) - retval)) - (lambda (x) (concat command dired-mark-separator x))))) - (if on-each - (mapconcat stuff-it (mapcar 'shell-quote-argument file-list) ";") - (let ((files (mapconcat 'shell-quote-argument - file-list dired-mark-separator))) - (if (> (length file-list) 1) - (setq files (concat dired-mark-prefix files dired-mark-postfix))) - (funcall stuff-it files))))) + (let* ((in-background (string-match "[ \t]*&[ \t]*\\'" command)) + (command (if in-background + (substring command 0 (match-beginning 0)) + command)) + (sequentially (string-match "[ \t]*;[ \t]*\\'" command)) + (command (if sequentially + (substring command 0 (match-beginning 0)) + command)) + (stuff-it + (if (or (string-match dired-star-subst-regexp command) + (string-match dired-quark-subst-regexp command)) + (lambda (x) + (let ((retval command)) + (while (string-match + "\\(^\\|[ \t]\\)\\([*?]\\)\\([ \t]\\|$\\)" retval) + (setq retval (replace-match x t t retval 2))) + retval)) + (lambda (x) (concat command dired-mark-separator x))))) + (concat + (if on-each + (mapconcat stuff-it (mapcar 'shell-quote-argument file-list) + (if (and in-background (not sequentially)) "&" ";")) + (let ((files (mapconcat 'shell-quote-argument + file-list dired-mark-separator))) + (if (> (length file-list) 1) + (setq files (concat dired-mark-prefix files dired-mark-postfix))) + (funcall stuff-it files))) + (if in-background "&" "")))) ;; This is an extra function so that it can be redefined by ange-ftp. ;;;###autoload === modified file 'lisp/simple.el' --- lisp/simple.el 2012-07-10 11:51:54 +0000 +++ lisp/simple.el 2012-07-17 18:40:15 +0000 @@ -2247,9 +2247,11 @@ (defun async-shell-command (command &optional output-buffer error-buffer) "Execute string COMMAND asynchronously in background. -Like `shell-command' but if COMMAND doesn't end in ampersand, adds `&' -surrounded by whitespace and executes the command asynchronously. +Like `shell-command', but adds `&' at the end of COMMAND +to execute it asynchronously. + The output appears in the buffer `*Async Shell Command*'. +That buffer is in shell mode. In Elisp, you will often be better served by calling `start-process' directly, since it offers more control and does not impose the use of a @@ -2257,8 +2259,12 @@ (interactive (list (read-shell-command "Async shell command: " nil nil - (and buffer-file-name - (file-relative-name buffer-file-name))) + (let ((filename + (cond + (buffer-file-name) + ((eq major-mode 'dired-mode) + (dired-get-filename nil t))))) + (and filename (file-relative-name filename)))) current-prefix-arg shell-command-default-error-buffer)) (unless (string-match "&[ \t]*\\'" command) @@ -2269,9 +2275,10 @@ "Execute string COMMAND in inferior shell; display output, if any. With prefix argument, insert the COMMAND's output at point. -If COMMAND ends in ampersand, execute it asynchronously. +If COMMAND ends in `&', execute it asynchronously. The output appears in the buffer `*Async Shell Command*'. -That buffer is in shell mode. +That buffer is in shell mode. You can also use +`async-shell-command' that automatically adds `&'. Otherwise, COMMAND is executed synchronously. The output appears in the buffer `*Shell Command Output*'. If the output is short enough to ------------------------------------------------------------ revno: 109128 fixes bug(s): http://debbugs.gnu.org/10129 committer: Juri Linkov branch nick: trunk timestamp: Tue 2012-07-17 21:15:02 +0300 message: * lisp/descr-text.el (describe-char): Fix format args. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-17 18:02:53 +0000 +++ lisp/ChangeLog 2012-07-17 18:15:02 +0000 @@ -1,3 +1,7 @@ +2012-07-17 Juri Linkov + + * descr-text.el (describe-char): Fix format args. (Bug#10129) + 2012-07-17 Fabián Ezequiel Gallina Final renames and doc fixes for movement commands (bug#11899). * progmodes/python.el (python-nav-beginning-of-statement): Rename @@ -4197,7 +4201,7 @@ 2012-04-16 Chong Yidong - * image.el (imagemagick--extension-regexp): New variable. + * image.el (imagemagick--file-regexp): New variable. (imagemagick-register-types): Use it. (imagemagick-types-inhibit): Add :set function. Allow new value of t to inhibit all types. === modified file 'lisp/descr-text.el' --- lisp/descr-text.el 2012-06-08 08:44:45 +0000 +++ lisp/descr-text.el 2012-07-17 18:15:02 +0000 @@ -533,7 +533,7 @@ (col (current-column))) (if (or (/= beg 1) (/= end (1+ total))) (format "%d of %d (%d%%), restriction: <%d-%d>, column: %d%s" - pos total percent col beg end hscroll) + pos total percent beg end col hscroll) (if (= pos end) (format "%d of %d (EOB), column: %d%s" pos total col hscroll) (format "%d of %d (%d%%), column: %d%s" ------------------------------------------------------------ revno: 109127 fixes bug(s): http://debbugs.gnu.org/11899 committer: Fabián Ezequiel Gallina branch nick: trunk timestamp: Tue 2012-07-17 15:02:53 -0300 message: Final renames and doc fixes for movement commands. * progmodes/python.el (python-nav-beginning-of-statement): Rename from python-nav-statement-start. (python-nav-end-of-statement): Rename from python-nav-statement-end. (python-nav-beginning-of-block): Rename from python-nav-block-start. (python-nav-end-of-block): Rename from python-nav-block-end. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-17 16:47:58 +0000 +++ lisp/ChangeLog 2012-07-17 18:02:53 +0000 @@ -1,4 +1,14 @@ 2012-07-17 Fabián Ezequiel Gallina + Final renames and doc fixes for movement commands (bug#11899). + * progmodes/python.el (python-nav-beginning-of-statement): Rename + from python-nav-statement-start. + (python-nav-end-of-statement): Rename from + python-nav-statement-end. + (python-nav-beginning-of-block): Rename from + python-nav-block-start. + (python-nav-end-of-block): Rename from python-nav-block-end. + +2012-07-17 Fabián Ezequiel Gallina * progmodes/python.el (python-shell-send-string-no-output): Allow accept-process-output to quit, keeping shell process ready for === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2012-07-17 16:47:58 +0000 +++ lisp/progmodes/python.el 2012-07-17 18:02:53 +0000 @@ -50,9 +50,12 @@ ;; `python-nav-forward-block', `python-nav-backward-block' ;; respectively which navigate between beginning of blocks of code. ;; Extra functions `python-nav-forward-statement', -;; `python-nav-backward-statement', `python-nav-statement-start', -;; `python-nav-statement-end', `python-nav-block-start' and -;; `python-nav-block-end' are included but no bound to any key. +;; `python-nav-backward-statement', +;; `python-nav-beginning-of-statement', `python-nav-end-of-statement', +;; `python-nav-beginning-of-block' and `python-nav-end-of-block' are +;; included but no bound to any key. At last but not least the +;; specialized `python-nav-forward-sexp-function' allows easy +;; navigation between code blocks. ;; Shell interaction: is provided and allows you to execute easily any ;; block of code of your current buffer in an inferior Python process. @@ -664,7 +667,7 @@ ((setq start (save-excursion (back-to-indentation) (python-util-forward-comment -1) - (python-nav-statement-start) + (python-nav-beginning-of-statement) (point-marker))) 'after-line) ;; Do not indent @@ -1097,7 +1100,7 @@ (python-info-ppss-context-type)) (forward-line 1))))))) -(defun python-nav-statement-start () +(defun python-nav-beginning-of-statement () "Move to start of current statement." (interactive "^") (while (and (or (back-to-indentation) t) @@ -1110,7 +1113,7 @@ (python-info-ppss-context 'paren)) (forward-line -1))))) -(defun python-nav-statement-end () +(defun python-nav-end-of-statement () "Move to end of current statement." (interactive "^") (while (and (goto-char (line-end-position)) @@ -1135,29 +1138,29 @@ (interactive "^p") (or arg (setq arg 1)) (while (> arg 0) - (python-nav-statement-end) + (python-nav-end-of-statement) (python-util-forward-comment) - (python-nav-statement-start) + (python-nav-beginning-of-statement) (setq arg (1- arg))) (while (< arg 0) - (python-nav-statement-start) + (python-nav-beginning-of-statement) (python-util-forward-comment -1) - (python-nav-statement-start) + (python-nav-beginning-of-statement) (setq arg (1+ arg)))) -(defun python-nav-block-start () +(defun python-nav-beginning-of-block () "Move to start of current block." (interactive "^") (let ((starting-pos (point)) (block-regexp (python-rx line-start (* whitespace) block-start))) (if (progn - (python-nav-statement-start) + (python-nav-beginning-of-statement) (looking-at (python-rx block-start))) (point-marker) ;; Go to first line beginning a statement (while (and (not (bobp)) - (or (and (python-nav-statement-start) nil) + (or (and (python-nav-beginning-of-statement) nil) (python-info-current-line-comment-p) (python-info-current-line-empty-p))) (forward-line -1)) @@ -1171,16 +1174,16 @@ (point-marker) (and (goto-char starting-pos) nil)))))) -(defun python-nav-block-end () +(defun python-nav-end-of-block () "Move to end of current block." (interactive "^") - (when (python-nav-block-start) + (when (python-nav-beginning-of-block) (let ((block-indentation (current-indentation))) - (python-nav-statement-end) + (python-nav-end-of-statement) (while (and (forward-line 1) (not (eobp)) (or (and (> (current-indentation) block-indentation) - (or (python-nav-statement-end) t)) + (or (python-nav-end-of-statement) t)) (python-info-current-line-comment-p) (python-info-current-line-empty-p)))) (python-util-forward-comment -1) @@ -1203,7 +1206,7 @@ (python-rx line-start (* whitespace) block-start)) (starting-pos (point))) (while (> arg 0) - (python-nav-statement-end) + (python-nav-end-of-statement) (while (and (re-search-forward block-start-regexp nil t) (or (python-info-ppss-context 'string) @@ -1211,14 +1214,14 @@ (python-info-ppss-context 'paren)))) (setq arg (1- arg))) (while (< arg 0) - (python-nav-statement-start) + (python-nav-beginning-of-statement) (while (and (re-search-backward block-start-regexp nil t) (or (python-info-ppss-context 'string) (python-info-ppss-context 'comment) (python-info-ppss-context 'paren)))) (setq arg (1+ arg))) - (python-nav-statement-start) + (python-nav-beginning-of-statement) (if (not (looking-at (python-rx block-start))) (and (goto-char starting-pos) nil) (and (not (= (point) starting-pos)) (point-marker))))) @@ -1231,9 +1234,9 @@ (or arg (setq arg 1)) (while (> arg 0) (let ((block-starting-pos - (save-excursion (python-nav-block-start))) + (save-excursion (python-nav-beginning-of-block))) (block-ending-pos - (save-excursion (python-nav-block-end))) + (save-excursion (python-nav-end-of-block))) (next-block-starting-pos (save-excursion (python-nav-forward-block)))) (cond ((not block-starting-pos) @@ -1241,39 +1244,39 @@ ((= (point) block-starting-pos) (if (or (not next-block-starting-pos) (< block-ending-pos next-block-starting-pos)) - (python-nav-block-end) + (python-nav-end-of-block) (python-nav-forward-block))) ((= block-ending-pos (point)) (let ((parent-block-end-pos (save-excursion (python-util-forward-comment) - (python-nav-block-start) - (python-nav-block-end)))) + (python-nav-beginning-of-block) + (python-nav-end-of-block)))) (if (and parent-block-end-pos (or (not next-block-starting-pos) (> next-block-starting-pos parent-block-end-pos))) (goto-char parent-block-end-pos) (python-nav-forward-block)))) - (t (python-nav-block-end)))) + (t (python-nav-end-of-block)))) (setq arg (1- arg))) (while (< arg 0) (let* ((block-starting-pos - (save-excursion (python-nav-block-start))) + (save-excursion (python-nav-beginning-of-block))) (block-ending-pos - (save-excursion (python-nav-block-end))) + (save-excursion (python-nav-end-of-block))) (prev-block-ending-pos (save-excursion (when (python-nav-backward-block) - (python-nav-block-end)))) + (python-nav-end-of-block)))) (prev-block-parent-ending-pos (save-excursion (when prev-block-ending-pos (goto-char prev-block-ending-pos) (python-util-forward-comment) - (python-nav-block-start) - (python-nav-block-end))))) + (python-nav-beginning-of-block) + (python-nav-end-of-block))))) (cond ((not block-ending-pos) (and (python-nav-backward-block) - (python-nav-block-end))) + (python-nav-end-of-block))) ((= (point) block-ending-pos) (let ((candidates)) (dolist (name @@ -1286,7 +1289,7 @@ (add-to-list 'candidates (symbol-value name)))) (goto-char (apply 'max candidates)))) ((> (point) block-ending-pos) - (python-nav-block-end)) + (python-nav-end-of-block)) ((= (point) block-starting-pos) (if (not (> (point) (or prev-block-ending-pos (point)))) (python-nav-backward-block) @@ -1299,7 +1302,7 @@ (when (and parent-block-ending-pos (> parent-block-ending-pos prev-block-ending-pos)) (goto-char parent-block-ending-pos))))) - (t (python-nav-block-start)))) + (t (python-nav-beginning-of-block)))) (setq arg (1+ arg)))) ------------------------------------------------------------ revno: 109126 fixes bug(s): http://debbugs.gnu.org/11868 committer: Fabián Ezequiel Gallina branch nick: trunk timestamp: Tue 2012-07-17 13:47:58 -0300 message: * progmodes/python.el (python-shell-send-string-no-output): Allow accept-process-output to quit, keeping shell process ready for future interactions. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-17 12:58:25 +0000 +++ lisp/ChangeLog 2012-07-17 16:47:58 +0000 @@ -1,3 +1,9 @@ +2012-07-17 Fabián Ezequiel Gallina + + * progmodes/python.el (python-shell-send-string-no-output): Allow + accept-process-output to quit, keeping shell process ready for + future interactions (Bug#11868). + 2012-07-17 Stefan Monnier * emacs-lisp/cl-macs.el (cl-progv): Use a properly prefixed var name. === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2012-07-16 17:18:39 +0000 +++ lisp/progmodes/python.el 2012-07-17 16:47:58 +0000 @@ -1701,24 +1701,29 @@ "Send STRING to PROCESS and inhibit output. When MSG is non-nil messages the first line of STRING. Return the output." - (let* ((output-buffer) + (let* ((output-buffer "") (process (or process (python-shell-get-or-create-process))) (comint-preoutput-filter-functions (append comint-preoutput-filter-functions '(ansi-color-filter-apply (lambda (string) (setq output-buffer (concat output-buffer string)) - ""))))) - (python-shell-send-string string process msg) - (accept-process-output process) - (replace-regexp-in-string - (if (> (length python-shell-prompt-output-regexp) 0) - (format "\n*%s$\\|^%s\\|\n$" - python-shell-prompt-regexp - (or python-shell-prompt-output-regexp "")) - (format "\n*$\\|^%s\\|\n$" - python-shell-prompt-regexp)) - "" output-buffer))) + "")))) + (inhibit-quit t)) + (or + (with-local-quit + (python-shell-send-string string process msg) + (accept-process-output process) + (replace-regexp-in-string + (if (> (length python-shell-prompt-output-regexp) 0) + (format "\n*%s$\\|^%s\\|\n$" + python-shell-prompt-regexp + (or python-shell-prompt-output-regexp "")) + (format "\n*$\\|^%s\\|\n$" + python-shell-prompt-regexp)) + "" output-buffer)) + (with-current-buffer (process-buffer process) + (comint-interrupt-subjob))))) (defun python-shell-internal-send-string (string) "Send STRING to the Internal Python interpreter. ------------------------------------------------------------ revno: 109125 committer: Paul Eggert branch nick: trunk timestamp: Tue 2012-07-17 09:24:57 -0700 message: * alloc.c (Fmemory_free): Account for memory-free's own storage. Round up, not down. Improve doc. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-17 12:31:29 +0000 +++ src/ChangeLog 2012-07-17 16:24:57 +0000 @@ -1,3 +1,8 @@ +2012-07-17 Paul Eggert + + * alloc.c (Fmemory_free): Account for memory-free's own storage. + Round up, not down. Improve doc. + 2012-07-17 Dmitry Antipov Restore old code in allocate_string_data to avoid Faset breakage. === modified file 'src/alloc.c' --- src/alloc.c 2012-07-17 12:31:29 +0000 +++ src/alloc.c 2012-07-17 16:24:57 +0000 @@ -6581,33 +6581,35 @@ } DEFUN ("memory-free", Fmemory_free, Smemory_free, 0, 0, 0, - doc: /* Return a list of two counters that measure how much free memory -is hold by the Emacs process. Both counters are in KBytes. First -counter shows how much memory holds in a free lists maintained by -the Emacs itself. Second counter shows how much free memory is in -the heap (freed by Emacs but not released back to the operating -system). If the second counter is zero, heap statistics is not -available. */) + doc: /* Return a list (E H) of two measures of free memory. +E counts free lists maintained by Emacs itself. H counts the heap, +freed by Emacs but not released to the operating system; this is zero +if heap statistics are not available. Both counters are in units of +1024 bytes, rounded up. */) (void) { - Lisp_Object data[2]; - - data[0] = make_number - (min (MOST_POSITIVE_FIXNUM, - (total_free_conses * sizeof (struct Lisp_Cons) - + total_free_markers * sizeof (union Lisp_Misc) - + total_free_symbols * sizeof (struct Lisp_Symbol) - + total_free_floats * sizeof (struct Lisp_Float) - + total_free_intervals * sizeof (struct interval) - + total_free_strings * sizeof (struct Lisp_String) - + total_free_vector_bytes) / 1024)); + /* Make the return value first, so that its storage is accounted for. */ + Lisp_Object val = Fmake_list (make_number (2), make_number (0)); + + XSETCAR (val, + (make_number + (min (MOST_POSITIVE_FIXNUM, + ((total_free_conses * sizeof (struct Lisp_Cons) + + total_free_markers * sizeof (union Lisp_Misc) + + total_free_symbols * sizeof (struct Lisp_Symbol) + + total_free_floats * sizeof (struct Lisp_Float) + + total_free_intervals * sizeof (struct interval) + + total_free_strings * sizeof (struct Lisp_String) + + total_free_vector_bytes + + 1023) + >> 10))))); + #ifdef DOUG_LEA_MALLOC - data[1] = make_number - (min (MOST_POSITIVE_FIXNUM, mallinfo ().fordblks / 1024)); -#else - data[1] = make_number (0); + XSETCAR (XCDR (val), + make_number (min (MOST_POSITIVE_FIXNUM, + (mallinfo ().fordblks + 1023) >> 10))); #endif - return Flist (2, data); + return val; } DEFUN ("memory-use-counts", Fmemory_use_counts, Smemory_use_counts, 0, 0, 0, ------------------------------------------------------------ revno: 109124 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-07-17 08:58:25 -0400 message: * lisp/emacs-lisp/cl-macs.el (cl-progv): Use a properly prefixed var name. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-17 12:30:48 +0000 +++ lisp/ChangeLog 2012-07-17 12:58:25 +0000 @@ -1,12 +1,13 @@ 2012-07-17 Stefan Monnier + * emacs-lisp/cl-macs.el (cl-progv): Use a properly prefixed var name. + * emacs-lisp/elint.el (elint-find-args-in-code): Use help-function-arglist, so as to handle lexical byte-code. * progmodes/sh-script.el (sh-syntax-propertize-function): Fix last change (bug#11826). -2012-07-17 Glenn Morris 2012-07-17 Stefan Monnier * progmodes/cc-engine.el (c-forward-sws, c-backward-sws): === modified file 'lisp/emacs-lisp/cl-loaddefs.el' --- lisp/emacs-lisp/cl-loaddefs.el 2012-07-12 10:20:34 +0000 +++ lisp/emacs-lisp/cl-loaddefs.el 2012-07-17 12:58:25 +0000 @@ -260,7 +260,7 @@ ;;;;;; cl-do cl-loop cl-return-from cl-return cl-block cl-etypecase ;;;;;; cl-typecase cl-ecase cl-case cl-load-time-value cl-eval-when ;;;;;; cl-destructuring-bind cl-function cl-defmacro cl-defun cl-gentemp -;;;;;; cl-gensym) "cl-macs" "cl-macs.el" "a175c7714223c21a617b0460e130f1d8") +;;;;;; cl-gensym) "cl-macs" "cl-macs.el" "6b06545d8d17e8b902435f08be6ac0c2") ;;; Generated autoloads from cl-macs.el (autoload 'cl-gensym "cl-macs" "\ === modified file 'lisp/emacs-lisp/cl-macs.el' --- lisp/emacs-lisp/cl-macs.el 2012-07-11 23:13:41 +0000 +++ lisp/emacs-lisp/cl-macs.el 2012-07-17 12:58:25 +0000 @@ -1547,7 +1547,7 @@ BODY forms are executed and their result is returned. This is much like a `let' form, except that the list of symbols can be computed at run-time." (declare (indent 2) (debug (form form body))) - (let ((bodyfun (make-symbol "body")) + (let ((bodyfun (make-symbol "cl--progv-body")) (binds (make-symbol "binds")) (syms (make-symbol "syms")) (vals (make-symbol "vals"))) ------------------------------------------------------------ revno: 109123 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-07-17 08:30:48 -0400 message: * lisp/emacs-lisp/elint.el (elint-find-args-in-code): Use help-function-arglist, so as to handle lexical byte-code. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-17 11:52:00 +0000 +++ lisp/ChangeLog 2012-07-17 12:30:48 +0000 @@ -1,5 +1,8 @@ 2012-07-17 Stefan Monnier + * emacs-lisp/elint.el (elint-find-args-in-code): + Use help-function-arglist, so as to handle lexical byte-code. + * progmodes/sh-script.el (sh-syntax-propertize-function): Fix last change (bug#11826). === modified file 'lisp/emacs-lisp/elint.el' --- lisp/emacs-lisp/elint.el 2012-07-11 23:13:41 +0000 +++ lisp/emacs-lisp/elint.el 2012-07-17 12:30:48 +0000 @@ -46,6 +46,8 @@ ;;; Code: +(require 'help-fns) + (defgroup elint nil "Linting for Emacs Lisp." :prefix "elint-" @@ -713,14 +715,8 @@ (defun elint-find-args-in-code (code) "Extract the arguments from CODE. CODE can be a lambda expression, a macro, or byte-compiled code." - (cond - ((byte-code-function-p code) - (aref code 0)) - ((and (listp code) (eq (car code) 'lambda)) - (car (cdr code))) - ((and (listp code) (eq (car code) 'macro)) - (elint-find-args-in-code (cdr code))) - (t 'unknown))) + (let ((args (help-function-arglist code))) + (if (listp args) args 'unknown))) ;;; ;;; Functions to check some special forms ------------------------------------------------------------ revno: 109122 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2012-07-17 16:31:29 +0400 message: Restore old code in allocate_string_data to avoid Faset breakage. Reported by Julien Danjou in http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html. * alloc.c (allocate_string_data): Restore old code with minor adjustments, fix comment to explain this subtle issue. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-17 11:52:00 +0000 +++ src/ChangeLog 2012-07-17 12:31:29 +0000 @@ -1,3 +1,11 @@ +2012-07-17 Dmitry Antipov + + Restore old code in allocate_string_data to avoid Faset breakage. + Reported by Julien Danjou in + http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html. + * alloc.c (allocate_string_data): Restore old code with minor + adjustments, fix comment to explain this subtle issue. + 2012-07-17 Eli Zaretskii Remove FILE_SYSTEM_CASE. === modified file 'src/alloc.c' --- src/alloc.c 2012-07-17 09:12:24 +0000 +++ src/alloc.c 2012-07-17 12:31:29 +0000 @@ -1971,9 +1971,9 @@ allocate_string_data (struct Lisp_String *s, EMACS_INT nchars, EMACS_INT nbytes) { - struct sdata *data; + struct sdata *data, *old_data; struct sblock *b; - ptrdiff_t needed; + ptrdiff_t needed, old_nbytes; if (STRING_BYTES_MAX < nbytes) string_overflow (); @@ -1981,6 +1981,13 @@ /* Determine the number of bytes needed to store NBYTES bytes of string data. */ needed = SDATA_SIZE (nbytes); + if (s->data) + { + old_data = SDATA_OF_STRING (s); + old_nbytes = GC_STRING_BYTES (s); + } + else + old_data = NULL; MALLOC_BLOCK_INPUT; @@ -2050,6 +2057,16 @@ memcpy ((char *) data + needed, string_overrun_cookie, GC_STRING_OVERRUN_COOKIE_SIZE); #endif + + /* Note that Faset may call to this function when S has already data + assigned. In this case, mark data as free by setting it's string + back-pointer to null, and record the size of the data in it. */ + if (old_data) + { + SDATA_NBYTES (old_data) = old_nbytes; + old_data->string = NULL; + } + consing_since_gc += needed; } ------------------------------------------------------------ revno: 109121 [merge] committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-07-17 07:52:00 -0400 message: Merge from emacs-24 diff: === modified file 'admin/CPP-DEFINES' --- admin/CPP-DEFINES 2012-07-11 23:44:03 +0000 +++ admin/CPP-DEFINES 2012-07-17 11:52:00 +0000 @@ -95,7 +95,6 @@ EMACS_CONFIG_OPTIONS EMACS_INT EMACS_UINT -FILE_SYSTEM_CASE FLOAT_CHECK_DOMAIN GC_LISP_OBJECT_ALIGNMENT GC_MARK_SECONDARY_STACK === modified file 'admin/ChangeLog' --- admin/ChangeLog 2012-07-14 02:08:32 +0000 +++ admin/ChangeLog 2012-07-17 11:52:00 +0000 @@ -1,3 +1,10 @@ +2012-07-17 Eli Zaretskii + + * CPP-DEFINES: Remove FILE_SYSTEM_CASE. + +2012-07-17 Chong Yidong + + * Version 24.1 released. 2012-07-11 Paul Eggert Assume mkdir, perror, rename, rmdir, strerror. === modified file 'admin/bzrmerge.el' --- admin/bzrmerge.el 2012-07-10 11:51:54 +0000 +++ admin/bzrmerge.el 2012-07-17 11:52:00 +0000 @@ -138,17 +138,17 @@ `N' to include it and go on to the next revision, `n' to not skip, but continue to search this log entry for skip regexps, `q' to quit merging.")) - (case (save-excursion + (pcase (save-excursion (read-char-choice (format "%s: Skip (y/n/N/q/%s)? " str (key-description (vector help-char))) '(?y ?n ?N ?q))) - (?y (setq skip t)) - (?q (keyboard-quit)) + (`?y (setq skip t)) + (`?q (keyboard-quit)) ;; A single log entry can match skip-regexp multiple ;; times. If you are sure you don't want to skip it, ;; you don't want to be asked multiple times. - (?N (setq skip 'no)))))) + (`?N (setq skip 'no)))))) (if (eq skip t) (push revno skipped) (push revno revnos))))) === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-17 11:40:23 +0000 +++ lisp/ChangeLog 2012-07-17 11:52:00 +0000 @@ -1,5 +1,11 @@ 2012-07-17 Stefan Monnier + * progmodes/sh-script.el (sh-syntax-propertize-function): Fix last + change (bug#11826). + +2012-07-17 Glenn Morris +2012-07-17 Stefan Monnier + * progmodes/cc-engine.el (c-forward-sws, c-backward-sws): Avoid spuriously marking the buffer as modified because of c-is-sws. @@ -340,6 +346,12 @@ read-file-name-completion-ignore-case is non-nil. Don't use case-fold-search for this purpose. (Bug#11827) +2012-07-17 Andreas Schwab + + * calendar/cal-dst.el (calendar-current-time-zone): + Return calendar-current-time-zone-cache if non-nil. + +2012-07-17 Masatake YAMATO 2012-07-06 Andreas Schwab * calendar/cal-dst.el (calendar-current-time-zone): === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2012-07-14 02:08:32 +0000 +++ lisp/gnus/ChangeLog 2012-07-17 11:52:00 +0000 @@ -1,3 +1,8 @@ +2012-07-17 Andreas Schwab + + * shr.el (shr-expand-url): Handle URL starting with `//'. + +2012-07-17 Toke Høiland-Jørgensen (tiny change) 2012-07-13 Chong Yidong * smime.el (smime-certificate-info): Set buffer-read-only directly, === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2012-06-27 14:40:22 +0000 +++ lisp/gnus/shr.el 2012-07-17 11:52:00 +0000 @@ -484,6 +484,9 @@ (string-match "\\`[a-z]*:" url) (not shr-base)) url) + ((and (string-match "\\`//" url) + (string-match "\\`[a-z]*:" shr-base)) + (concat (match-string 0 shr-base) url)) ((and (not (string-match "/\\'" shr-base)) (not (string-match "\\`/" url))) (concat shr-base "/" url)) === modified file 'lisp/progmodes/sh-script.el' --- lisp/progmodes/sh-script.el 2012-07-17 08:38:12 +0000 +++ lisp/progmodes/sh-script.el 2012-07-17 11:52:00 +0000 @@ -1096,12 +1096,12 @@ (")" (0 (sh-font-lock-paren (match-beginning 0)))) ;; Highlight (possibly nested) subshells inside "" quoted ;; regions correctly. - ("\"\\(?:\\(?:[^\\\"]\\|\\)*?[^\\]\\(?:\\\\\\\\\\)*\\)??\\(\\$(\\|`\\)" + ("\"\\(?:\\(?:[^\\\"]\\|\\\\.\\)*?\\)??\\(\\$(\\|`\\)" (1 (ignore - ;; Save excursion because we want to also apply other - ;; syntax-propertize rules within the affected region. - (if (nth 8 (syntax-ppss)) + (if (nth 8 (save-excursion (syntax-ppss (match-beginning 0)))) (goto-char (1+ (match-beginning 0))) + ;; Save excursion because we want to also apply other + ;; syntax-propertize rules within the affected region. (save-excursion (sh-font-lock-quoted-subshell end))))))) (point) end)) === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-17 09:12:24 +0000 +++ src/ChangeLog 2012-07-17 11:52:00 +0000 @@ -1,3 +1,34 @@ +2012-07-17 Eli Zaretskii + + Remove FILE_SYSTEM_CASE. + * s/msdos.h (FILE_SYSTEM_CASE): Don't define. + + * fileio.c (FILE_SYSTEM_CASE): Don't define. + (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE. + Fixes problems on MS-DOS with Vtemp_file_name_pattern when + call-process-region passes it through expand-file-name. + + * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE. + +2012-07-17 Andreas Schwab + + Fix crash when creating indirect buffer (Bug#11917) + * buffer.c (buffer_lisp_local_variables): Add argument CLONE. + Don't handle unbound variables specially if non-zero. + (Fbuffer_local_variables): Pass zero. + (clone_per_buffer_values): Pass non-zero. + +2012-07-17 Andreas Schwab + + * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT + to make the loop interruptible. + +2012-07-17 Andreas Schwab + + * gnutls.c (emacs_gnutls_handshake): Only retry if + GNUTLS_E_INTERRUPTED. + +2012-07-17 Eli Zaretskii 2012-07-17 Dmitry Antipov Cleanup and convert miscellaneous checks to eassert. === modified file 'src/buffer.c' --- src/buffer.c 2012-07-17 04:29:50 +0000 +++ src/buffer.c 2012-07-17 11:52:00 +0000 @@ -153,7 +153,7 @@ static void free_buffer_text (struct buffer *b); static struct Lisp_Overlay * copy_overlays (struct buffer *, struct Lisp_Overlay *); static void modify_overlay (struct buffer *, ptrdiff_t, ptrdiff_t); -static Lisp_Object buffer_lisp_local_variables (struct buffer *); +static Lisp_Object buffer_lisp_local_variables (struct buffer *, int); /* For debugging; temporary. See set_buffer_internal. */ /* Lisp_Object Qlisp_mode, Vcheck_symbol; */ @@ -487,7 +487,7 @@ /* Get (a copy of) the alist of Lisp-level local variables of FROM and install that in TO. */ - BVAR (to, local_var_alist) = buffer_lisp_local_variables (from); + BVAR (to, local_var_alist) = buffer_lisp_local_variables (from, 1); } @@ -1012,10 +1012,12 @@ /* Return an alist of the Lisp-level buffer-local bindings of buffer BUF. That is, don't include the variables maintained - in special slots in the buffer object. */ + in special slots in the buffer object. + If CLONE is zero elements of the form (VAR . unbound) are replaced + by VAR. */ static Lisp_Object -buffer_lisp_local_variables (struct buffer *buf) +buffer_lisp_local_variables (struct buffer *buf, int clone) { Lisp_Object result = Qnil; register Lisp_Object tail; @@ -1035,7 +1037,7 @@ if (buf != current_buffer) val = XCDR (elt); - result = Fcons (EQ (val, Qunbound) + result = Fcons (!clone && EQ (val, Qunbound) ? XCAR (elt) : Fcons (XCAR (elt), val), result); @@ -1064,7 +1066,7 @@ buf = XBUFFER (buffer); } - result = buffer_lisp_local_variables (buf); + result = buffer_lisp_local_variables (buf, 0); /* Add on all the variables stored in special slots. */ { === modified file 'src/dired.c' --- src/dired.c 2012-07-03 18:24:42 +0000 +++ src/dired.c 2012-07-17 11:52:00 +0000 @@ -470,9 +470,6 @@ CHECK_STRING (file); -#ifdef FILE_SYSTEM_CASE - file = FILE_SYSTEM_CASE (file); -#endif bestmatch = Qnil; encoded_file = encoded_dir = Qnil; GCPRO5 (file, dirname, bestmatch, encoded_file, encoded_dir); === modified file 'src/fileio.c' --- src/fileio.c 2012-07-10 23:24:36 +0000 +++ src/fileio.c 2012-07-17 11:52:00 +0000 @@ -84,10 +84,6 @@ #include "commands.h" -#ifndef FILE_SYSTEM_CASE -#define FILE_SYSTEM_CASE(filename) (filename) -#endif - /* Nonzero during writing of auto-save files. */ static int auto_saving; @@ -334,7 +330,6 @@ return STRINGP (handled_name) ? handled_name : Qnil; } - filename = FILE_SYSTEM_CASE (filename); #ifdef DOS_NT beg = alloca (SBYTES (filename) + 1); memcpy (beg, SSDATA (filename), SBYTES (filename) + 1); @@ -861,7 +856,6 @@ UNGCPRO; } } - name = FILE_SYSTEM_CASE (name); multibyte = STRING_MULTIBYTE (name); if (multibyte != STRING_MULTIBYTE (default_directory)) { === modified file 'src/s/msdos.h' --- src/s/msdos.h 2012-07-14 10:03:30 +0000 +++ src/s/msdos.h 2012-07-17 11:52:00 +0000 @@ -86,10 +86,6 @@ :se=:so=:us=
    :ue=
:md=:mh=:mb=:mr=:me=:\ :AB=:AF=:op=:" -/* Define this to a function (Fdowncase, Fupcase) if your file system - likes that. */ -#define FILE_SYSTEM_CASE Fmsdos_downcase_filename - /* Define this to be the separator between devices and paths. Used by lisp.h to define IS_DEVICE_SEP. */ #define DEVICE_SEP ':' ------------------------------------------------------------ revno: 109120 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-07-17 07:40:23 -0400 message: * lisp/progmodes/cc-engine.el (c-forward-sws, c-backward-sws): Avoid spuriously marking the buffer as modified because of c-is-sws. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-17 08:38:12 +0000 +++ lisp/ChangeLog 2012-07-17 11:40:23 +0000 @@ -1,5 +1,8 @@ 2012-07-17 Stefan Monnier + * progmodes/cc-engine.el (c-forward-sws, c-backward-sws): + Avoid spuriously marking the buffer as modified because of c-is-sws. + * progmodes/sh-script.el (sh-syntax-propertize-function): Mark "${#VAR" as not-a-comment (bug#11946). === modified file 'lisp/progmodes/cc-engine.el' --- lisp/progmodes/cc-engine.el 2012-04-22 11:13:09 +0000 +++ lisp/progmodes/cc-engine.el 2012-07-17 11:40:23 +0000 @@ -1688,6 +1688,7 @@ ;; high as possible. (setq rung-pos (point))) + (with-silent-modifications (while (progn (while @@ -1843,7 +1844,7 @@ (1- last-put-in-sws-pos)) (c-remove-is-and-in-sws (1- last-put-in-sws-pos) last-put-in-sws-pos)))) - ))) + )))) (defun c-backward-sws () ;; Used by `c-backward-syntactic-ws' to implement the unbounded search. @@ -1881,6 +1882,7 @@ (goto-char (setq rung-pos rung-is-marked)) (goto-char simple-ws-beg)) + (with-silent-modifications (while (progn (while @@ -2066,7 +2068,7 @@ last-put-in-sws-pos) (c-remove-is-and-in-sws last-put-in-sws-pos (1+ last-put-in-sws-pos))))) - ))) + )))) ;; Other whitespace tools ------------------------------------------------------------ revno: 109119 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-07-17 06:17:29 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2012-07-14 00:06:05 +0000 +++ autogen/configure 2012-07-17 10:17:29 +0000 @@ -591,8 +591,8 @@ # include #endif" +ac_header_list= ac_func_list= -ac_header_list= gl_getopt_required=POSIX gl_getopt_required=POSIX ac_subst_vars='gltests_LTLIBOBJS @@ -607,118 +607,6 @@ LIB_GCC LD_FIRSTFLAG LD_SWITCH_SYSTEM_TEMACS -POST_ALLOC_OBJ -PRE_ALLOC_OBJ -CYGWIN_OBJ -RALLOC_OBJ -OLDXMENU_DEPS -LIBX_OTHER -LIBXMENU -OLDXMENU -OLDXMENU_TARGET -LIBXT_OTHER -TOOLKIT_LIBW -WIDGET_OBJ -XOBJ -XMENU_OBJ -FONT_OBJ -OTHER_FILES -GNU_OBJC_CFLAGS -ns_appsrc -ns_appresdir -ns_appbindir -ns_appdir -S_FILE -X_TOOLKIT_TYPE -GNUSTEP_CFLAGS -C_SWITCH_X_SITE -LD_SWITCH_X_SITE -gameuser -gamedir -bitmapdir -archlibdir -etcdir -x_default_search_path -lisppath -locallisppath -standardlisppath -leimdir -lispdir -srcdir -canonical -configuration -version -KRB4LIB -DESLIB -KRB5LIB -CRYPTOLIB -COM_ERRLIB -LIBRESOLV -LIBHESIOD -TERMCAP_OBJ -LIBS_TERMCAP -BLESSMAIL_TARGET -LIBS_MAIL -liblockfile -LIBXML2_LIBS -LIBXML2_CFLAGS -LIBXSM -LIBGPM -LIBGIF -LIBTIFF -LIBPNG -LIBJPEG -LIBXPM -M17N_FLT_LIBS -M17N_FLT_CFLAGS -LIBOTF_LIBS -LIBOTF_CFLAGS -FREETYPE_LIBS -FREETYPE_CFLAGS -XFT_LIBS -XFT_CFLAGS -FONTCONFIG_LIBS -FONTCONFIG_CFLAGS -LIBXMU -LIBXTR6 -LIBGNUTLS_LIBS -LIBGNUTLS_CFLAGS -LIBSELINUX_LIBS -SETTINGS_LIBS -SETTINGS_CFLAGS -GCONF_LIBS -GCONF_CFLAGS -GSETTINGS_LIBS -GSETTINGS_CFLAGS -DBUS_OBJ -DBUS_LIBS -DBUS_CFLAGS -GTK_OBJ -GTK_LIBS -GTK_CFLAGS -IMAGEMAGICK_LIBS -IMAGEMAGICK_CFLAGS -RSVG_LIBS -RSVG_CFLAGS -LIB_PTHREAD -VMLIMIT_OBJ -GMALLOC_OBJ -HAVE_XSERVER -LIB_STANDARD -NS_OBJC_OBJ -NS_OBJ -ns_self_contained -INSTALL_ARCH_INDEP_EXTRA -TEMACS_LDFLAGS2 -LD_SWITCH_X_SITE_RPATH -XMKMF -DEPFLAGS -MKDEPDIR -CFLAGS_SOUND -ALSA_LIBS -ALSA_CFLAGS -LIBSOUND -PKG_CONFIG LIBGNU_LTLIBDEPS LIBGNU_LIBDEPS gltests_WITNESS @@ -1210,6 +1098,118 @@ ALLOCA GL_COND_LIBTOOL_FALSE GL_COND_LIBTOOL_TRUE +POST_ALLOC_OBJ +PRE_ALLOC_OBJ +CYGWIN_OBJ +RALLOC_OBJ +OLDXMENU_DEPS +LIBX_OTHER +LIBXMENU +OLDXMENU +OLDXMENU_TARGET +LIBXT_OTHER +TOOLKIT_LIBW +WIDGET_OBJ +XOBJ +XMENU_OBJ +FONT_OBJ +OTHER_FILES +GNU_OBJC_CFLAGS +ns_appsrc +ns_appresdir +ns_appbindir +ns_appdir +S_FILE +X_TOOLKIT_TYPE +GNUSTEP_CFLAGS +C_SWITCH_X_SITE +LD_SWITCH_X_SITE +gameuser +gamedir +bitmapdir +archlibdir +etcdir +x_default_search_path +lisppath +locallisppath +standardlisppath +leimdir +lispdir +srcdir +canonical +configuration +version +KRB4LIB +DESLIB +KRB5LIB +CRYPTOLIB +COM_ERRLIB +LIBRESOLV +LIBHESIOD +TERMCAP_OBJ +LIBS_TERMCAP +BLESSMAIL_TARGET +LIBS_MAIL +liblockfile +LIBXML2_LIBS +LIBXML2_CFLAGS +LIBXSM +LIBGPM +LIBGIF +LIBTIFF +LIBPNG +LIBJPEG +LIBXPM +M17N_FLT_LIBS +M17N_FLT_CFLAGS +LIBOTF_LIBS +LIBOTF_CFLAGS +FREETYPE_LIBS +FREETYPE_CFLAGS +XFT_LIBS +XFT_CFLAGS +FONTCONFIG_LIBS +FONTCONFIG_CFLAGS +LIBXMU +LIBXTR6 +LIBGNUTLS_LIBS +LIBGNUTLS_CFLAGS +LIBSELINUX_LIBS +SETTINGS_LIBS +SETTINGS_CFLAGS +GCONF_LIBS +GCONF_CFLAGS +GSETTINGS_LIBS +GSETTINGS_CFLAGS +DBUS_OBJ +DBUS_LIBS +DBUS_CFLAGS +GTK_OBJ +GTK_LIBS +GTK_CFLAGS +IMAGEMAGICK_LIBS +IMAGEMAGICK_CFLAGS +RSVG_LIBS +RSVG_CFLAGS +LIB_PTHREAD +VMLIMIT_OBJ +GMALLOC_OBJ +HAVE_XSERVER +LIB_STANDARD +NS_OBJC_OBJ +NS_OBJ +ns_self_contained +INSTALL_ARCH_INDEP_EXTRA +TEMACS_LDFLAGS2 +LD_SWITCH_X_SITE_RPATH +XMKMF +DEPFLAGS +MKDEPDIR +CFLAGS_SOUND +ALSA_LIBS +ALSA_CFLAGS +LIBSOUND +PKG_CONFIG CRT_DIR START_FILES LIB_MATH @@ -2501,6 +2501,92 @@ } # ac_fn_c_check_decl +# ac_fn_c_check_header_preproc LINENO HEADER VAR +# ---------------------------------------------- +# Tests whether HEADER is present, setting the cache variable VAR accordingly. +ac_fn_c_check_header_preproc () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_preproc + +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_member + # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly @@ -2568,62 +2654,59 @@ } # ac_fn_c_check_func -# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES -# ---------------------------------------------------- -# Tries to find if the field MEMBER exists in type AGGR, after including -# INCLUDES, setting cache variable VAR accordingly. -ac_fn_c_check_member () +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -$as_echo_n "checking for $2.$3... " >&6; } -if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (sizeof ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - eval "$4=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$4 + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -} # ac_fn_c_check_member +} # ac_fn_c_check_type # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- @@ -2802,89 +2885,6 @@ as_fn_set_status $ac_retval } # ac_fn_c_compute_int - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_type - -# ac_fn_c_check_header_preproc LINENO HEADER VAR -# ---------------------------------------------- -# Tests whether HEADER is present, setting the cache variable VAR accordingly. -ac_fn_c_check_header_preproc () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f conftest.err conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_preproc cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -3168,25 +3168,43 @@ >$cache_file fi +as_fn_append ac_header_list " linux/version.h" +as_fn_append ac_header_list " sys/systeminfo.h" +as_fn_append ac_header_list " stdio_ext.h" +as_fn_append ac_header_list " fcntl.h" +as_fn_append ac_header_list " coff.h" +as_fn_append ac_header_list " pty.h" +as_fn_append ac_header_list " sys/vlimit.h" +as_fn_append ac_header_list " sys/resource.h" +as_fn_append ac_header_list " sys/utsname.h" +as_fn_append ac_header_list " pwd.h" +as_fn_append ac_header_list " utmp.h" +as_fn_append ac_header_list " dirent.h" +as_fn_append ac_header_list " util.h" +as_fn_append ac_header_list " sys/socket.h" +as_fn_append ac_header_list " stdlib.h" +as_fn_append ac_header_list " unistd.h" +as_fn_append ac_header_list " sys/param.h" +as_fn_append ac_header_list " pthread.h" +as_fn_append ac_header_list " malloc/malloc.h" +as_fn_append ac_header_list " maillock.h" +as_fn_append ac_header_list " sys/un.h" +as_fn_append ac_func_list " tzset" as_fn_append ac_func_list " readlinkat" -as_fn_append ac_header_list " sys/param.h" gl_getopt_required=GNU as_fn_append ac_header_list " getopt.h" as_fn_append ac_func_list " gettimeofday" as_fn_append ac_func_list " nanotime" as_fn_append ac_header_list " sys/time.h" -as_fn_append ac_header_list " sys/socket.h" as_fn_append ac_header_list " wchar.h" as_fn_append ac_header_list " stdint.h" as_fn_append ac_header_list " inttypes.h" as_fn_append ac_func_list " lstat" -as_fn_append ac_header_list " unistd.h" as_fn_append ac_func_list " alarm" as_fn_append ac_header_list " sys/select.h" as_fn_append ac_func_list " pselect" as_fn_append ac_func_list " pthread_sigmask" as_fn_append ac_func_list " readlink" -as_fn_append ac_func_list " tzset" as_fn_append ac_func_list " strtoimax" as_fn_append ac_func_list " strtoumax" as_fn_append ac_func_list " symlink" @@ -3198,24 +3216,6 @@ as_fn_append ac_func_list " futimens" as_fn_append ac_func_list " utimensat" as_fn_append ac_func_list " lutimes" -as_fn_append ac_header_list " linux/version.h" -as_fn_append ac_header_list " sys/systeminfo.h" -as_fn_append ac_header_list " stdio_ext.h" -as_fn_append ac_header_list " fcntl.h" -as_fn_append ac_header_list " coff.h" -as_fn_append ac_header_list " pty.h" -as_fn_append ac_header_list " sys/vlimit.h" -as_fn_append ac_header_list " sys/resource.h" -as_fn_append ac_header_list " sys/utsname.h" -as_fn_append ac_header_list " pwd.h" -as_fn_append ac_header_list " utmp.h" -as_fn_append ac_header_list " dirent.h" -as_fn_append ac_header_list " util.h" -as_fn_append ac_header_list " stdlib.h" -as_fn_append ac_header_list " pthread.h" -as_fn_append ac_header_list " malloc/malloc.h" -as_fn_append ac_header_list " maillock.h" -as_fn_append ac_header_list " sys/un.h" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -8311,9 +8311,7321 @@ esac -# Configure gnulib before invoking PKG_CHECK_MODULES, as the latter might -# for example add -lrt to RSVG_LIBS, which would then cause gnulib to -# incorrectly conclude that -lrt is not needed to link clock_gettime. +pre_PKG_CONFIG_CFLAGS=$CFLAGS +pre_PKG_CONFIG_LIBS=$LIBS + +# Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + + +if test "${with_sound}" != "no"; then + # Sound support for GNU/Linux and the free BSDs. + for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + have_sound_header=yes +fi + +done + + # Emulation library used on NetBSD. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5 +$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; } +if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lossaudio $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char _oss_ioctl (); +int +main () +{ +return _oss_ioctl (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ossaudio__oss_ioctl=yes +else + ac_cv_lib_ossaudio__oss_ioctl=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5 +$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; } +if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then : + LIBSOUND=-lossaudio +else + LIBSOUND= +fi + + + + ALSA_REQUIRED=1.0.0 + ALSA_MODULES="alsa >= $ALSA_REQUIRED" + + succeeded=no + + if test "$PKG_CONFIG" = "no" ; then + HAVE_ALSA=no + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5 +$as_echo_n "checking for $ALSA_MODULES... " >&6; } + + if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5 && + ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES" 2>&5` && + ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES" 2>&5`; then + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"` + ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5 +$as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; } + succeeded=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ALSA_CFLAGS="" + ALSA_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + HAVE_ALSA=yes + else + HAVE_ALSA=no + fi + + if test $HAVE_ALSA = yes; then + SAVE_CFLAGS="$CFLAGS" + SAVE_LIBS="$LIBS" + CFLAGS="$ALSA_CFLAGS $CFLAGS" + LIBS="$ALSA_LIBS $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +snd_lib_error_set_handler (0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + emacs_alsa_normal=yes +else + emacs_alsa_normal=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$emacs_alsa_normal" != yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +snd_lib_error_set_handler (0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + emacs_alsa_subdir=yes +else + emacs_alsa_subdir=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$emacs_alsa_subdir" != yes; then + as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 + fi + ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" + fi + + CFLAGS="$SAVE_CFLAGS" + LIBS="$SAVE_LIBS" + LIBSOUND="$LIBSOUND $ALSA_LIBS" + CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" + +$as_echo "#define HAVE_ALSA 1" >>confdefs.h + + fi + + if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then + case "$opsys" in + gnu-linux|freebsd|netbsd) + +$as_echo "#define HAVE_SOUND 1" >>confdefs.h + + ;; + esac + fi + + +fi + + + + + for ac_header in $ac_header_list +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5 +$as_echo_n "checking if personality LINUX32 can be set... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +personality (PER_LINUX32) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + emacs_cv_personality_linux32=yes +else + emacs_cv_personality_linux32=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5 +$as_echo "$emacs_cv_personality_linux32" >&6; } + +if test $emacs_cv_personality_linux32 = yes; then + +$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h + +fi + +for ac_header in term.h +do : + ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h" +if test "x$ac_cv_header_term_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_TERM_H 1 +_ACEOF + +fi + +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +if test "${ac_cv_header_time+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_time=yes +else + ac_cv_header_time=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 +$as_echo "$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then + +$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h + +fi + +ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default" +if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SYS_SIGLIST $ac_have_decl +_ACEOF + +if test $ac_cv_have_decl_sys_siglist != yes; then + # For Tru64, at least: + ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default" +if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL___SYS_SIGLIST $ac_have_decl +_ACEOF + + if test $ac_cv_have_decl___sys_siglist = yes; then + +$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 +$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } +if test "${ac_cv_header_sys_wait_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#ifndef WEXITSTATUS +# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) +#endif +#ifndef WIFEXITED +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif + +int +main () +{ + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_sys_wait_h=yes +else + ac_cv_header_sys_wait_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 +$as_echo "$ac_cv_header_sys_wait_h" >&6; } +if test $ac_cv_header_sys_wait_h = yes; then + +$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5 +$as_echo_n "checking for speed_t... " >&6; } +if test "${emacs_cv_speed_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +speed_t x = 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + emacs_cv_speed_t=yes +else + emacs_cv_speed_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5 +$as_echo "$emacs_cv_speed_t" >&6; } +if test $emacs_cv_speed_t = yes; then + +$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5 +$as_echo_n "checking for struct exception... " >&6; } +if test "${emacs_cv_struct_exception+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + emacs_cv_struct_exception=yes +else + emacs_cv_struct_exception=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5 +$as_echo "$emacs_cv_struct_exception" >&6; } +HAVE_EXCEPTION=$emacs_cv_struct_exception +if test $emacs_cv_struct_exception != yes || test $opsys = darwin; then + +$as_echo "#define NO_MATHERR 1" >>confdefs.h + +fi + + + + +for ac_header in net/if.h +do : + ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default +#if HAVE_SYS_SOCKET_H +#include +#endif +" +if test "x$ac_cv_header_net_if_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NET_IF_H 1 +_ACEOF + +fi + +done + +for ac_header in ifaddrs.h +do : + ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default +#if HAVE_SYS_SOCKET_H +#include +#endif +" +if test "x$ac_cv_header_ifaddrs_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_IFADDRS_H 1 +_ACEOF + +fi + +done + +for ac_header in net/if_dl.h +do : + ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default +#if HAVE_SYS_SOCKET_H +#include +#endif +" +if test "x$ac_cv_header_net_if_dl_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NET_IF_DL_H 1 +_ACEOF + +fi + +done + + +ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default +#if HAVE_SYS_SOCKET_H +#include +#endif +#if HAVE_NET_IF_H +#include +#endif +" +if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default +#if HAVE_SYS_SOCKET_H +#include +#endif +#if HAVE_NET_IF_H +#include +#endif +" +if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default +#if HAVE_SYS_SOCKET_H +#include +#endif +#if HAVE_NET_IF_H +#include +#endif +" +if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default +#if HAVE_SYS_SOCKET_H +#include +#endif +#if HAVE_NET_IF_H +#include +#endif +" +if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default +#if HAVE_SYS_SOCKET_H +#include +#endif +#if HAVE_NET_IF_H +#include +#endif +" +if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_IFREQ_IFR_ADDR 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default +#if HAVE_SYS_SOCKET_H +#include +#endif +#if HAVE_NET_IF_H +#include +#endif +" +if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1 +_ACEOF + + +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((__aligned__ (expr)))" >&5 +$as_echo_n "checking for __attribute__ ((__aligned__ (expr)))... " >&6; } +if test "${emacs_cv_attribute_aligned+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +char __attribute__ ((__aligned__ (1 << 3))) c; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + emacs_cv_attribute_aligned=yes +else + emacs_cv_attribute_aligned=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_attribute_aligned" >&5 +$as_echo "$emacs_cv_attribute_aligned" >&6; } +if test $emacs_cv_attribute_aligned = yes; then + +$as_echo "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h + +fi + + +DEPFLAGS= +MKDEPDIR=":" +deps_frag=deps.mk +if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5 +$as_echo_n "checking whether we are using GNU Make... " >&6; } + HAVE_GNU_MAKE=no + testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'` + if test "x$testval" != x; then + HAVE_GNU_MAKE=yes + else + ac_enable_autodepend=no + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5 +$as_echo "$HAVE_GNU_MAKE" >&6; } + if test $HAVE_GNU_MAKE = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5 +$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; } + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -MMD -MF deps.d -MP" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_enable_autodepend=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$SAVE_CFLAGS" + test -f deps.d || ac_enable_autodepend=no + rm -rf deps.d + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5 +$as_echo "$ac_enable_autodepend" >&6; } + fi + if test $ac_enable_autodepend = yes; then + DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP' + ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe. + MKDEPDIR='${MKDIR_P} ${DEPDIR}' + deps_frag=autodeps.mk + fi +fi +deps_frag=$srcdir/src/$deps_frag + + + + + +lisp_frag=$srcdir/src/lisp.mk + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 +$as_echo_n "checking for long file names... " >&6; } +if test "${ac_cv_sys_long_file_names+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_long_file_names=yes +# Test for long file names in all the places we know might matter: +# . the current directory, where building will happen +# $prefix/lib where we will be installing things +# $exec_prefix/lib likewise +# $TMPDIR if set, where it might want to write temporary files +# /tmp where it might want to write temporary files +# /var/tmp likewise +# /usr/tmp likewise +for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do + # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib + # in the usual case where exec_prefix is '${prefix}'. + case $ac_dir in #( + . | /* | ?:[\\/]*) ;; #( + *) continue;; + esac + test -w "$ac_dir/." || continue # It is less confusing to not echo anything here. + ac_xdir=$ac_dir/cf$$ + (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue + ac_tf1=$ac_xdir/conftest9012345 + ac_tf2=$ac_xdir/conftest9012346 + touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || + ac_cv_sys_long_file_names=no + rm -f -r "$ac_xdir" 2>/dev/null + test $ac_cv_sys_long_file_names = no && break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5 +$as_echo "$ac_cv_sys_long_file_names" >&6; } +if test $ac_cv_sys_long_file_names = yes; then + +$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h + +fi + + +#### Choose a window system. + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 +$as_echo_n "checking for X... " >&6; } + + +# Check whether --with-x was given. +if test "${with_x+set}" = set; then : + withval=$with_x; +fi + +# $have_x is `yes', `no', `disabled', or empty when we do not yet know. +if test "x$with_x" = xno; then + # The user explicitly disabled X. + have_x=disabled +else + case $x_includes,$x_libraries in #( + *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( + *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # One or both of the vars are not set, and there is no cached value. +ac_x_includes=no ac_x_libraries=no +rm -f -r conftest.dir +if mkdir conftest.dir; then + cd conftest.dir + cat >Imakefile <<'_ACEOF' +incroot: + @echo incroot='${INCROOT}' +usrlibdir: + @echo usrlibdir='${USRLIBDIR}' +libdir: + @echo libdir='${LIBDIR}' +_ACEOF + if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + for ac_var in incroot usrlibdir libdir; do + eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" + done + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. + for ac_extension in a so sl dylib la dll; do + if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && + test -f "$ac_im_libdir/libX11.$ac_extension"; then + ac_im_usrlibdir=$ac_im_libdir; break + fi + done + # Screen out bogus values from the imake configuration. They are + # bogus both because they are the default anyway, and because + # using them would break gcc on systems where it needs fixed includes. + case $ac_im_incroot in + /usr/include) ac_x_includes= ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; + esac + case $ac_im_usrlibdir in + /usr/lib | /usr/lib64 | /lib | /lib64) ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; + esac + fi + cd .. + rm -f -r conftest.dir +fi + +# Standard set of common directories for X headers. +# Check X11 before X11Rn because it is often a symlink to the current release. +ac_x_header_dirs=' +/usr/X11/include +/usr/X11R7/include +/usr/X11R6/include +/usr/X11R5/include +/usr/X11R4/include + +/usr/include/X11 +/usr/include/X11R7 +/usr/include/X11R6 +/usr/include/X11R5 +/usr/include/X11R4 + +/usr/local/X11/include +/usr/local/X11R7/include +/usr/local/X11R6/include +/usr/local/X11R5/include +/usr/local/X11R4/include + +/usr/local/include/X11 +/usr/local/include/X11R7 +/usr/local/include/X11R6 +/usr/local/include/X11R5 +/usr/local/include/X11R4 + +/usr/X386/include +/usr/x386/include +/usr/XFree86/include/X11 + +/usr/include +/usr/local/include +/usr/unsupported/include +/usr/athena/include +/usr/local/x11r5/include +/usr/lpp/Xamples/include + +/usr/openwin/include +/usr/openwin/share/include' + +if test "$ac_x_includes" = no; then + # Guess where to find include files, by looking for Xlib.h. + # First, try using that file with no special directory specified. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # We can compile using X headers with no special include directory. +ac_x_includes= +else + for ac_dir in $ac_x_header_dirs; do + if test -r "$ac_dir/X11/Xlib.h"; then + ac_x_includes=$ac_dir + break + fi +done +fi +rm -f conftest.err conftest.$ac_ext +fi # $ac_x_includes = no + +if test "$ac_x_libraries" = no; then + # Check for the libraries. + # See if we find them without any special options. + # Don't add to $LIBS permanently. + ac_save_LIBS=$LIBS + LIBS="-lX11 $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +XrmInitialize () + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + LIBS=$ac_save_LIBS +# We can link X programs with no special library path. +ac_x_libraries= +else + LIBS=$ac_save_LIBS +for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` +do + # Don't even attempt the hair of trying to link an X program! + for ac_extension in a so sl dylib la dll; do + if test -r "$ac_dir/libX11.$ac_extension"; then + ac_x_libraries=$ac_dir + break 2 + fi + done +done +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi # $ac_x_libraries = no + +case $ac_x_includes,$ac_x_libraries in #( + no,* | *,no | *\'*) + # Didn't find X, or a directory has "'" in its name. + ac_cv_have_x="have_x=no";; #( + *) + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes\ + ac_x_includes='$ac_x_includes'\ + ac_x_libraries='$ac_x_libraries'" +esac +fi +;; #( + *) have_x=yes;; + esac + eval "$ac_cv_have_x" +fi # $with_x != no + +if test "$have_x" != yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 +$as_echo "$have_x" >&6; } + no_x=yes +else + # If each of the values was on the command line, it overrides each guess. + test "x$x_includes" = xNONE && x_includes=$ac_x_includes + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries + # Update the cache value to reflect the command line values. + ac_cv_have_x="have_x=yes\ + ac_x_includes='$x_includes'\ + ac_x_libraries='$x_libraries'" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 +$as_echo "libraries $x_libraries, headers $x_includes" >&6; } +fi + +if test "$no_x" = yes; then + window_system=none +else + window_system=x11 +fi + +LD_SWITCH_X_SITE_RPATH= +if test "${x_libraries}" != NONE; then + if test -n "${x_libraries}"; then + LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"` + LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"` + fi + x_default_search_path="" + x_search_path=${x_libraries} + if test -z "${x_search_path}"; then + x_search_path=/usr/lib + fi + for x_library in `echo ${x_search_path}: | \ + sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do + x_search_path="\ +${x_library}/X11/%L/%T/%N%C%S:\ +${x_library}/X11/%l/%T/%N%C%S:\ +${x_library}/X11/%T/%N%C%S:\ +${x_library}/X11/%L/%T/%N%S:\ +${x_library}/X11/%l/%T/%N%S:\ +${x_library}/X11/%T/%N%S" + if test x"${x_default_search_path}" = x; then + x_default_search_path=${x_search_path} + else + x_default_search_path="${x_search_path}:${x_default_search_path}" + fi + done +fi + + +if test "${x_includes}" != NONE && test -n "${x_includes}"; then + C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"` +fi + +if test x"${x_includes}" = x; then + bitmapdir=/usr/include/X11/bitmaps +else + # accumulate include directories that have X11 bitmap subdirectories + bmd_acc="dummyval" + for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do + if test -d "${bmd}/X11/bitmaps"; then + bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps" + fi + if test -d "${bmd}/bitmaps"; then + bmd_acc="${bmd_acc}:${bmd}/bitmaps" + fi + done + if test ${bmd_acc} != "dummyval"; then + bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"` + fi +fi + +HAVE_NS=no +NS_IMPL_COCOA=no +NS_IMPL_GNUSTEP=no +tmp_CPPFLAGS="$CPPFLAGS" +tmp_CFLAGS="$CFLAGS" +CPPFLAGS="$CPPFLAGS -x objective-c" +CFLAGS="$CFLAGS -x objective-c" +TEMACS_LDFLAGS2="\${LDFLAGS}" +GNU_OBJC_CFLAGS= +if test "${with_ns}" != no; then + if test "${opsys}" = darwin; then + NS_IMPL_COCOA=yes + ns_appdir=`pwd`/nextstep/Emacs.app + ns_appbindir=${ns_appdir}/Contents/MacOS + ns_appresdir=${ns_appdir}/Contents/Resources + ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base + elif test -f $GNUSTEP_CONFIG_FILE; then + NS_IMPL_GNUSTEP=yes + ns_appdir=`pwd`/nextstep/Emacs.app + ns_appbindir=${ns_appdir} + ns_appresdir=${ns_appdir}/Resources + ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base + GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" + GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" + GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)" + GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)" + test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \ + GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}" + test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \ + GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}" + CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" + CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" + LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}" + LIB_STANDARD= + START_FILES= + TEMACS_LDFLAGS2= + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5 +$as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; } +if test "${emacs_cv_objc_exceptions+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0 +1; +#else +fail; +#endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + emacs_cv_objc_exceptions=yes +else + emacs_cv_objc_exceptions=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5 +$as_echo "$emacs_cv_objc_exceptions" >&6; } + if test $emacs_cv_objc_exceptions = yes; then + +$as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h + + GNU_OBJC_CFLAGS="-fobjc-exceptions" + fi + fi + + CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS" + + ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default" +if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then : + HAVE_NS=yes +else + as_fn_error "\`--with-ns' was specified, but the include + files are missing or cannot be compiled." "$LINENO" 5 +fi + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +NSInteger i; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ns_have_nsinteger=yes +else + ns_have_nsinteger=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ns_have_nsinteger = yes; then + +$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h + + fi +fi + + +INSTALL_ARCH_INDEP_EXTRA=install-etc +ns_self_contained=no +ns_frag=/dev/null +NS_OBJ= +NS_OBJC_OBJ= +if test "${HAVE_NS}" = yes; then + if test "$with_toolkit_scroll_bars" = "no"; then + as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5 + fi + + window_system=nextstep + with_xft=no + # set up packaging dirs + if test "${EN_NS_SELF_CONTAINED}" = yes; then + ns_self_contained=yes + prefix=${ns_appresdir} + exec_prefix=${ns_appbindir} + libexecdir="\${ns_appbindir}/libexec" + archlibdir="\${ns_appbindir}/libexec" + docdir="\${ns_appresdir}/etc" + etcdir="\${ns_appresdir}/etc" + infodir="\${ns_appresdir}/info" + mandir="\${ns_appresdir}/man" + lispdir="\${ns_appresdir}/lisp" + leimdir="\${ns_appresdir}/leim" + INSTALL_ARCH_INDEP_EXTRA= + fi + ns_frag=$srcdir/src/ns.mk + NS_OBJ="fontset.o fringe.o image.o" + NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o" +fi +CFLAGS="$tmp_CFLAGS" +CPPFLAGS="$tmp_CPPFLAGS" + + + + + + + +case "${window_system}" in + x11 ) + HAVE_X_WINDOWS=yes + HAVE_X11=yes + case "${with_x_toolkit}" in + athena | lucid ) USE_X_TOOLKIT=LUCID ;; + motif ) USE_X_TOOLKIT=MOTIF ;; + gtk ) with_gtk=yes + USE_X_TOOLKIT=none ;; + gtk3 ) with_gtk3=yes + USE_X_TOOLKIT=none ;; + no ) USE_X_TOOLKIT=none ;; + * ) USE_X_TOOLKIT=maybe ;; + esac + ;; + nextstep | none ) + HAVE_X_WINDOWS=no + HAVE_X11=no + USE_X_TOOLKIT=none + ;; +esac + +if test "$window_system" = none && test "X$with_x" != "Xno"; then + # Extract the first word of "X", so it can be a program name with args. +set dummy X; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$HAVE_XSERVER"; then + ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_HAVE_XSERVER="true" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false" +fi +fi +HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER +if test -n "$HAVE_XSERVER"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5 +$as_echo "$HAVE_XSERVER" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "$HAVE_XSERVER" = true || + test -n "$DISPLAY" || + test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then + as_fn_error "You seem to be running X, but no X development libraries +were found. You should install the relevant development files for X +and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make +sure you have development files for image handling, i.e. +tiff, gif, jpeg, png and xpm. +If you are sure you want Emacs compiled without X window support, pass + --without-x +to configure." "$LINENO" 5 + fi +fi + +### If we're using X11, we should use the X menu package. +HAVE_MENUS=no +case ${HAVE_X11} in + yes ) HAVE_MENUS=yes ;; +esac + +# Does the opsystem file prohibit the use of the GNU malloc? +# Assume not, until told otherwise. +GNU_MALLOC=yes + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5 +$as_echo_n "checking whether malloc is Doug Lea style... " >&6; } +if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + static void hook (void) {} +int +main () +{ +malloc_set_state (malloc_get_state ()); + __after_morecore_hook = hook; + __malloc_initialize_hook = hook; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + emacs_cv_var_doug_lea_malloc=yes +else + emacs_cv_var_doug_lea_malloc=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5 +$as_echo "$emacs_cv_var_doug_lea_malloc" >&6; } +doug_lea_malloc=$emacs_cv_var_doug_lea_malloc + + +system_malloc=no +case "$opsys" in + ## darwin ld insists on the use of malloc routines in the System framework. + darwin|sol2-10) system_malloc=yes ;; +esac + +if test "${system_malloc}" = "yes"; then + +$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h + + GNU_MALLOC=no + GNU_MALLOC_reason=" + (The GNU allocators don't work with this system configuration.)" + GMALLOC_OBJ= + VMLIMIT_OBJ= +else + test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o + VMLIMIT_OBJ=vm-limit.o +fi + + + +if test "$doug_lea_malloc" = "yes" ; then + if test "$GNU_MALLOC" = yes ; then + GNU_MALLOC_reason=" + (Using Doug Lea's new malloc from the GNU C Library.)" + fi + +$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h + + + ## Use mmap directly for allocating larger buffers. + ## FIXME this comes from src/s/{gnu,gnu-linux}.h: + ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif + ## Does the AC_FUNC_MMAP test below make this check unnecessary? + case "$opsys" in + gnu*) REL_ALLOC=no ;; + esac +fi + +if test x"${REL_ALLOC}" = x; then + REL_ALLOC=${GNU_MALLOC} +fi + +use_mmap_for_buffers=no +case "$opsys" in + cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;; +esac + + + + + + + + +for ac_func in getpagesize +do : + ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETPAGESIZE 1 +_ACEOF + +fi +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 +$as_echo_n "checking for working mmap... " >&6; } +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_mmap_fixed_mapped=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ + +#include +#include + +#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H +char *malloc (); +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +int +main () +{ + char *data, *data2, *data3; + const char *cdata2; + int i, pagesize; + int fd, fd2; + + pagesize = getpagesize (); + + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + return 1; + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + return 2; + if (write (fd, data, pagesize) != pagesize) + return 3; + close (fd); + + /* Next, check that the tail of a page is zero-filled. File must have + non-zero length, otherwise we risk SIGBUS for entire page. */ + fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd2 < 0) + return 4; + cdata2 = ""; + if (write (fd2, cdata2, 1) != 1) + return 5; + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + if (data2 == MAP_FAILED) + return 6; + for (i = 0; i < pagesize; ++i) + if (*(data2 + i)) + return 7; + close (fd2); + if (munmap (data2, pagesize)) + return 8; + + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + return 9; + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + return 10; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + return 11; + + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + return 12; + if (read (fd, data3, pagesize) != pagesize) + return 13; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + return 14; + close (fd); + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_mmap_fixed_mapped=yes +else + ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 +$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +$as_echo "#define HAVE_MMAP 1" >>confdefs.h + +fi +rm -f conftest.mmap conftest.txt + +if test $use_mmap_for_buffers = yes; then + +$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h + + REL_ALLOC=no +fi + +LIBS="$LIBS_SYSTEM $LIBS" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 +$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } +if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldnet $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dnet_ntoa (); +int +main () +{ +return dnet_ntoa (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dnet_dnet_ntoa=yes +else + ac_cv_lib_dnet_dnet_ntoa=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } +if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDNET 1 +_ACEOF + + LIBS="-ldnet $LIBS" + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5 +$as_echo_n "checking for main in -lXbsd... " >&6; } +if test "${ac_cv_lib_Xbsd_main+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXbsd $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Xbsd_main=yes +else + ac_cv_lib_Xbsd_main=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5 +$as_echo "$ac_cv_lib_Xbsd_main" >&6; } +if test "x$ac_cv_lib_Xbsd_main" = x""yes; then : + LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd" +fi + + +LIB_PTHREAD= + + + +if test "$ac_cv_header_pthread_h"; then + if test "$GMALLOC_OBJ" = gmalloc.o; then + emacs_pthread_function=pthread_atfork + else + emacs_pthread_function=pthread_self + fi + as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5 +$as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $emacs_pthread_function (); +int +main () +{ +return $emacs_pthread_function (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_ac_Lib=yes" +else + eval "$as_ac_Lib=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +eval ac_res=\$$as_ac_Lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +eval as_val=\$$as_ac_Lib + if test "x$as_val" = x""yes; then : + HAVE_PTHREAD=yes +fi + +fi +if test "$HAVE_PTHREAD" = yes; then + case "${canonical}" in + *-hpux*) ;; + *) LIB_PTHREAD="-lpthread" + LIBS="$LIB_PTHREAD $LIBS" ;; + esac + +$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5 +$as_echo_n "checking for cma_open in -lpthreads... " >&6; } +if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthreads $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char cma_open (); +int +main () +{ +return cma_open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthreads_cma_open=yes +else + ac_cv_lib_pthreads_cma_open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5 +$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; } +if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPTHREADS 1 +_ACEOF + + LIBS="-lpthreads $LIBS" + +fi + + +## Note: when using cpp in s/aix4.2.h, this definition depended on +## HAVE_LIBPTHREADS. That was not defined earlier in configure when +## the system file was sourced. Hence the value of LIBS_SYSTEM +## added to LIBS in configure would never contain the pthreads part, +## but the value used in Makefiles might. FIXME? +## +## -lpthreads seems to be necessary for Xlib in X11R6, and should +## be harmless on older versions of X where it happens to exist. +test "$opsys" = "aix4-2" && \ + test $ac_cv_lib_pthreads_cma_open = yes && \ + LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads" + + +case ${host_os} in +aix*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 +$as_echo_n "checking for -bbigtoc option... " >&6; } +if test "${gdb_cv_bigtoc+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + case $GCC in + yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; + *) gdb_cv_bigtoc=-bbigtoc ;; + esac + + LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +int i; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + gdb_cv_bigtoc= +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 +$as_echo "$gdb_cv_bigtoc" >&6; } + ;; +esac + +# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets +# used for the tests that follow. We set them back to REAL_CFLAGS and +# REAL_CPPFLAGS later on. + +REAL_CFLAGS="$CFLAGS" +REAL_CPPFLAGS="$CPPFLAGS" + +if test "${HAVE_X11}" = "yes"; then + DEFS="$C_SWITCH_X_SITE $DEFS" + LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE" + LIBS="-lX11 $LIBS" + CFLAGS="$C_SWITCH_X_SITE $CFLAGS" + CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS" + + # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. + # This is handled by LD_SWITCH_X_SITE_RPATH during the real build, + # but it's more convenient here to set LD_RUN_PATH since this + # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH. + if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then + LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH + export LD_RUN_PATH + fi + + if test "${opsys}" = "gnu-linux"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5 +$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +XOpenDisplay ("foo"); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + xgnu_linux_first_failure=no +else + xgnu_linux_first_failure=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "${xgnu_linux_first_failure}" = "yes"; then + OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE" + OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE" + OLD_CPPFLAGS="$CPPFLAGS" + OLD_LIBS="$LIBS" + LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout" + C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout" + CPPFLAGS="$CPPFLAGS -b i486-linuxaout" + LIBS="$LIBS -b i486-linuxaout" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +XOpenDisplay ("foo"); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + xgnu_linux_second_failure=no +else + xgnu_linux_second_failure=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "${xgnu_linux_second_failure}" = "yes"; then + # If we get the same failure with -b, there is no use adding -b. + # So take it out. This plays safe. + LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE" + C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE" + CPPFLAGS="$OLD_CPPFLAGS" + LIBS="$OLD_LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + fi + + # Reportedly, some broken Solaris systems have XKBlib.h but are missing + # header files included from there. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5 +$as_echo_n "checking for Xkb... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ +XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + emacs_xkb=yes +else + emacs_xkb=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5 +$as_echo "$emacs_xkb" >&6; } + if test $emacs_xkb = yes; then + +$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h + + fi + + for ac_func in XrmSetDatabase XScreenResourceString \ +XScreenNumberOfScreen +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +fi + +if test "${window_system}" = "x11"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5 +$as_echo_n "checking X11 version 6... " >&6; } + if test "${emacs_cv_x11_version_6+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +#if XlibSpecificationRelease < 6 +fail; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + emacs_cv_x11_version_6=yes +else + emacs_cv_x11_version_6=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + if test $emacs_cv_x11_version_6 = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 +$as_echo "6 or newer" >&6; } + +$as_echo "#define HAVE_X11R6 1" >>confdefs.h + + +$as_echo "#define HAVE_X_I18N 1" >>confdefs.h + + ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style + ## XIM support. + case "$opsys" in + sol2-*) : ;; + *) +$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h + + ;; + esac + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 +$as_echo "before 6" >&6; } + fi +fi + + +### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified. +HAVE_RSVG=no +if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then + if test "${with_rsvg}" != "no"; then + RSVG_REQUIRED=2.11.0 + RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED" + + + succeeded=no + + if test "$PKG_CONFIG" = "no" ; then + : + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5 +$as_echo_n "checking for $RSVG_MODULE... " >&6; } + + if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5 && + RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE" 2>&5` && + RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE" 2>&5`; then + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"` + RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5 +$as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; } + succeeded=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + RSVG_CFLAGS="" + RSVG_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + HAVE_RSVG=yes + else + : + fi + + + + + if test $HAVE_RSVG = yes; then + +$as_echo "#define HAVE_RSVG 1" >>confdefs.h + + CFLAGS="$CFLAGS $RSVG_CFLAGS" + LIBS="$RSVG_LIBS $LIBS" + fi + fi +fi + +HAVE_IMAGEMAGICK=no +if test "${HAVE_X11}" = "yes"; then + if test "${with_imagemagick}" != "no"; then + ## 6.2.8 is the earliest version known to work, but earlier versions + ## might work - let us know if you find one. + ## 6.0.7 does not work. See bug#7955. + IMAGEMAGICK_MODULE="Wand >= 6.2.8" + + succeeded=no + + if test "$PKG_CONFIG" = "no" ; then + : + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5 +$as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; } + + if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5 && + IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE" 2>&5` && + IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE" 2>&5`; then + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"` + IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5 +$as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; } + succeeded=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + IMAGEMAGICK_CFLAGS="" + IMAGEMAGICK_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + HAVE_IMAGEMAGICK=yes + else + : + fi + + + + + if test $HAVE_IMAGEMAGICK = yes; then + +$as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h + + CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS" + LIBS="$IMAGEMAGICK_LIBS $LIBS" + for ac_func in MagickExportImagePixels MagickMergeImageLayers +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + fi + fi +fi + + +HAVE_GTK=no +GTK_OBJ= +if test "${with_gtk3}" = "yes"; then + GLIB_REQUIRED=2.28 + GTK_REQUIRED=3.0 + GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" + + + succeeded=no + + if test "$PKG_CONFIG" = "no" ; then + pkg_check_gtk=no + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 +$as_echo_n "checking for $GTK_MODULES... " >&6; } + + if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 && + GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` && + GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"` + GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5 +$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; } + succeeded=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + GTK_CFLAGS="" + GTK_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + pkg_check_gtk=yes + else + pkg_check_gtk=no + fi + + if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then + as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 + fi + +$as_echo "#define HAVE_GTK3 1" >>confdefs.h + + GTK_OBJ=emacsgtkfixed.o +fi + +if test "$pkg_check_gtk" != "yes"; then + HAVE_GTK=no +if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then + GLIB_REQUIRED=2.10 + GTK_REQUIRED=2.10 + GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" + + + succeeded=no + + if test "$PKG_CONFIG" = "no" ; then + pkg_check_gtk=no + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 +$as_echo_n "checking for $GTK_MODULES... " >&6; } + + if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 && + GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` && + GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"` + GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5 +$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; } + succeeded=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + GTK_CFLAGS="" + GTK_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + pkg_check_gtk=yes + else + pkg_check_gtk=no + fi + + if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then + as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 + fi +fi +fi + +if test x"$pkg_check_gtk" = xyes; then + + + + C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$GTK_LIBS $LIBS" + GTK_COMPILES=no + for ac_func in gtk_main +do : + ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main" +if test "x$ac_cv_func_gtk_main" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GTK_MAIN 1 +_ACEOF + GTK_COMPILES=yes +fi +done + + if test "${GTK_COMPILES}" != "yes"; then + if test "$USE_X_TOOLKIT" != "maybe"; then + as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5; + fi + else + HAVE_GTK=yes + +$as_echo "#define USE_GTK 1" >>confdefs.h + + GTK_OBJ="gtkutil.o $GTK_OBJ" + USE_X_TOOLKIT=none + if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then + : + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with + closing open displays. This is no problem if you just use + one display, but if you use more than one and close one of them + Emacs may crash." >&5 +$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with + closing open displays. This is no problem if you just use + one display, but if you use more than one and close one of them + Emacs may crash." >&2;} + sleep 3 + fi + fi + +fi + + + +if test "${HAVE_GTK}" = "yes"; then + + if test "$with_toolkit_scroll_bars" != no; then + with_toolkit_scroll_bars=yes + fi + + HAVE_GTK_FILE_SELECTION=no + ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default +#include +" +if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then : + HAVE_GTK_FILE_SELECTION=yes +else + HAVE_GTK_FILE_SELECTION=no +fi + + if test "$HAVE_GTK_FILE_SELECTION" = yes; then + for ac_func in gtk_file_selection_new +do : + ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new" +if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GTK_FILE_SELECTION_NEW 1 +_ACEOF + +fi +done + + fi + + + for ac_func in gtk_widget_get_window gtk_widget_set_has_window \ + gtk_dialog_get_action_area gtk_widget_get_sensitive \ + gtk_widget_get_mapped gtk_adjustment_get_page_size \ + gtk_orientable_set_orientation \ + gtk_window_set_has_resize_grip +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +fi + +HAVE_DBUS=no +DBUS_OBJ= +if test "${with_dbus}" = "yes"; then + + succeeded=no + + if test "$PKG_CONFIG" = "no" ; then + HAVE_DBUS=no + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5 +$as_echo_n "checking for dbus-1 >= 1.0... " >&6; } + + if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5 && + DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0" 2>&5` && + DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0" 2>&5`; then + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"` + DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5 +$as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; } + succeeded=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + DBUS_CFLAGS="" + DBUS_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + HAVE_DBUS=yes + else + HAVE_DBUS=no + fi + + if test "$HAVE_DBUS" = yes; then + LIBS="$LIBS $DBUS_LIBS" + +$as_echo "#define HAVE_DBUS 1" >>confdefs.h + + for ac_func in dbus_watch_get_unix_fd \ + dbus_type_is_valid \ + dbus_validate_bus_name \ + dbus_validate_path \ + dbus_validate_interface \ + dbus_validate_member +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + DBUS_OBJ=dbusbind.o + fi +fi + + +HAVE_GSETTINGS=no +if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then + + succeeded=no + + if test "$PKG_CONFIG" = "no" ; then + HAVE_GSETTINGS=no + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5 +$as_echo_n "checking for gio-2.0 >= 2.26... " >&6; } + + if $PKG_CONFIG --exists "gio-2.0 >= 2.26" 2>&5 && + GSETTINGS_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.26" 2>&5` && + GSETTINGS_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.26" 2>&5`; then + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"` + GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5 +$as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; } + succeeded=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + GSETTINGS_CFLAGS="" + GSETTINGS_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + GSETTINGS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 >= 2.26"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + HAVE_GSETTINGS=yes + else + HAVE_GSETTINGS=no + fi + + if test "$HAVE_GSETTINGS" = "yes"; then + +$as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h + + SETTINGS_CFLAGS="$GSETTINGS_CFLAGS" + SETTINGS_LIBS="$GSETTINGS_LIBS" + fi +fi + +HAVE_GCONF=no +if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then + + succeeded=no + + if test "$PKG_CONFIG" = "no" ; then + HAVE_GCONF=no + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5 +$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; } + + if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5 && + GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13" 2>&5` && + GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13" 2>&5`; then + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"` + GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5 +$as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; } + succeeded=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + GCONF_CFLAGS="" + GCONF_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + HAVE_GCONF=yes + else + HAVE_GCONF=no + fi + + if test "$HAVE_GCONF" = yes; then + +$as_echo "#define HAVE_GCONF 1" >>confdefs.h + + SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS" + SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS" + fi +fi + +if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then + SAVE_CFLAGS="$CFLAGS" + SAVE_LIBS="$LIBS" + CFLAGS="$SETTINGS_CFLAGS $CFLAGS" + LIBS="$SETTINGS_LIBS $LIBS" + for ac_func in g_type_init +do : + ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init" +if test "x$ac_cv_func_g_type_init" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_G_TYPE_INIT 1 +_ACEOF + +fi +done + + CFLAGS="$SAVE_CFLAGS" + LIBS="$SAVE_LIBS" +fi + + + + +HAVE_LIBSELINUX=no +LIBSELINUX_LIBS= +if test "${with_selinux}" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5 +$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; } +if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lselinux $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char lgetfilecon (); +int +main () +{ +return lgetfilecon (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_selinux_lgetfilecon=yes +else + ac_cv_lib_selinux_lgetfilecon=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5 +$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; } +if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then : + HAVE_LIBSELINUX=yes +else + HAVE_LIBSELINUX=no +fi + + if test "$HAVE_LIBSELINUX" = yes; then + +$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h + + LIBSELINUX_LIBS=-lselinux + fi +fi + + +HAVE_GNUTLS=no +HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no +if test "${with_gnutls}" = "yes" ; then + + succeeded=no + + if test "$PKG_CONFIG" = "no" ; then + HAVE_GNUTLS=no + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5 +$as_echo_n "checking for gnutls >= 2.6.6... " >&6; } + + if $PKG_CONFIG --exists "gnutls >= 2.6.6" 2>&5 && + LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.6.6" 2>&5` && + LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.6.6" 2>&5`; then + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"` + LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5 +$as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; } + succeeded=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + LIBGNUTLS_CFLAGS="" + LIBGNUTLS_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.6.6"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + HAVE_GNUTLS=yes + else + HAVE_GNUTLS=no + fi + + if test "${HAVE_GNUTLS}" = "yes"; then + +$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h + + fi + + CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" + LIBS="$LIBGNUTLS_LIBS $LIBS" + for ac_func in gnutls_certificate_set_verify_function +do : + ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function" +if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1 +_ACEOF + HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes +fi +done + + + if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then + +$as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h + + fi +fi + + + + +HAVE_XAW3D=no +LUCID_LIBW= +if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then + if test "$with_xaw3d" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 +$as_echo_n "checking for xaw3d... " >&6; } + if test "${emacs_cv_xaw3d+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5 +$as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; } +if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXaw3d $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XawScrollbarSetThumb (); +int +main () +{ +return XawScrollbarSetThumb (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes +else + ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5 +$as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; } +if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then : + emacs_cv_xaw3d=yes +else + emacs_cv_xaw3d=no +fi + +else + emacs_cv_xaw3d=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + else + emacs_cv_xaw3d=no + fi + if test $emacs_cv_xaw3d = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 +$as_echo "yes; using Lucid toolkit" >&6; } + USE_X_TOOLKIT=LUCID + HAVE_XAW3D=yes + LUCID_LIBW=-lXaw3d + +$as_echo "#define HAVE_XAW3D 1" >>confdefs.h + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5 +$as_echo_n "checking for libXaw... " >&6; } + if test "${emacs_cv_xaw+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + emacs_cv_xaw=yes +else + emacs_cv_xaw=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + if test $emacs_cv_xaw = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 +$as_echo "yes; using Lucid toolkit" >&6; } + USE_X_TOOLKIT=LUCID + LUCID_LIBW=-lXaw + elif test x"${USE_X_TOOLKIT}" = xLUCID; then + as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5 + else + as_fn_error "No X toolkit could be found. +If you are sure you want Emacs compiled without an X toolkit, pass + --with-x-toolkit=no +to configure. Otherwise, install the development libraries for the toolkit +that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5 + fi + fi +fi + +X_TOOLKIT_TYPE=$USE_X_TOOLKIT + +LIBXTR6= +if test "${USE_X_TOOLKIT}" != "none"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5 +$as_echo_n "checking X11 toolkit version... " >&6; } + if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +#if XtSpecificationRelease < 6 +fail; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + emacs_cv_x11_toolkit_version_6=yes +else + emacs_cv_x11_toolkit_version_6=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6 + if test $emacs_cv_x11_toolkit_version_6 = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 +$as_echo "6 or newer" >&6; } + +$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h + + LIBXTR6="-lSM -lICE" + case "$opsys" in + ## Use libw.a along with X11R6 Xt. + unixware) LIBXTR6="$LIBXTR6 -lw" ;; + esac + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 +$as_echo "before 6" >&6; } + fi + + OLDLIBS="$LIBS" + if test x$HAVE_X11XTR6 = xyes; then + LIBS="-lXt -lSM -lICE $LIBS" + else + LIBS="-lXt $LIBS" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5 +$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; } +if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXmu $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XmuConvertStandardSelection (); +int +main () +{ +return XmuConvertStandardSelection (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Xmu_XmuConvertStandardSelection=yes +else + ac_cv_lib_Xmu_XmuConvertStandardSelection=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5 +$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; } +if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBXMU 1 +_ACEOF + + LIBS="-lXmu $LIBS" + +fi + + test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS" + fi + + +LIBXMU=-lXmu +case $opsys in + ## These systems don't supply Xmu. + hpux* | aix4-2 ) + test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU= + ;; +esac + + +# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D. +if test "${HAVE_X11}" = "yes"; then + if test "${USE_X_TOOLKIT}" != "none"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5 +$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; } +if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXext $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XShapeQueryExtension (); +int +main () +{ +return XShapeQueryExtension (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Xext_XShapeQueryExtension=yes +else + ac_cv_lib_Xext_XShapeQueryExtension=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5 +$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; } +if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBXEXT 1 +_ACEOF + + LIBS="-lXext $LIBS" + +fi + + fi +fi + +LIBXP= +if test "${USE_X_TOOLKIT}" = "MOTIF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5 +$as_echo_n "checking for Motif version 2.1... " >&6; } +if test "${emacs_cv_motif_version_2_1+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) +int x = 5; +#else +Motif version prior to 2.1. +#endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + emacs_cv_motif_version_2_1=yes +else + emacs_cv_motif_version_2_1=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5 +$as_echo "$emacs_cv_motif_version_2_1" >&6; } + if test $emacs_cv_motif_version_2_1 = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5 +$as_echo_n "checking for XpCreateContext in -lXp... " >&6; } +if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXp $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XpCreateContext (); +int +main () +{ +return XpCreateContext (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Xp_XpCreateContext=yes +else + ac_cv_lib_Xp_XpCreateContext=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5 +$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; } +if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then : + LIBXP=-lXp +fi + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5 +$as_echo_n "checking for LessTif where some systems put it... " >&6; } +if test "${emacs_cv_lesstif+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # We put this in CFLAGS temporarily to precede other -I options + # that might be in CFLAGS temporarily. + # We put this in CPPFLAGS where it precedes the other -I options. + OLD_CPPFLAGS=$CPPFLAGS + OLD_CFLAGS=$CFLAGS + CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS" + CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int x = 5; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + emacs_cv_lesstif=yes +else + emacs_cv_lesstif=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5 +$as_echo "$emacs_cv_lesstif" >&6; } + if test $emacs_cv_lesstif = yes; then + # Make sure this -I option remains in CPPFLAGS after it is set + # back to REAL_CPPFLAGS. + # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not + # have those other -I options anyway. Ultimately, having this + # directory ultimately in CPPFLAGS will be enough. + REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS" + LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS" + else + CFLAGS=$OLD_CFLAGS + CPPFLAGS=$OLD_CPPFLAGS + fi + fi + ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default" +if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then : + +else + as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5 +fi + + +fi + + +USE_TOOLKIT_SCROLL_BARS=no +if test "${with_toolkit_scroll_bars}" != "no"; then + if test "${USE_X_TOOLKIT}" != "none"; then + if test "${USE_X_TOOLKIT}" = "MOTIF"; then + $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h + + HAVE_XAW3D=no + USE_TOOLKIT_SCROLL_BARS=yes + elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then + $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h + + USE_TOOLKIT_SCROLL_BARS=yes + fi + elif test "${HAVE_GTK}" = "yes"; then + $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h + + USE_TOOLKIT_SCROLL_BARS=yes + elif test "${HAVE_NS}" = "yes"; then + $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h + + USE_TOOLKIT_SCROLL_BARS=yes + fi +fi + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include +int +main () +{ +XIMProc callback; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + HAVE_XIM=yes + +$as_echo "#define HAVE_XIM 1" >>confdefs.h + +else + HAVE_XIM=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + +if test "${with_xim}" != "no"; then + +$as_echo "#define USE_XIM 1" >>confdefs.h + +fi + + +if test "${HAVE_XIM}" != "no"; then + late_CFLAGS=$CFLAGS + if test "$GCC" = yes; then + CFLAGS="$CFLAGS --pedantic-errors" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +int +main () +{ +Display *display; +XrmDatabase db; +char *res_name; +char *res_class; +XIMProc callback; +XPointer *client_data; +#ifndef __GNUC__ +/* If we're not using GCC, it's probably not XFree86, and this is + probably right, but we can't use something like --pedantic-errors. */ +extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*, + char*, XIMProc, XPointer*); +#endif +(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback, + client_data); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + emacs_cv_arg6_star=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$emacs_cv_arg6_star" = yes; then + $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h + + else + $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h + + fi + CFLAGS=$late_CFLAGS +fi + +### Start of font-backend (under any platform) section. +# (nothing here yet -- this is a placeholder) +### End of font-backend (under any platform) section. + +### Start of font-backend (under X11) section. +if test "${HAVE_X11}" = "yes"; then + + succeeded=no + + if test "$PKG_CONFIG" = "no" ; then + HAVE_FC=no + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5 +$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; } + + if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5 && + FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0" 2>&5` && + FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0" 2>&5`; then + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"` + FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5 +$as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; } + succeeded=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + FONTCONFIG_CFLAGS="" + FONTCONFIG_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + HAVE_FC=yes + else + HAVE_FC=no + fi + + + ## Use -lXft if available, unless `--with-xft=no'. + HAVE_XFT=maybe + if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then + with_xft="no"; + fi + if test "x${with_xft}" != "xno"; then + + + succeeded=no + + if test "$PKG_CONFIG" = "no" ; then + HAVE_XFT=no + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5 +$as_echo_n "checking for xft >= 0.13.0... " >&6; } + + if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5 && + XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0" 2>&5` && + XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0" 2>&5`; then + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"` + XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5 +$as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; } + succeeded=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + XFT_CFLAGS="" + XFT_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + : + else + HAVE_XFT=no + fi + + ## Because xftfont.c uses XRenderQueryExtension, we also + ## need to link to -lXrender. + HAVE_XRENDER=no + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5 +$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; } +if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXrender $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XRenderQueryExtension (); +int +main () +{ +return XRenderQueryExtension (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Xrender_XRenderQueryExtension=yes +else + ac_cv_lib_Xrender_XRenderQueryExtension=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5 +$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; } +if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then : + HAVE_XRENDER=yes +fi + + if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then + OLD_CPPFLAGS="$CPPFLAGS" + OLD_CFLAGS="$CFLAGS" + OLD_LIBS="$LIBS" + CPPFLAGS="$CPPFLAGS $XFT_CFLAGS" + CFLAGS="$CFLAGS $XFT_CFLAGS" + XFT_LIBS="-lXrender $XFT_LIBS" + LIBS="$XFT_LIBS $LIBS" + ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default" +if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5 +$as_echo_n "checking for XftFontOpen in -lXft... " >&6; } +if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXft $XFT_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XftFontOpen (); +int +main () +{ +return XftFontOpen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Xft_XftFontOpen=yes +else + ac_cv_lib_Xft_XftFontOpen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5 +$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; } +if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then : + HAVE_XFT=yes +fi + +fi + + + + if test "${HAVE_XFT}" = "yes"; then + +$as_echo "#define HAVE_XFT 1" >>confdefs.h + + + C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS" + else + CPPFLAGS="$OLD_CPPFLAGS" + CFLAGS="$OLD_CFLAGS" + LIBS="$OLD_LIBS" + fi # "${HAVE_XFT}" = "yes" + fi # "$HAVE_XFT" != no + fi # "x${with_xft}" != "xno" + + ## We used to allow building with FreeType and without Xft. + ## However, the ftx font backend driver is not in good shape. + if test "$HAVE_XFT" != "yes"; then + HAVE_XFT=no + HAVE_FREETYPE=no + else + + succeeded=no + + if test "$PKG_CONFIG" = "no" ; then + HAVE_FREETYPE=no + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5 +$as_echo_n "checking for freetype2... " >&6; } + + if $PKG_CONFIG --exists "freetype2" 2>&5 && + FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>&5` && + FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>&5`; then + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"` + FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5 +$as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; } + succeeded=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + FREETYPE_CFLAGS="" + FREETYPE_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + HAVE_FREETYPE=yes + else + HAVE_FREETYPE=no + fi + + + test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5 + fi + + HAVE_LIBOTF=no + if test "${HAVE_FREETYPE}" = "yes"; then + +$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h + + if test "${with_libotf}" != "no"; then + + succeeded=no + + if test "$PKG_CONFIG" = "no" ; then + HAVE_LIBOTF=no + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5 +$as_echo_n "checking for libotf... " >&6; } + + if $PKG_CONFIG --exists "libotf" 2>&5 && + LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf" 2>&5` && + LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf" 2>&5`; then + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"` + LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5 +$as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; } + succeeded=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + LIBOTF_CFLAGS="" + LIBOTF_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + HAVE_LIBOTF=yes + else + HAVE_LIBOTF=no + fi + + if test "$HAVE_LIBOTF" = "yes"; then + +$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5 +$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; } +if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lotf $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char OTF_get_variation_glyphs (); +int +main () +{ +return OTF_get_variation_glyphs (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_otf_OTF_get_variation_glyphs=yes +else + ac_cv_lib_otf_OTF_get_variation_glyphs=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5 +$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; } +if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then : + HAVE_OTF_GET_VARIATION_GLYPHS=yes +else + HAVE_OTF_GET_VARIATION_GLYPHS=no +fi + + if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then + +$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h + + fi + fi + fi + fi + + HAVE_M17N_FLT=no + if test "${HAVE_LIBOTF}" = yes; then + if test "${with_m17n_flt}" != "no"; then + + succeeded=no + + if test "$PKG_CONFIG" = "no" ; then + HAVE_M17N_FLT=no + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5 +$as_echo_n "checking for m17n-flt... " >&6; } + + if $PKG_CONFIG --exists "m17n-flt" 2>&5 && + M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt" 2>&5` && + M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt" 2>&5`; then + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"` + M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5 +$as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; } + succeeded=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + M17N_FLT_CFLAGS="" + M17N_FLT_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + HAVE_M17N_FLT=yes + else + HAVE_M17N_FLT=no + fi + + if test "$HAVE_M17N_FLT" = "yes"; then + +$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h + + fi + fi + fi +else + HAVE_XFT=no + HAVE_FREETYPE=no + HAVE_LIBOTF=no + HAVE_M17N_FLT=no +fi + +### End of font-backend (under X11) section. + + + + + + + + + + +### Use -lXpm if available, unless `--with-xpm=no'. +HAVE_XPM=no +LIBXPM= +if test "${HAVE_X11}" = "yes"; then + if test "${with_xpm}" != "no"; then + ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" +if test "x$ac_cv_header_X11_xpm_h" = x""yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5 +$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; } +if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXpm -lX11 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char XpmReadFileToPixmap (); +int +main () +{ +return XpmReadFileToPixmap (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_Xpm_XpmReadFileToPixmap=yes +else + ac_cv_lib_Xpm_XpmReadFileToPixmap=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5 +$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; } +if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then : + HAVE_XPM=yes +fi + +fi + + + if test "${HAVE_XPM}" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5 +$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "X11/xpm.h" +#ifndef XpmReturnAllocPixels +no_return_alloc_pixels +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then : + HAVE_XPM=no +else + HAVE_XPM=yes +fi +rm -f conftest* + + + if test "${HAVE_XPM}" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + fi + fi + + if test "${HAVE_XPM}" = "yes"; then + +$as_echo "#define HAVE_XPM 1" >>confdefs.h + + LIBXPM=-lXpm + fi +fi + + +### Use -ljpeg if available, unless `--with-jpeg=no'. +HAVE_JPEG=no +LIBJPEG= +if test "${HAVE_X11}" = "yes"; then + if test "${with_jpeg}" != "no"; then + ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default" +if test "x$ac_cv_header_jerror_h" = x""yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5 +$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; } +if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ljpeg $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char jpeg_destroy_compress (); +int +main () +{ +return jpeg_destroy_compress (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_jpeg_jpeg_destroy_compress=yes +else + ac_cv_lib_jpeg_jpeg_destroy_compress=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5 +$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; } +if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then : + HAVE_JPEG=yes +fi + +fi + + + fi + + if test "${HAVE_JPEG}" = "yes"; then + $as_echo "#define HAVE_JPEG 1" >>confdefs.h + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + version=JPEG_LIB_VERSION + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then : + $as_echo "#define HAVE_JPEG 1" >>confdefs.h + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5 +$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;} + HAVE_JPEG=no +fi +rm -f conftest* + + fi + if test "${HAVE_JPEG}" = "yes"; then + LIBJPEG=-ljpeg + fi +fi + + +### Use -lpng if available, unless `--with-png=no'. +HAVE_PNG=no +LIBPNG= +if test "${HAVE_X11}" = "yes"; then + if test "${with_png}" != "no"; then + # Debian unstable as of July 2003 has multiple libpngs, and puts png.h + # in /usr/include/libpng. + for ac_header in png.h libpng/png.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + break +fi + +done + + if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5 +$as_echo_n "checking for png_get_channels in -lpng... " >&6; } +if test "${ac_cv_lib_png_png_get_channels+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpng -lz -lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char png_get_channels (); +int +main () +{ +return png_get_channels (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_png_png_get_channels=yes +else + ac_cv_lib_png_png_get_channels=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5 +$as_echo "$ac_cv_lib_png_png_get_channels" >&6; } +if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then : + HAVE_PNG=yes +fi + + fi + fi + + if test "${HAVE_PNG}" = "yes"; then + +$as_echo "#define HAVE_PNG 1" >>confdefs.h + + LIBPNG="-lpng -lz -lm" + + ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H + # include + #else + # include + #endif + +" +if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then : + +else + +$as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h + +fi + + fi +fi + + +### Use -ltiff if available, unless `--with-tiff=no'. +HAVE_TIFF=no +LIBTIFF= +if test "${HAVE_X11}" = "yes"; then + if test "${with_tiff}" != "no"; then + ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" +if test "x$ac_cv_header_tiffio_h" = x""yes; then : + tifflibs="-lz -lm" + # At least one tiff package requires the jpeg library. + if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5 +$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; } +if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltiff $tifflibs $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char TIFFGetVersion (); +int +main () +{ +return TIFFGetVersion (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_tiff_TIFFGetVersion=yes +else + ac_cv_lib_tiff_TIFFGetVersion=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5 +$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; } +if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then : + HAVE_TIFF=yes +fi + +fi + + + fi + + if test "${HAVE_TIFF}" = "yes"; then + +$as_echo "#define HAVE_TIFF 1" >>confdefs.h + + LIBTIFF=-ltiff + fi +fi + + +### Use -lgif or -lungif if available, unless `--with-gif=no'. +HAVE_GIF=no +LIBGIF= +if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then + ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" +if test "x$ac_cv_header_gif_lib_h" = x""yes; then : + # EGifPutExtensionLast only exists from version libungif-4.1.0b1. +# Earlier versions can crash Emacs. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5 +$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; } +if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgif $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char EGifPutExtensionLast (); +int +main () +{ +return EGifPutExtensionLast (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gif_EGifPutExtensionLast=yes +else + ac_cv_lib_gif_EGifPutExtensionLast=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5 +$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; } +if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then : + HAVE_GIF=yes +else + HAVE_GIF=maybe +fi + +fi + + + + if test "$HAVE_GIF" = yes; then + LIBGIF=-lgif + elif test "$HAVE_GIF" = maybe; then +# If gif_lib.h but no libgif, try libungif. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5 +$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; } +if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lungif $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char EGifPutExtensionLast (); +int +main () +{ +return EGifPutExtensionLast (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ungif_EGifPutExtensionLast=yes +else + ac_cv_lib_ungif_EGifPutExtensionLast=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5 +$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; } +if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then : + HAVE_GIF=yes +else + HAVE_GIF=no +fi + + test "$HAVE_GIF" = yes && LIBGIF=-lungif + fi + + if test "${HAVE_GIF}" = "yes"; then + +$as_echo "#define HAVE_GIF 1" >>confdefs.h + + fi +fi + + +if test "${HAVE_X11}" = "yes"; then + MISSING="" + WITH_NO="" + test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" && + MISSING="libXpm" && WITH_NO="--with-xpm=no" + test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" && + MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no" + test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" && + MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no" + test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" && + MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no" + test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" && + MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no" + + if test "X${MISSING}" != X; then + as_fn_error "The following required libraries were not found: + $MISSING +Maybe some development libraries/packages are missing? +If you don't want to link with them give + $WITH_NO +as options to configure" "$LINENO" 5 + fi +fi + +### Use -lgpm if available, unless `--with-gpm=no'. +HAVE_GPM=no +LIBGPM= +if test "${with_gpm}" != "no"; then + ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default" +if test "x$ac_cv_header_gpm_h" = x""yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5 +$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; } +if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgpm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char Gpm_Open (); +int +main () +{ +return Gpm_Open (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gpm_Gpm_Open=yes +else + ac_cv_lib_gpm_Gpm_Open=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5 +$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; } +if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then : + HAVE_GPM=yes +fi + +fi + + + + if test "${HAVE_GPM}" = "yes"; then + +$as_echo "#define HAVE_GPM 1" >>confdefs.h + + LIBGPM=-lgpm + fi +fi + + + + + + +GNUSTEP_CFLAGS= +### Use NeXTstep API to implement GUI. +if test "${HAVE_NS}" = "yes"; then + +$as_echo "#define HAVE_NS 1" >>confdefs.h + + if test "${NS_IMPL_COCOA}" = "yes"; then + +$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h + + fi + if test "${NS_IMPL_GNUSTEP}" = "yes"; then + +$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h + + # See also .m.o rule in Makefile.in */ + # FIXME: are all these flags really needed? Document here why. */ + GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" + ## Extra CFLAGS applied to src/*.m files. + GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" + fi + # We also have mouse menus. + HAVE_MENUS=yes + OTHER_FILES=ns-app +fi + + +### Use session management (-lSM -lICE) if available +HAVE_X_SM=no +LIBXSM= +if test "${HAVE_X11}" = "yes"; then + ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default" +if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5 +$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; } +if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lSM -lICE $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char SmcOpenConnection (); +int +main () +{ +return SmcOpenConnection (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_SM_SmcOpenConnection=yes +else + ac_cv_lib_SM_SmcOpenConnection=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5 +$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; } +if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then : + HAVE_X_SM=yes +fi + +fi + + + + if test "${HAVE_X_SM}" = "yes"; then + +$as_echo "#define HAVE_X_SM 1" >>confdefs.h + + LIBXSM="-lSM -lICE" + case "$LIBS" in + *-lSM*) ;; + *) LIBS="$LIBXSM $LIBS" ;; + esac + fi +fi + + +### Use libxml (-lxml2) if available +HAVE_LIBXML2=no +if test "${with_xml2}" != "no"; then + ### I'm not sure what the version number should be, so I just guessed. + + succeeded=no + + if test "$PKG_CONFIG" = "no" ; then + HAVE_LIBXML2=no + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5 +$as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; } + + if $PKG_CONFIG --exists "libxml-2.0 > 2.6.17" 2>&5 && + LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.6.17" 2>&5` && + LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.6.17" 2>&5`; then + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"` + LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5 +$as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; } + succeeded=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + LIBXML2_CFLAGS="" + LIBXML2_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 > 2.6.17"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + HAVE_LIBXML2=yes + else + HAVE_LIBXML2=no + fi + + if test "${HAVE_LIBXML2}" = "yes"; then + LIBS="$LIBXML2_LIBS $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5 +$as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; } +if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lxml2 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char htmlReadMemory (); +int +main () +{ +return htmlReadMemory (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_xml2_htmlReadMemory=yes +else + ac_cv_lib_xml2_htmlReadMemory=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5 +$as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; } +if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then : + HAVE_LIBXML2=yes +else + HAVE_LIBXML2=no +fi + + if test "${HAVE_LIBXML2}" = "yes"; then + +$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h + + else + LIBXML2_LIBS="" + LIBXML2_CFLAGS="" + fi + fi +fi + + + +# If netdb.h doesn't declare h_errno, we must declare it by hand. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5 +$as_echo_n "checking whether netdb declares h_errno... " >&6; } +if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +return h_errno; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + emacs_cv_netdb_declares_h_errno=yes +else + emacs_cv_netdb_declares_h_errno=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5 +$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; } +if test $emacs_cv_netdb_declares_h_errno = yes; then + +$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h + +fi + +# fmod, logb, and frexp are found in -lm on most systems. +# On HPUX 9.01, -lm does not contain logb, so check for sqrt. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 +$as_echo_n "checking for sqrt in -lm... " >&6; } +if test "${ac_cv_lib_m_sqrt+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sqrt (); +int +main () +{ +return sqrt (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_sqrt=yes +else + ac_cv_lib_m_sqrt=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 +$as_echo "$ac_cv_lib_m_sqrt" >&6; } +if test "x$ac_cv_lib_m_sqrt" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +fi + + +# Check for mail-locking functions in a "mail" library. Probably this should +# have the same check as for liblockfile below. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5 +$as_echo_n "checking for maillock in -lmail... " >&6; } +if test "${ac_cv_lib_mail_maillock+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmail $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char maillock (); +int +main () +{ +return maillock (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mail_maillock=yes +else + ac_cv_lib_mail_maillock=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5 +$as_echo "$ac_cv_lib_mail_maillock" >&6; } +if test "x$ac_cv_lib_mail_maillock" = x""yes; then : + have_mail=yes +else + have_mail=no +fi + +if test $have_mail = yes; then + LIBS_MAIL=-lmail + LIBS="$LIBS_MAIL $LIBS" + +$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h + +else + LIBS_MAIL= +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5 +$as_echo_n "checking for maillock in -llockfile... " >&6; } +if test "${ac_cv_lib_lockfile_maillock+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-llockfile $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char maillock (); +int +main () +{ +return maillock (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_lockfile_maillock=yes +else + ac_cv_lib_lockfile_maillock=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5 +$as_echo "$ac_cv_lib_lockfile_maillock" >&6; } +if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then : + have_lockfile=yes +else + have_lockfile=no +fi + +if test $have_lockfile = yes; then + LIBS_MAIL=-llockfile + LIBS="$LIBS_MAIL $LIBS" + +$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h + +else +# If we have the shared liblockfile, assume we must use it for mail +# locking (e.g. Debian). If we couldn't link against liblockfile +# (no liblockfile.a installed), ensure that we don't need to. + # Extract the first word of "liblockfile.so", so it can be a program name with args. +set dummy liblockfile.so; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_liblockfile+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$liblockfile"; then + ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_liblockfile="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no" +fi +fi +liblockfile=$ac_cv_prog_liblockfile +if test -n "$liblockfile"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5 +$as_echo "$liblockfile" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test $ac_cv_prog_liblockfile = yes; then + as_fn_error "Shared liblockfile found but can't link against it. +This probably means that movemail could lose mail. +There may be a \`development' package to install containing liblockfile." "$LINENO" 5 + fi +fi + + + + + +## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to +## interlock access to the mail spool. The alternative is a lock file named +## /usr/spool/mail/$USER.lock. +mail_lock=no +case "$opsys" in + aix4-2) mail_lock="lockf" ;; + + gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;; + + ## On GNU/Linux systems, both methods are used by various mail programs. + ## I assume most people are using newer mailers that have heard of flock. + ## Change this if you need to. + ## Debian contains a patch which says: ``On Debian/GNU/Linux systems, + ## configure gets the right answers, and that means *NOT* using flock. + ## Using flock is guaranteed to be the wrong thing. See Debian Policy + ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the + ## Debian maintainer hasn't provided a clean fix for Emacs. + ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and + ## HAVE_MAILLOCK_H are defined, so the following appears to be the + ## correct logic. -- fx + ## We must check for HAVE_LIBLOCKFILE too, as movemail does. + ## liblockfile is a Free Software replacement for libmail, used on + ## Debian systems and elsewhere. -rfr. + gnu-*) + mail_lock="flock" + if test $have_mail = yes || test $have_lockfile = yes; then + test $ac_cv_header_maillock_h = yes && mail_lock=no + fi + ;; +esac + +BLESSMAIL_TARGET= +case "$mail_lock" in + flock) +$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h + ;; + + lockf) +$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h + ;; + + *) BLESSMAIL_TARGET="need-blessmail" ;; +esac + + + +for ac_func in gethostname \ +closedir getrusage get_current_dir_name \ +lrand48 logb frexp fmod cbrt setsid \ +fpathconf select euidaccess getpagesize setlocale \ +utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \ +__fpending strsignal setitimer \ +sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \ +gai_strerror mkstemp getline getdelim fsync sync \ +difftime posix_memalign \ +getpwent endpwent getgrent endgrent \ +touchlock \ +cfmakeraw cfsetspeed copysign __executable_start +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +if test $opsys != unixware; then + for ac_func in getwd +do : + ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd" +if test "x$ac_cv_func_getwd" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETWD 1 +_ACEOF + +fi +done + +fi + +## Eric Backus says, HP-UX 9.x on HP 700 machines +## has a broken `rint' in some library versions including math library +## version number A.09.05. +## You can fix the math library by installing patch number PHSS_4630. +## But we can fix it more reliably for Emacs by just not using rint. +## We also skip HAVE_RANDOM - see comments in src/s/hpux10-20.h. +case $opsys in + hpux*) : ;; + *) for ac_func in random rint +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5 +$as_echo_n "checking for __builtin_unwind_init... " >&6; } +if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +__builtin_unwind_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + emacs_cv_func___builtin_unwind_init=yes +else + emacs_cv_func___builtin_unwind_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5 +$as_echo "$emacs_cv_func___builtin_unwind_init" >&6; } +if test $emacs_cv_func___builtin_unwind_init = yes; then + +$as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h + +fi + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 +$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } +if test "${ac_cv_sys_largefile_source+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include /* for off_t */ + #include +int +main () +{ +int (*fp) (FILE *, off_t, int) = fseeko; + return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_sys_largefile_source=no; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGEFILE_SOURCE 1 +#include /* for off_t */ + #include +int +main () +{ +int (*fp) (FILE *, off_t, int) = fseeko; + return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_sys_largefile_source=1; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_cv_sys_largefile_source=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 +$as_echo "$ac_cv_sys_largefile_source" >&6; } +case $ac_cv_sys_largefile_source in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source +_ACEOF +;; +esac +rm -rf conftest* + +# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug +# in glibc 2.1.3, but that breaks too many other things. +# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. +if test $ac_cv_sys_largefile_source != unknown; then + +$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 +$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } +if test "${ac_cv_func_getpgrp_void+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # Use it with a single arg. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +getpgrp (0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_func_getpgrp_void=no +else + ac_cv_func_getpgrp_void=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5 +$as_echo "$ac_cv_func_getpgrp_void" >&6; } +if test $ac_cv_func_getpgrp_void = yes; then + +$as_echo "#define GETPGRP_VOID 1" >>confdefs.h + +fi + + +# UNIX98 PTYs. +for ac_func in grantpt +do : + ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt" +if test "x$ac_cv_func_grantpt" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GRANTPT 1 +_ACEOF + +fi +done + + +# PTY-related GNU extensions. +for ac_func in getpt +do : + ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt" +if test "x$ac_cv_func_getpt" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETPT 1 +_ACEOF + +fi +done + + +# Check this now, so that we will NOT find the above functions in ncurses. +# That is because we have not set up to link ncurses in lib-src. +# It's better to believe a function is not available +# than to expect to find it in ncurses. +# Also we need tputs and friends to be able to build at all. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 +$as_echo_n "checking for library containing tputs... " >&6; } +# Run a test program that contains a call to tputs, a call that is +# never executed. This tests whether a pre-'main' dynamic linker +# works with the library. It's too much trouble to actually call +# tputs in the test program, due to portability hassles. When +# cross-compiling, assume the test program will run if it links. + +# Maybe curses should be tried earlier? +# See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35 +for tputs_library in '' tinfo ncurses terminfo termcap curses; do + OLIBS=$LIBS + if test -z "$tputs_library"; then + LIBS_TERMCAP= + msg='none required' + else + LIBS_TERMCAP=-l$tputs_library + msg=$LIBS_TERMCAP + LIBS="$LIBS_TERMCAP $LIBS" + fi + if test "$cross_compiling" = yes; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + extern void tputs (const char *, int, int (*)(int)); + int main (int argc, char **argv) + { + if (argc == 10000) + tputs (argv[0], 0, 0); + return 0; + } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + msg=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + extern void tputs (const char *, int, int (*)(int)); + int main (int argc, char **argv) + { + if (argc == 10000) + tputs (argv[0], 0, 0); + return 0; + } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + msg=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + LIBS=$OLIBS + if test "X$msg" != Xno; then + break + fi +done +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 +$as_echo "$msg" >&6; } +if test "X$msg" = Xno; then + as_fn_error "The required function \`tputs' was not found in any library. +The following libraries were tried (in order): + libtinfo, libncurses, libterminfo, libtermcap, libcurses +Please try installing whichever of these libraries is most appropriate +for your system, together with its header files. +For example, a libncurses-dev(el) or similar package." "$LINENO" 5 +fi + +## Use termcap instead of terminfo? +## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500. +TERMINFO=yes +## FIXME? In the cases below where we unconditionally set +## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo, +## if that was found above to have tputs. +## Should we use the gnu* logic everywhere? +case "$opsys" in + ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. + ## The ncurses library has been moved out of the System framework in + ## Mac OS X 10.2. So if configure detects it, set the command-line + ## option to use it. + darwin) LIBS_TERMCAP="-lncurses" ;; + + gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;; + + freebsd) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5 +$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; } + if test "${emacs_cv_freebsd_terminfo+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +#if __FreeBSD_version < 400000 +fail; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + emacs_cv_freebsd_terminfo=yes +else + emacs_cv_freebsd_terminfo=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5 +$as_echo "$emacs_cv_freebsd_terminfo" >&6; } + + if test $emacs_cv_freebsd_terminfo = yes; then + LIBS_TERMCAP="-lncurses" + else + TERMINFO=no + LIBS_TERMCAP="-ltermcap" + fi + ;; + + netbsd) + if test "x$LIBS_TERMCAP" != "x-lterminfo"; then + TERMINFO=no + LIBS_TERMCAP="-ltermcap" + fi + ;; + + openbsd) LIBS_TERMCAP="-lncurses" ;; + + ## hpux: Make sure we get select from libc rather than from libcurses + ## because libcurses on HPUX 10.10 has a broken version of select. + ## We used to use -lc -lcurses, but this may be cleaner. + ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly + # set that way, now it uses the default). Isn't this a contradiction? + hpux*) LIBS_TERMCAP="-ltermcap" ;; + +esac + +TERMCAP_OBJ=tparam.o +if test $TERMINFO = yes; then + +$as_echo "#define TERMINFO 1" >>confdefs.h + + TERMCAP_OBJ=terminfo.o +fi + + + + +# Do we have res_init, for detecting changes in /etc/resolv.conf? +# On Darwin, res_init appears not to be useful: see bug#562 and +# http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html +resolv=no + +if test $opsys != darwin; then + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +int +main () +{ +return res_init(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + have_res_init=yes +else + have_res_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$have_res_init" = no; then + OLIBS="$LIBS" + LIBS="$LIBS -lresolv" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5 +$as_echo_n "checking for res_init with -lresolv... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +int +main () +{ +return res_init(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + have_res_init=yes +else + have_res_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5 +$as_echo "$have_res_init" >&6; } + if test "$have_res_init" = yes ; then + resolv=yes + fi + LIBS="$OLIBS" + fi + + if test "$have_res_init" = yes; then + +$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h + + fi +fi +# Do we need the Hesiod library to provide the support routines? +LIBHESIOD= +if test "$with_hesiod" != no ; then + # Don't set $LIBS here -- see comments above. FIXME which comments? + ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send" +if test "x$ac_cv_func_res_send" = x""yes; then : + +else + ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send" +if test "x$ac_cv_func___res_send" = x""yes; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5 +$as_echo_n "checking for res_send in -lresolv... " >&6; } +if test "${ac_cv_lib_resolv_res_send+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lresolv $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char res_send (); +int +main () +{ +return res_send (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_resolv_res_send=yes +else + ac_cv_lib_resolv_res_send=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5 +$as_echo "$ac_cv_lib_resolv_res_send" >&6; } +if test "x$ac_cv_lib_resolv_res_send" = x""yes; then : + resolv=yes +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5 +$as_echo_n "checking for __res_send in -lresolv... " >&6; } +if test "${ac_cv_lib_resolv___res_send+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lresolv $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char __res_send (); +int +main () +{ +return __res_send (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_resolv___res_send=yes +else + ac_cv_lib_resolv___res_send=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5 +$as_echo "$ac_cv_lib_resolv___res_send" >&6; } +if test "x$ac_cv_lib_resolv___res_send" = x""yes; then : + resolv=yes +fi + +fi + +fi + +fi + + if test "$resolv" = yes ; then + RESOLVLIB=-lresolv + else + RESOLVLIB= + fi + ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost" +if test "x$ac_cv_func_hes_getmailhost" = x""yes; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5 +$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; } +if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lhesiod $RESOLVLIB $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char hes_getmailhost (); +int +main () +{ +return hes_getmailhost (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_hesiod_hes_getmailhost=yes +else + ac_cv_lib_hesiod_hes_getmailhost=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5 +$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; } +if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then : + hesiod=yes +else + : +fi + +fi + + + if test x"$hesiod" = xyes; then + +$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h + + LIBHESIOD=-lhesiod + fi +fi + + +# Do we need libresolv (due to res_init or Hesiod)? +if test "$resolv" = yes && test $opsys != darwin; then + +$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h + + LIBRESOLV=-lresolv +else + LIBRESOLV= +fi + + +# These tell us which Kerberos-related libraries to use. +COM_ERRLIB= +CRYPTOLIB= +KRB5LIB= +DESLIB= +KRB4LIB= + +if test "${with_kerberos}" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 +$as_echo_n "checking for com_err in -lcom_err... " >&6; } +if test "${ac_cv_lib_com_err_com_err+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcom_err $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char com_err (); +int +main () +{ +return com_err (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_com_err_com_err=yes +else + ac_cv_lib_com_err_com_err=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5 +$as_echo "$ac_cv_lib_com_err_com_err" >&6; } +if test "x$ac_cv_lib_com_err_com_err" = x""yes; then : + have_com_err=yes +else + have_com_err=no +fi + + if test $have_com_err = yes; then + COM_ERRLIB=-lcom_err + LIBS="$COM_ERRLIB $LIBS" + +$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5 +$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; } +if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char mit_des_cbc_encrypt (); +int +main () +{ +return mit_des_cbc_encrypt (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_crypto_mit_des_cbc_encrypt=yes +else + ac_cv_lib_crypto_mit_des_cbc_encrypt=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5 +$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; } +if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then : + have_crypto=yes +else + have_crypto=no +fi + + if test $have_crypto = yes; then + CRYPTOLIB=-lcrypto + LIBS="$CRYPTOLIB $LIBS" + +$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5 +$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; } +if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lk5crypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char mit_des_cbc_encrypt (); +int +main () +{ +return mit_des_cbc_encrypt (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes +else + ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5 +$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; } +if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then : + have_k5crypto=yes +else + have_k5crypto=no +fi + + if test $have_k5crypto = yes; then + CRYPTOLIB=-lk5crypto + LIBS="$CRYPTOLIB $LIBS" + +$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 +$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } +if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkrb5 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char krb5_init_context (); +int +main () +{ +return krb5_init_context (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_krb5_krb5_init_context=yes +else + ac_cv_lib_krb5_krb5_init_context=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 +$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; } +if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then : + have_krb5=yes +else + have_krb5=no +fi + + if test $have_krb5=yes; then + KRB5LIB=-lkrb5 + LIBS="$KRB5LIB $LIBS" + +$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h + + fi + if test "${with_kerberos5}" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5 +$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; } +if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldes425 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char des_cbc_encrypt (); +int +main () +{ +return des_cbc_encrypt (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_des425_des_cbc_encrypt=yes +else + ac_cv_lib_des425_des_cbc_encrypt=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 +$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; } +if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then : + have_des425=yes +else + have_des425=no +fi + + if test $have_des425 = yes; then + DESLIB=-ldes425 + LIBS="$DESLIB $LIBS" + +$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5 +$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; } +if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldes $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char des_cbc_encrypt (); +int +main () +{ +return des_cbc_encrypt (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_des_des_cbc_encrypt=yes +else + ac_cv_lib_des_des_cbc_encrypt=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 +$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; } +if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then : + have_des=yes +else + have_des=no +fi + + if test $have_des = yes; then + DESLIB=-ldes + LIBS="$DESLIB $LIBS" + +$as_echo "#define HAVE_LIBDES 1" >>confdefs.h + + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5 +$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; } +if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkrb4 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char krb_get_cred (); +int +main () +{ +return krb_get_cred (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_krb4_krb_get_cred=yes +else + ac_cv_lib_krb4_krb_get_cred=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5 +$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; } +if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then : + have_krb4=yes +else + have_krb4=no +fi + + if test $have_krb4 = yes; then + KRB4LIB=-lkrb4 + LIBS="$KRB4LIB $LIBS" + +$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5 +$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; } +if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkrb $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char krb_get_cred (); +int +main () +{ +return krb_get_cred (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_krb_krb_get_cred=yes +else + ac_cv_lib_krb_krb_get_cred=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5 +$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; } +if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then : + have_krb=yes +else + have_krb=no +fi + + if test $have_krb = yes; then + KRB4LIB=-lkrb + LIBS="$KRB4LIB $LIBS" + +$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h + + fi + fi + fi + + if test "${with_kerberos5}" != no; then + for ac_header in krb5.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default" +if test "x$ac_cv_header_krb5_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_H 1 +_ACEOF + ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include +" +if test "x$ac_cv_member_krb5_error_text" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_ERROR_TEXT 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include +" +if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_ERROR_E_TEXT 1 +_ACEOF + + +fi + +fi + +done + + else + for ac_header in des.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default" +if test "x$ac_cv_header_des_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DES_H 1 +_ACEOF + +else + for ac_header in kerberosIV/des.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default" +if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSIV_DES_H 1 +_ACEOF + +else + for ac_header in kerberos/des.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default" +if test "x$ac_cv_header_kerberos_des_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROS_DES_H 1 +_ACEOF + +fi + +done + +fi + +done + +fi + +done + + for ac_header in krb.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default" +if test "x$ac_cv_header_krb_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB_H 1 +_ACEOF + +else + for ac_header in kerberosIV/krb.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default" +if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSIV_KRB_H 1 +_ACEOF + +else + for ac_header in kerberos/krb.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default" +if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROS_KRB_H 1 +_ACEOF + +fi + +done + +fi + +done + +fi + +done + + fi + for ac_header in com_err.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" +if test "x$ac_cv_header_com_err_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_COM_ERR_H 1 +_ACEOF + +fi + +done + +fi + + + + + + + + + + + for ac_func in $ac_func_list +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5 +$as_echo_n "checking whether localtime caches TZ... " >&6; } +if test "${emacs_cv_localtime_cache+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test x$ac_cv_func_tzset = xyes; then +if test "$cross_compiling" = yes; then : + # If we have tzset, assume the worst when cross-compiling. +emacs_cv_localtime_cache=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +char TZ_GMT0[] = "TZ=GMT0"; +char TZ_PST8[] = "TZ=PST8"; +main() +{ + time_t now = time ((time_t *) 0); + int hour_GMT0, hour_unset; + if (putenv (TZ_GMT0) != 0) + exit (1); + hour_GMT0 = localtime (&now)->tm_hour; + unsetenv("TZ"); + hour_unset = localtime (&now)->tm_hour; + if (putenv (TZ_PST8) != 0) + exit (1); + if (localtime (&now)->tm_hour == hour_GMT0) + exit (1); + unsetenv("TZ"); + if (localtime (&now)->tm_hour != hour_unset) + exit (1); + exit (0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + emacs_cv_localtime_cache=no +else + emacs_cv_localtime_cache=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +else + # If we lack tzset, report that localtime does not cache TZ, + # since we can't invalidate the cache if we don't have tzset. + emacs_cv_localtime_cache=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5 +$as_echo "$emacs_cv_localtime_cache" >&6; } +if test $emacs_cv_localtime_cache = yes; then + +$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h + +fi + +ok_so_far=yes +ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" +if test "x$ac_cv_func_socket" = x""yes; then : + +else + ok_so_far=no +fi + +if test $ok_so_far = yes; then + ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" +if test "x$ac_cv_header_netinet_in_h" = x""yes; then : + +else + ok_so_far=no +fi + + +fi +if test $ok_so_far = yes; then + ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" +if test "x$ac_cv_header_arpa_inet_h" = x""yes; then : + +else + ok_so_far=no +fi + + +fi +if test $ok_so_far = yes; then + +$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h + +fi + +if test -f /usr/lpp/X11/bin/smt.exp; then + +$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5 +$as_echo_n "checking whether system supports dynamic ptys... " >&6; } +if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = x""yes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + +for ac_header in vfork.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" +if test "x$ac_cv_header_vfork_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_VFORK_H 1 +_ACEOF + +fi + +done + +for ac_func in fork vfork +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +if test "x$ac_cv_func_fork" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 +$as_echo_n "checking for working fork... " >&6; } +if test "${ac_cv_func_fork_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_fork_works=cross +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* By Ruediger Kuhlmann. */ + return fork () < 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_fork_works=yes +else + ac_cv_func_fork_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 +$as_echo "$ac_cv_func_fork_works" >&6; } + +else + ac_cv_func_fork_works=$ac_cv_func_fork +fi +if test "x$ac_cv_func_fork_works" = xcross; then + case $host in + *-*-amigaos* | *-*-msdosdjgpp*) + # Override, as these systems have only a dummy fork() stub + ac_cv_func_fork_works=no + ;; + *) + ac_cv_func_fork_works=yes + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 +$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} +fi +ac_cv_func_vfork_works=$ac_cv_func_vfork +if test "x$ac_cv_func_vfork" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 +$as_echo_n "checking for working vfork... " >&6; } +if test "${ac_cv_func_vfork_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_vfork_works=cross +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Thanks to Paul Eggert for this test. */ +$ac_includes_default +#include +#ifdef HAVE_VFORK_H +# include +#endif +/* On some sparc systems, changes by the child to local and incoming + argument registers are propagated back to the parent. The compiler + is told about this with #include , but some compilers + (e.g. gcc -O) don't grok . Test for this by using a + static variable whose address is put into a register that is + clobbered by the vfork. */ +static void +#ifdef __cplusplus +sparc_address_test (int arg) +# else +sparc_address_test (arg) int arg; +#endif +{ + static pid_t child; + if (!child) { + child = vfork (); + if (child < 0) { + perror ("vfork"); + _exit(2); + } + if (!child) { + arg = getpid(); + write(-1, "", 0); + _exit (arg); + } + } +} + +int +main () +{ + pid_t parent = getpid (); + pid_t child; + + sparc_address_test (0); + + child = vfork (); + + if (child == 0) { + /* Here is another test for sparc vfork register problems. This + test uses lots of local variables, at least as many local + variables as main has allocated so far including compiler + temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris + 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should + reuse the register of parent for one of the local variables, + since it will think that parent can't possibly be used any more + in this routine. Assigning to the local variable will thus + munge parent in the parent process. */ + pid_t + p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), + p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); + /* Convince the compiler that p..p7 are live; otherwise, it might + use the same hardware register for all 8 local variables. */ + if (p != p1 || p != p2 || p != p3 || p != p4 + || p != p5 || p != p6 || p != p7) + _exit(1); + + /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent + from child file descriptors. If the child closes a descriptor + before it execs or exits, this munges the parent's descriptor + as well. Test for this by closing stdout in the child. */ + _exit(close(fileno(stdout)) != 0); + } else { + int status; + struct stat st; + + while (wait(&status) != child) + ; + return ( + /* Was there some problem with vforking? */ + child < 0 + + /* Did the child fail? (This shouldn't happen.) */ + || status + + /* Did the vfork/compiler bug occur? */ + || parent != getpid() + + /* Did the file descriptor bug occur? */ + || fstat(fileno(stdout), &st) != 0 + ); + } +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_vfork_works=yes +else + ac_cv_func_vfork_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 +$as_echo "$ac_cv_func_vfork_works" >&6; } + +fi; +if test "x$ac_cv_func_fork_works" = xcross; then + ac_cv_func_vfork_works=$ac_cv_func_vfork + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 +$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} +fi + +if test "x$ac_cv_func_vfork_works" = xyes; then + +$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h + +else + +$as_echo "#define vfork fork" >>confdefs.h + +fi +if test "x$ac_cv_func_fork_works" = xyes; then + +$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h + +fi + + +for ac_func in snprintf +do : + ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" +if test "x$ac_cv_func_snprintf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SNPRINTF 1 +_ACEOF + +fi +done + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 +$as_echo_n "checking for nl_langinfo and CODESET... " >&6; } +if test "${emacs_cv_langinfo_codeset+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +char* cs = nl_langinfo(CODESET); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + emacs_cv_langinfo_codeset=yes +else + emacs_cv_langinfo_codeset=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5 +$as_echo "$emacs_cv_langinfo_codeset" >&6; } +if test $emacs_cv_langinfo_codeset = yes; then + +$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 +$as_echo_n "checking for mbstate_t... " >&6; } +if test "${ac_cv_type_mbstate_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +# include +int +main () +{ +mbstate_t x; return sizeof x; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_mbstate_t=yes +else + ac_cv_type_mbstate_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 +$as_echo "$ac_cv_type_mbstate_t" >&6; } + if test $ac_cv_type_mbstate_t = yes; then + +$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h + + else + +$as_echo "#define mbstate_t int" >>confdefs.h + + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5 +$as_echo_n "checking for C restricted array declarations... " >&6; } +if test "${emacs_cv_c_restrict_arr+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +void fred (int x[__restrict]); +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + emacs_cv_c_restrict_arr=yes +else + emacs_cv_c_restrict_arr=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5 +$as_echo "$emacs_cv_c_restrict_arr" >&6; } +if test "$emacs_cv_c_restrict_arr" = yes; then + +$as_echo "#define __restrict_arr __restrict" >>confdefs.h + +fi + + + +$as_echo "#define CLASH_DETECTION 1" >>confdefs.h + + +## Note: PTYs are broken on darwin <6. Use at your own risk. + +$as_echo "#define HAVE_PTYS 1" >>confdefs.h + + + +$as_echo "#define HAVE_SOCKETS 1" >>confdefs.h + + + + + +case $opsys in + aix4-2) + if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then + $as_echo "#define NO_EDITRES 1" >>confdefs.h + + fi + ;; + + hpux*) + $as_echo "#define NO_EDITRES 1" >>confdefs.h + + ;; +esac + + +case $opsys in + darwin | gnu | hpux* | *bsd ) + +$as_echo "#define NO_TERMIO 1" >>confdefs.h + + ;; + + irix6-5 | sol2* | unixware ) + +$as_echo "#define NSIG_MINIMUM 32" >>confdefs.h + + ;; +esac + + +case $opsys in + hpux* | irix6-5 | openbsd | sol2* | unixware ) + +$as_echo "#define BROKEN_SIGIO 1" >>confdefs.h + + ;; + + aix4-2) + +$as_echo "#define BROKEN_FIONREAD 1" >>confdefs.h + + +$as_echo "#define BROKEN_SIGAIO 1" >>confdefs.h + + +$as_echo "#define BROKEN_SIGPOLL 1" >>confdefs.h + + +$as_echo "#define BROKEN_SIGPTY 1" >>confdefs.h + + + +$as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h + + ;; + + freebsd) + +$as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h + + ;; + + darwin) + +$as_echo "#define NO_ABORT 1" >>confdefs.h + + ;; +esac + +case $opsys in + gnu-* | sol2-10 ) + +$as_echo "#define HAVE_PROCFS 1" >>confdefs.h + + ;; +esac + +case $opsys in + darwin | freebsd | netbsd | openbsd ) + +$as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h + + ;; +esac + +case $opsys in + netbsd | openbsd) sound_device="/dev/audio" ;; + *) sound_device="/dev/dsp" ;; +esac + + +cat >>confdefs.h <<_ACEOF +#define DEFAULT_SOUND_DEVICE "$sound_device" +_ACEOF + + + +case $opsys in + darwin | gnu-linux | gnu-kfreebsd ) + +$as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h + + ;; +esac + + +case $opsys in + cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd) + +$as_echo "#define NARROWPROTO 1" >>confdefs.h + + ;; +esac + + + + + + + + +case $opsys in + aix4-2 ) + $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++) " >>confdefs.h + + $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\"); " >>confdefs.h + + $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd)); " >>confdefs.h + + ;; + + cygwin ) + $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++) " >>confdefs.h + + $as_echo "#define PTY_OPEN do { int dummy; SIGMASKTYPE mask; mask = sigblock (sigmask (SIGCHLD)); if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) fd = -1; sigsetmask (mask); if (fd >= 0) emacs_close (dummy); } while (0) " >>confdefs.h + + $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h + + $as_echo "#define PTY_TTY_NAME_SPRINTF " >>confdefs.h + + ;; + + darwin ) + $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++) " >>confdefs.h + + $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h + + $as_echo "#define PTY_OPEN do { int slave; if (openpty (&fd, &slave, pty_name, NULL, NULL) == -1) fd = -1; else emacs_close (slave); } while (0) " >>confdefs.h + + $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h + + $as_echo "#define PTY_TTY_NAME_SPRINTF " >>confdefs.h + + ;; + + gnu | freebsd | netbsd | openbsd ) + $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h + + ;; + + gnu-linux | gnu-kfreebsd ) + if test "x$ac_cv_func_grantpt" = xyes; then + +$as_echo "#define UNIX98_PTYS 1" >>confdefs.h + + $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++) " >>confdefs.h + + $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname; sigblock (sigmask (SIGCHLD)); if (grantpt (fd) == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname(fd))) { sigunblock (sigmask (SIGCHLD)); close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); sigunblock (sigmask (SIGCHLD)); } " >>confdefs.h + + if test "x$ac_cv_func_getpt" = xyes; then + $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h + + $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h + + else + $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\"); " >>confdefs.h + + fi + else + $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h + + fi + ;; + + hpux*) + $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h + + $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i); " >>confdefs.h + + $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i); " >>confdefs.h + + ;; + + irix6-5 ) + $as_echo "#define PTY_ITERATION /**/" >>confdefs.h + + $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h + + $as_echo "#define PTY_OPEN { struct sigaction ocstat, cstat; struct stat stb; char * name; sigemptyset(&cstat.sa_mask); cstat.sa_handler = SIG_DFL; cstat.sa_flags = 0; sigaction(SIGCLD, &cstat, &ocstat); name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); sigaction(SIGCLD, &ocstat, (struct sigaction *)0); if (name == 0) return -1; if (fd < 0) return -1; if (fstat (fd, &stb) < 0) return -1; strcpy (pty_name, name); } " >>confdefs.h + + $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h + + $as_echo "#define PTY_TTY_NAME_SPRINTF " >>confdefs.h + + ;; + + sol2* ) + $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock (sigmask (SIGCLD)); if (grantpt (fd) == -1) { emacs_close (fd); return -1; } sigunblock (sigmask (SIGCLD)); if (unlockpt (fd) == -1) { emacs_close (fd); return -1; } if (!(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); } " >>confdefs.h + + ;; + + unixware ) + $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock(sigmask(SIGCLD)); if (grantpt(fd) == -1) fatal(\"could not grant slave pty\"); sigunblock(sigmask(SIGCLD)); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); } " >>confdefs.h + + ;; +esac + + +case $opsys in + sol2* | unixware ) + $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h + + $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\"); " >>confdefs.h + + +$as_echo "#define SETUP_SLAVE_PTY if (ioctl (xforkin, I_PUSH, \"ptem\") == -1) fatal (\"ioctl I_PUSH ptem\"); if (ioctl (xforkin, I_PUSH, \"ldterm\") == -1) fatal (\"ioctl I_PUSH ldterm\"); if (ioctl (xforkin, I_PUSH, \"ttcompat\") == -1) fatal (\"ioctl I_PUSH ttcompat\");" >>confdefs.h + + ;; +esac + + + + +case $opsys in + aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd ) + $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h + + ;; + + gnu-linux | gnu-kfreebsd ) + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5 +$as_echo_n "checking for signals via characters... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#if LINUX_VERSION_CODE < 0x20400 +# error "Linux version too old" +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + emacs_signals_via_chars=yes +else + emacs_signals_via_chars=no +fi +rm -f conftest.err conftest.$ac_ext + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5 +$as_echo "$emacs_signals_via_chars" >&6; } + test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h + + ;; +esac + + + + + + +case $opsys in + cygwin | darwin | freebsd | netbsd | openbsd ) + $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)" >>confdefs.h + + ;; + + unixware) + $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__ptr - (FILE)->__base)" >>confdefs.h + + ;; + + gnu | gnu-linux | gnu-kfreebsd ) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of pending output formalism" >&5 +$as_echo_n "checking for style of pending output formalism... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#if !defined (_IO_STDIO_H) && !defined (_STDIO_USES_IOSTREAM) +# error "stdio definitions not found" +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + emacs_pending_output=new +else + emacs_pending_output=unknown +fi +rm -f conftest.err conftest.$ac_ext + + if test $emacs_pending_output = unknown; then + case $opsys in + gnu-linux | gnu-kfreebsd) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifndef __UCLIBC__ +# error "not using uclibc" +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + emacs_pending_output=uclibc +else + emacs_pending_output=old +fi +rm -f conftest.err conftest.$ac_ext + ;; + esac + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_pending_output" >&5 +$as_echo "$emacs_pending_output" >&6; } + + case $emacs_pending_output in + new) + $as_echo "#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)" >>confdefs.h + + ;; + uclibc) + $as_echo "#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufpos - (FILE)->__bufstart)" >>confdefs.h + + ;; + old) + $as_echo "#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) ((FILE)->_pptr - (FILE)->_pbase)" >>confdefs.h + + ;; + esac + ;; +esac + + + + + +case $opsys in + gnu) + $as_echo "#define DATA_START ({ extern int data_start; (char *) &data_start; })" >>confdefs.h + + ;; + + hpux*) + $as_echo "#define DATA_START 0x40000000" >>confdefs.h + + $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h + + ;; + irix6-5) + $as_echo "#define DATA_START 0x10000000" >>confdefs.h + + $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h + + ;; +esac + + + + + +case $opsys in + darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h + ;; + + gnu | freebsd | netbsd | openbsd ) + +$as_echo "#define TABDLY OXTABS" >>confdefs.h + + $as_echo "#define TAB3 OXTABS" >>confdefs.h + + ;; + + gnu-linux | gnu-kfreebsd ) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifndef __i386__ +# error "not i386" +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + $as_echo "#define ULIMIT_BREAK_VALUE (32*1024*1024)" >>confdefs.h + +fi +rm -f conftest.err conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifndef __ia64__ +# error "not ia64" +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +$as_echo "#define GC_MARK_SECONDARY_STACK() do { extern void *__libc_ia64_register_backing_store_base; __builtin_ia64_flushrs (); mark_memory (__libc_ia64_register_backing_store_base, __builtin_ia64_bsp ());} while (0)" >>confdefs.h + +fi +rm -f conftest.err conftest.$ac_ext + ;; + + hpux*) + +$as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h + + ;; + + irix6-5) + $as_echo "#define ULIMIT_BREAK_VALUE 0x14000000" >>confdefs.h + + ;; +esac + + + + + + + +case $opsys in + aix4-2 | hpux* | unixware) + $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h + + ;; + + gnu-linux | gnu-kfreebsd ) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if defined __i386__ || defined __sparc__ || defined __mc68000__ \ + || defined __alpha__ || defined __mips__ || defined __s390__ \ + || defined __arm__ || defined __powerpc__ || defined __amd64__ \ + || defined __ia64__ || defined __sh__ +/* ok */ +#else +# error "setjmp not known to work on this arch" +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h + +else + $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h + +fi +rm -f conftest.err conftest.$ac_ext + ;; +esac + + +if test x$GCC = xyes; then + $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h + +else + case $opsys in + freebsd | netbsd | openbsd | irix6-5 | sol2* ) + $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h + + ;; + esac +fi + +case $opsys in + hpux* | sol2* ) + +$as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h + + ;; +esac + + + + + + + +case $opsys in + aix4-2) + $as_echo "#define USG /**/" >>confdefs.h + + $as_echo "#define USG5 /**/" >>confdefs.h + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifndef _AIX +# error "_AIX not defined" +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + +$as_echo "#define _AIX /**/" >>confdefs.h + +fi +rm -f conftest.err conftest.$ac_ext + ;; + + cygwin) + opsysfile= + +$as_echo "#define CYGWIN 1" >>confdefs.h + + ;; + + darwin) + $as_echo "#define BSD4_2 /**/" >>confdefs.h + + $as_echo "#define BSD_SYSTEM /**/" >>confdefs.h + + +$as_echo "#define DARWIN_OS /**/" >>confdefs.h + + ;; + + freebsd) + $as_echo "#define BSD4_2 /**/" >>confdefs.h + + +$as_echo "#define BSD_SYSTEM_AHB 1" >>confdefs.h + + ;; + + gnu | netbsd | openbsd ) + $as_echo "#define BSD4_2 /**/" >>confdefs.h + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifndef BSD_SYSTEM +# error "BSD_SYSTEM not defined" +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + $as_echo "#define BSD_SYSTEM 43" >>confdefs.h + +fi +rm -f conftest.err conftest.$ac_ext + ;; + + gnu-linux | gnu-kfreebsd ) + $as_echo "#define USG /**/" >>confdefs.h + + +$as_echo "#define GNU_LINUX /**/" >>confdefs.h + + ;; + + hpux*) + $as_echo "#define USG /**/" >>confdefs.h + + $as_echo "#define USG5 /**/" >>confdefs.h + + +$as_echo "#define HPUX /**/" >>confdefs.h + + ;; + + irix6-5) + $as_echo "#define USG /**/" >>confdefs.h + + $as_echo "#define USG5 /**/" >>confdefs.h + + +$as_echo "#define IRIX6_5 /**/" >>confdefs.h + + ;; + + sol2*) + $as_echo "#define USG /**/" >>confdefs.h + + $as_echo "#define USG5 /**/" >>confdefs.h + + +$as_echo "#define SOLARIS2 /**/" >>confdefs.h + + ;; + + unixware) + $as_echo "#define USG /**/" >>confdefs.h + + $as_echo "#define USG5 /**/" >>confdefs.h + + ;; +esac + + +case $opsys in + cygwin) + +$as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h + + ;; + + gnu) opsysfile= ;; + + gnu-kfreebsd) opsysfile="s/gnu-linux.h" ;; + + hpux11) + +$as_echo "#define BROKEN_SA_RESTART 1" >>confdefs.h + + +$as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h + + + opsysfile="s/hpux10-20.h" + ;; + + irix6-5) + +$as_echo "#define PREFER_VSUSP 1" >>confdefs.h + + +$as_echo "#define SETPGRP_RELEASES_CTTY 1" >>confdefs.h + + ;; + + openbsd) opsysfile="s/netbsd.h" ;; + + sol2-10) + +$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h + + opsysfile="s/sol2-6.h" + ;; +esac + +# Set up the CFLAGS for real compilation, so we can substitute it. +CFLAGS="$REAL_CFLAGS" +CPPFLAGS="$REAL_CPPFLAGS" + +## Hack to detect a buggy GCC version. +if test "x$GCC" = xyes \ + && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \ + && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \ + && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then + as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 +fi + +version=$PACKAGE_VERSION + +### Specify what sort of things we'll be editing into Makefile and config.h. +### Use configuration here uncanonicalized to avoid exceeding size limits. + + +## Unused? + + + + + + + + + + + + + + + + + + + + + + +## FIXME? Nothing uses @LD_SWITCH_X_SITE@. +## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the +## end of LIBX_BASE, but nothing ever set it. + + + + +## Used in lwlib/Makefile.in. + +if test -n "${opsysfile}"; then + S_FILE="\$(srcdir)/${opsysfile}" +else + S_FILE= +fi + + + + + + + + + +cat >>confdefs.h <<_ACEOF +#define EMACS_CONFIGURATION "${canonical}" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define EMACS_CONFIG_OPTIONS "${ac_configure_args}" +_ACEOF + +if test -n "$opsysfile"; then + +cat >>confdefs.h <<_ACEOF +#define config_opsysfile "${opsysfile}" +_ACEOF + +fi + +XMENU_OBJ= +XOBJ= +FONT_OBJ= +if test "${HAVE_X_WINDOWS}" = "yes" ; then + +$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h + + XMENU_OBJ=xmenu.o + XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o" + FONT_OBJ=xfont.o + if test "$HAVE_XFT" = "yes"; then + FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" + elif test "$HAVE_FREETYPE" = "yes"; then + FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o" + fi + +fi + + + + +WIDGET_OBJ= +MOTIF_LIBW= +if test "${USE_X_TOOLKIT}" != "none" ; then + WIDGET_OBJ=widget.o + +$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h + + if test "${USE_X_TOOLKIT}" = "LUCID"; then + +$as_echo "#define USE_LUCID 1" >>confdefs.h + + elif test "${USE_X_TOOLKIT}" = "MOTIF"; then + +$as_echo "#define USE_MOTIF 1" >>confdefs.h + + MOTIF_LIBW=-lXm + case "$opsys" in + gnu-linux) + ## Paul Abrahams says this is needed. + MOTIF_LIBW="$MOTIF_LIBW -lXpm" + ;; + + unixware) + ## Richard Anthony Ryan + ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2. + MOTIF_LIBW="MOTIF_LIBW -lXimp" + ;; + + aix4-2) + ## olson@mcs.anl.gov says -li18n is needed by -lXm. + MOTIF_LIBW="$MOTIF_LIBW -li18n" + ;; + esac + MOTIF_LIBW="$MOTIF_LIBW $LIBXP" + fi +fi + + +TOOLKIT_LIBW= +case "$USE_X_TOOLKIT" in + MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; + LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; + none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;; +esac + + +if test "$USE_X_TOOLKIT" = "none"; then + LIBXT_OTHER="\$(LIBXSM)" + OLDXMENU_TARGET="really-oldXMenu" +else + LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" + OLDXMENU_TARGET="really-lwlib" +fi + + +## The X Menu stuff is present in the X10 distribution, but missing +## from X11. If we have X10, just use the installed library; +## otherwise, use our own copy. +if test "${HAVE_X11}" = "yes" ; then + +$as_echo "#define HAVE_X11 1" >>confdefs.h + + + if test "$USE_X_TOOLKIT" = "none"; then + OLDXMENU="\${oldXMenudir}/libXMenu11.a" + else + OLDXMENU="\${lwlibdir}/liblw.a" + fi + LIBXMENU="\$(OLDXMENU)" + LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" + OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}" +else + ## For a syntactically valid Makefile; not actually used for anything. + ## See comments in src/Makefile.in. + OLDXMENU=nothing + ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?). + if test "${HAVE_X_WINDOWS}" = "yes"; then + LIBXMENU="-lXMenu" + else + LIBXMENU= + fi + LIBX_OTHER= + OLDXMENU_DEPS= +fi + +if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then + OLDXMENU_TARGET= + OLDXMENU=nothing + LIBXMENU= + OLDXMENU_DEPS= +fi + + + + + + + +if test "${HAVE_MENUS}" = "yes" ; then + +$as_echo "#define HAVE_MENUS 1" >>confdefs.h + +fi + +if test "${GNU_MALLOC}" = "yes" ; then + +$as_echo "#define GNU_MALLOC 1" >>confdefs.h + +fi + +RALLOC_OBJ= +if test "${REL_ALLOC}" = "yes" ; then + +$as_echo "#define REL_ALLOC 1" >>confdefs.h + + + test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o +fi + + +if test "$opsys" = "cygwin"; then + CYGWIN_OBJ="sheap.o" + ## Cygwin differs because of its unexec(). + PRE_ALLOC_OBJ= + POST_ALLOC_OBJ=lastfile.o +else + CYGWIN_OBJ= + PRE_ALLOC_OBJ=lastfile.o + POST_ALLOC_OBJ= +fi + + + + +# Configure gnulib. Although this does not affect CFLAGS or LIBS permanently. +# it temporarily reverts them to their pre-pkg-config values, +# because gnulib needs to work with both src (which uses the +# pkg-config stuff) and lib-src (which does not). For example, gnulib +# may need to determine whether LIB_CLOCK_GETTIME should contain -lrt, +# and it therefore needs to run in an environment where LIBS does not +# already contain -lrt merely because 'pkg-config --libs' printed '-lrt' +# for some package unrelated to lib-src. +SAVE_CFLAGS=$CFLAGS +SAVE_LIBS=$LIBS +CFLAGS=$pre_PKG_CONFIG_CFLAGS +LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS" @@ -8522,22 +15834,6 @@ - for ac_func in $ac_func_list -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if test "${ac_cv_c_bigendian+set}" = set; then : @@ -9095,26 +16391,6 @@ - - for ac_header in $ac_header_list -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } if test "${gl_cv_have_include_next+set}" = set; then : @@ -9933,8 +17209,6 @@ - - if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_time_h='<'sys/time.h'>' else @@ -11270,8 +18544,6 @@ - - GNULIB_PSELECT=0; GNULIB_SELECT=0; HAVE_PSELECT=1; @@ -11522,17 +18794,6 @@ HAVE_SIGSET_T=0 fi -ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = x""yes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF - -fi - if test $ac_cv_header_sys_socket_h = no; then @@ -11891,8 +19152,6 @@ - - ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" if test "x$ac_cv_have_decl_strtoimax" = x""yes; then : ac_have_decl=1 @@ -16327,7253 +23586,8 @@ LIBGNU_LTLIBDEPS="$gl_ltlibdeps" - -# Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - - -if test "${with_sound}" != "no"; then - # Sound support for GNU/Linux and the free BSDs. - for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - have_sound_header=yes -fi - -done - - # Emulation library used on NetBSD. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5 -$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; } -if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lossaudio $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char _oss_ioctl (); -int -main () -{ -return _oss_ioctl (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ossaudio__oss_ioctl=yes -else - ac_cv_lib_ossaudio__oss_ioctl=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5 -$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; } -if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then : - LIBSOUND=-lossaudio -else - LIBSOUND= -fi - - - - ALSA_REQUIRED=1.0.0 - ALSA_MODULES="alsa >= $ALSA_REQUIRED" - - succeeded=no - - if test "$PKG_CONFIG" = "no" ; then - HAVE_ALSA=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5 -$as_echo_n "checking for $ALSA_MODULES... " >&6; } - - if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5 && - ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES" 2>&5` && - ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES" 2>&5`; then - edit_cflags=" - s,///*,/,g - s/^/ / - s/ -I/ $isystem/g - s/^ // - " - ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"` - ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5 -$as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; } - succeeded=yes - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ALSA_CFLAGS="" - ALSA_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_ALSA=yes - else - HAVE_ALSA=no - fi - - if test $HAVE_ALSA = yes; then - SAVE_CFLAGS="$CFLAGS" - SAVE_LIBS="$LIBS" - CFLAGS="$ALSA_CFLAGS $CFLAGS" - LIBS="$ALSA_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -snd_lib_error_set_handler (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_alsa_normal=yes -else - emacs_alsa_normal=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "$emacs_alsa_normal" != yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -snd_lib_error_set_handler (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_alsa_subdir=yes -else - emacs_alsa_subdir=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "$emacs_alsa_subdir" != yes; then - as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 - fi - ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" - fi - - CFLAGS="$SAVE_CFLAGS" - LIBS="$SAVE_LIBS" - LIBSOUND="$LIBSOUND $ALSA_LIBS" - CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" - -$as_echo "#define HAVE_ALSA 1" >>confdefs.h - - fi - - if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then - case "$opsys" in - gnu-linux|freebsd|netbsd) - -$as_echo "#define HAVE_SOUND 1" >>confdefs.h - - ;; - esac - fi - - -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5 -$as_echo_n "checking if personality LINUX32 can be set... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -personality (PER_LINUX32) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_personality_linux32=yes -else - emacs_cv_personality_linux32=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5 -$as_echo "$emacs_cv_personality_linux32" >&6; } - -if test $emacs_cv_personality_linux32 = yes; then - -$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h - -fi - -for ac_header in term.h -do : - ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h" -if test "x$ac_cv_header_term_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_TERM_H 1 -_ACEOF - -fi - -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include - -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes -else - ac_cv_header_time=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h - -fi - -ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default" -if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_SYS_SIGLIST $ac_have_decl -_ACEOF - -if test $ac_cv_have_decl_sys_siglist != yes; then - # For Tru64, at least: - ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default" -if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL___SYS_SIGLIST $ac_have_decl -_ACEOF - - if test $ac_cv_have_decl___sys_siglist = yes; then - -$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 -$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#ifndef WEXITSTATUS -# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) -#endif -#ifndef WIFEXITED -# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) -#endif - -int -main () -{ - int s; - wait (&s); - s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_sys_wait_h=yes -else - ac_cv_header_sys_wait_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 -$as_echo "$ac_cv_header_sys_wait_h" >&6; } -if test $ac_cv_header_sys_wait_h = yes; then - -$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5 -$as_echo_n "checking for speed_t... " >&6; } -if test "${emacs_cv_speed_t+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -speed_t x = 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_speed_t=yes -else - emacs_cv_speed_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5 -$as_echo "$emacs_cv_speed_t" >&6; } -if test $emacs_cv_speed_t = yes; then - -$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5 -$as_echo_n "checking for struct exception... " >&6; } -if test "${emacs_cv_struct_exception+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_struct_exception=yes -else - emacs_cv_struct_exception=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5 -$as_echo "$emacs_cv_struct_exception" >&6; } -HAVE_EXCEPTION=$emacs_cv_struct_exception -if test $emacs_cv_struct_exception != yes || test $opsys = darwin; then - -$as_echo "#define NO_MATHERR 1" >>confdefs.h - -fi - - -for ac_header in net/if.h -do : - ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default -#if HAVE_SYS_SOCKET_H -#include -#endif -" -if test "x$ac_cv_header_net_if_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NET_IF_H 1 -_ACEOF - -fi - -done - -for ac_header in ifaddrs.h -do : - ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default -#if HAVE_SYS_SOCKET_H -#include -#endif -" -if test "x$ac_cv_header_ifaddrs_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_IFADDRS_H 1 -_ACEOF - -fi - -done - -for ac_header in net/if_dl.h -do : - ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default -#if HAVE_SYS_SOCKET_H -#include -#endif -" -if test "x$ac_cv_header_net_if_dl_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NET_IF_DL_H 1 -_ACEOF - -fi - -done - - -ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default -#if HAVE_SYS_SOCKET_H -#include -#endif -#if HAVE_NET_IF_H -#include -#endif -" -if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1 -_ACEOF - - -fi -ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default -#if HAVE_SYS_SOCKET_H -#include -#endif -#if HAVE_NET_IF_H -#include -#endif -" -if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1 -_ACEOF - - -fi -ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default -#if HAVE_SYS_SOCKET_H -#include -#endif -#if HAVE_NET_IF_H -#include -#endif -" -if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1 -_ACEOF - - -fi -ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default -#if HAVE_SYS_SOCKET_H -#include -#endif -#if HAVE_NET_IF_H -#include -#endif -" -if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1 -_ACEOF - - -fi -ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default -#if HAVE_SYS_SOCKET_H -#include -#endif -#if HAVE_NET_IF_H -#include -#endif -" -if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFREQ_IFR_ADDR 1 -_ACEOF - - -fi -ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default -#if HAVE_SYS_SOCKET_H -#include -#endif -#if HAVE_NET_IF_H -#include -#endif -" -if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1 -_ACEOF - - -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((__aligned__ (expr)))" >&5 -$as_echo_n "checking for __attribute__ ((__aligned__ (expr)))... " >&6; } -if test "${emacs_cv_attribute_aligned+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -char __attribute__ ((__aligned__ (1 << 3))) c; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_attribute_aligned=yes -else - emacs_cv_attribute_aligned=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_attribute_aligned" >&5 -$as_echo "$emacs_cv_attribute_aligned" >&6; } -if test $emacs_cv_attribute_aligned = yes; then - -$as_echo "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h - -fi - - -DEPFLAGS= -MKDEPDIR=":" -deps_frag=deps.mk -if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5 -$as_echo_n "checking whether we are using GNU Make... " >&6; } - HAVE_GNU_MAKE=no - testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'` - if test "x$testval" != x; then - HAVE_GNU_MAKE=yes - else - ac_enable_autodepend=no - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5 -$as_echo "$HAVE_GNU_MAKE" >&6; } - if test $HAVE_GNU_MAKE = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5 -$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; } - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -MMD -MF deps.d -MP" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_enable_autodepend=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$SAVE_CFLAGS" - test -f deps.d || ac_enable_autodepend=no - rm -rf deps.d - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5 -$as_echo "$ac_enable_autodepend" >&6; } - fi - if test $ac_enable_autodepend = yes; then - DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP' - ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe. - MKDEPDIR='${MKDIR_P} ${DEPDIR}' - deps_frag=autodeps.mk - fi -fi -deps_frag=$srcdir/src/$deps_frag - - - - - -lisp_frag=$srcdir/src/lisp.mk - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 -$as_echo_n "checking for long file names... " >&6; } -if test "${ac_cv_sys_long_file_names+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_sys_long_file_names=yes -# Test for long file names in all the places we know might matter: -# . the current directory, where building will happen -# $prefix/lib where we will be installing things -# $exec_prefix/lib likewise -# $TMPDIR if set, where it might want to write temporary files -# /tmp where it might want to write temporary files -# /var/tmp likewise -# /usr/tmp likewise -for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do - # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib - # in the usual case where exec_prefix is '${prefix}'. - case $ac_dir in #( - . | /* | ?:[\\/]*) ;; #( - *) continue;; - esac - test -w "$ac_dir/." || continue # It is less confusing to not echo anything here. - ac_xdir=$ac_dir/cf$$ - (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue - ac_tf1=$ac_xdir/conftest9012345 - ac_tf2=$ac_xdir/conftest9012346 - touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || - ac_cv_sys_long_file_names=no - rm -f -r "$ac_xdir" 2>/dev/null - test $ac_cv_sys_long_file_names = no && break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5 -$as_echo "$ac_cv_sys_long_file_names" >&6; } -if test $ac_cv_sys_long_file_names = yes; then - -$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h - -fi - - -#### Choose a window system. - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 -$as_echo_n "checking for X... " >&6; } - - -# Check whether --with-x was given. -if test "${with_x+set}" = set; then : - withval=$with_x; -fi - -# $have_x is `yes', `no', `disabled', or empty when we do not yet know. -if test "x$with_x" = xno; then - # The user explicitly disabled X. - have_x=disabled -else - case $x_includes,$x_libraries in #( - *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( - *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # One or both of the vars are not set, and there is no cached value. -ac_x_includes=no ac_x_libraries=no -rm -f -r conftest.dir -if mkdir conftest.dir; then - cd conftest.dir - cat >Imakefile <<'_ACEOF' -incroot: - @echo incroot='${INCROOT}' -usrlibdir: - @echo usrlibdir='${USRLIBDIR}' -libdir: - @echo libdir='${LIBDIR}' -_ACEOF - if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - for ac_var in incroot usrlibdir libdir; do - eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" - done - # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. - for ac_extension in a so sl dylib la dll; do - if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && - test -f "$ac_im_libdir/libX11.$ac_extension"; then - ac_im_usrlibdir=$ac_im_libdir; break - fi - done - # Screen out bogus values from the imake configuration. They are - # bogus both because they are the default anyway, and because - # using them would break gcc on systems where it needs fixed includes. - case $ac_im_incroot in - /usr/include) ac_x_includes= ;; - *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; - esac - case $ac_im_usrlibdir in - /usr/lib | /usr/lib64 | /lib | /lib64) ;; - *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; - esac - fi - cd .. - rm -f -r conftest.dir -fi - -# Standard set of common directories for X headers. -# Check X11 before X11Rn because it is often a symlink to the current release. -ac_x_header_dirs=' -/usr/X11/include -/usr/X11R7/include -/usr/X11R6/include -/usr/X11R5/include -/usr/X11R4/include - -/usr/include/X11 -/usr/include/X11R7 -/usr/include/X11R6 -/usr/include/X11R5 -/usr/include/X11R4 - -/usr/local/X11/include -/usr/local/X11R7/include -/usr/local/X11R6/include -/usr/local/X11R5/include -/usr/local/X11R4/include - -/usr/local/include/X11 -/usr/local/include/X11R7 -/usr/local/include/X11R6 -/usr/local/include/X11R5 -/usr/local/include/X11R4 - -/usr/X386/include -/usr/x386/include -/usr/XFree86/include/X11 - -/usr/include -/usr/local/include -/usr/unsupported/include -/usr/athena/include -/usr/local/x11r5/include -/usr/lpp/Xamples/include - -/usr/openwin/include -/usr/openwin/share/include' - -if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Xlib.h. - # First, try using that file with no special directory specified. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # We can compile using X headers with no special include directory. -ac_x_includes= -else - for ac_dir in $ac_x_header_dirs; do - if test -r "$ac_dir/X11/Xlib.h"; then - ac_x_includes=$ac_dir - break - fi -done -fi -rm -f conftest.err conftest.$ac_ext -fi # $ac_x_includes = no - -if test "$ac_x_libraries" = no; then - # Check for the libraries. - # See if we find them without any special options. - # Don't add to $LIBS permanently. - ac_save_LIBS=$LIBS - LIBS="-lX11 $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -XrmInitialize () - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - LIBS=$ac_save_LIBS -# We can link X programs with no special library path. -ac_x_libraries= -else - LIBS=$ac_save_LIBS -for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` -do - # Don't even attempt the hair of trying to link an X program! - for ac_extension in a so sl dylib la dll; do - if test -r "$ac_dir/libX11.$ac_extension"; then - ac_x_libraries=$ac_dir - break 2 - fi - done -done -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi # $ac_x_libraries = no - -case $ac_x_includes,$ac_x_libraries in #( - no,* | *,no | *\'*) - # Didn't find X, or a directory has "'" in its name. - ac_cv_have_x="have_x=no";; #( - *) - # Record where we found X for the cache. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$ac_x_includes'\ - ac_x_libraries='$ac_x_libraries'" -esac -fi -;; #( - *) have_x=yes;; - esac - eval "$ac_cv_have_x" -fi # $with_x != no - -if test "$have_x" != yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 -$as_echo "$have_x" >&6; } - no_x=yes -else - # If each of the values was on the command line, it overrides each guess. - test "x$x_includes" = xNONE && x_includes=$ac_x_includes - test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries - # Update the cache value to reflect the command line values. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$x_includes'\ - ac_x_libraries='$x_libraries'" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 -$as_echo "libraries $x_libraries, headers $x_includes" >&6; } -fi - -if test "$no_x" = yes; then - window_system=none -else - window_system=x11 -fi - -LD_SWITCH_X_SITE_RPATH= -if test "${x_libraries}" != NONE; then - if test -n "${x_libraries}"; then - LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"` - LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"` - fi - x_default_search_path="" - x_search_path=${x_libraries} - if test -z "${x_search_path}"; then - x_search_path=/usr/lib - fi - for x_library in `echo ${x_search_path}: | \ - sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do - x_search_path="\ -${x_library}/X11/%L/%T/%N%C%S:\ -${x_library}/X11/%l/%T/%N%C%S:\ -${x_library}/X11/%T/%N%C%S:\ -${x_library}/X11/%L/%T/%N%S:\ -${x_library}/X11/%l/%T/%N%S:\ -${x_library}/X11/%T/%N%S" - if test x"${x_default_search_path}" = x; then - x_default_search_path=${x_search_path} - else - x_default_search_path="${x_search_path}:${x_default_search_path}" - fi - done -fi - - -if test "${x_includes}" != NONE && test -n "${x_includes}"; then - C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"` -fi - -if test x"${x_includes}" = x; then - bitmapdir=/usr/include/X11/bitmaps -else - # accumulate include directories that have X11 bitmap subdirectories - bmd_acc="dummyval" - for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do - if test -d "${bmd}/X11/bitmaps"; then - bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps" - fi - if test -d "${bmd}/bitmaps"; then - bmd_acc="${bmd_acc}:${bmd}/bitmaps" - fi - done - if test ${bmd_acc} != "dummyval"; then - bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"` - fi -fi - -HAVE_NS=no -NS_IMPL_COCOA=no -NS_IMPL_GNUSTEP=no -tmp_CPPFLAGS="$CPPFLAGS" -tmp_CFLAGS="$CFLAGS" -CPPFLAGS="$CPPFLAGS -x objective-c" -CFLAGS="$CFLAGS -x objective-c" -TEMACS_LDFLAGS2="\${LDFLAGS}" -GNU_OBJC_CFLAGS= -if test "${with_ns}" != no; then - if test "${opsys}" = darwin; then - NS_IMPL_COCOA=yes - ns_appdir=`pwd`/nextstep/Emacs.app - ns_appbindir=${ns_appdir}/Contents/MacOS - ns_appresdir=${ns_appdir}/Contents/Resources - ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base - elif test -f $GNUSTEP_CONFIG_FILE; then - NS_IMPL_GNUSTEP=yes - ns_appdir=`pwd`/nextstep/Emacs.app - ns_appbindir=${ns_appdir} - ns_appresdir=${ns_appdir}/Resources - ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base - GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" - GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" - GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)" - GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)" - test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \ - GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}" - test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \ - GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}" - CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" - CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" - LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}" - LIB_STANDARD= - START_FILES= - TEMACS_LDFLAGS2= - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5 -$as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; } -if test "${emacs_cv_objc_exceptions+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0 -1; -#else -fail; -#endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_objc_exceptions=yes -else - emacs_cv_objc_exceptions=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5 -$as_echo "$emacs_cv_objc_exceptions" >&6; } - if test $emacs_cv_objc_exceptions = yes; then - -$as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h - - GNU_OBJC_CFLAGS="-fobjc-exceptions" - fi - fi - - CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS" - - ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default" -if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then : - HAVE_NS=yes -else - as_fn_error "\`--with-ns' was specified, but the include - files are missing or cannot be compiled." "$LINENO" 5 -fi - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -NSInteger i; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ns_have_nsinteger=yes -else - ns_have_nsinteger=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ns_have_nsinteger = yes; then - -$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h - - fi -fi - - -INSTALL_ARCH_INDEP_EXTRA=install-etc -ns_self_contained=no -ns_frag=/dev/null -NS_OBJ= -NS_OBJC_OBJ= -if test "${HAVE_NS}" = yes; then - if test "$with_toolkit_scroll_bars" = "no"; then - as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5 - fi - - window_system=nextstep - with_xft=no - # set up packaging dirs - if test "${EN_NS_SELF_CONTAINED}" = yes; then - ns_self_contained=yes - prefix=${ns_appresdir} - exec_prefix=${ns_appbindir} - libexecdir="\${ns_appbindir}/libexec" - archlibdir="\${ns_appbindir}/libexec" - docdir="\${ns_appresdir}/etc" - etcdir="\${ns_appresdir}/etc" - infodir="\${ns_appresdir}/info" - mandir="\${ns_appresdir}/man" - lispdir="\${ns_appresdir}/lisp" - leimdir="\${ns_appresdir}/leim" - INSTALL_ARCH_INDEP_EXTRA= - fi - ns_frag=$srcdir/src/ns.mk - NS_OBJ="fontset.o fringe.o image.o" - NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o" -fi -CFLAGS="$tmp_CFLAGS" -CPPFLAGS="$tmp_CPPFLAGS" - - - - - - - -case "${window_system}" in - x11 ) - HAVE_X_WINDOWS=yes - HAVE_X11=yes - case "${with_x_toolkit}" in - athena | lucid ) USE_X_TOOLKIT=LUCID ;; - motif ) USE_X_TOOLKIT=MOTIF ;; - gtk ) with_gtk=yes - USE_X_TOOLKIT=none ;; - gtk3 ) with_gtk3=yes - USE_X_TOOLKIT=none ;; - no ) USE_X_TOOLKIT=none ;; - * ) USE_X_TOOLKIT=maybe ;; - esac - ;; - nextstep | none ) - HAVE_X_WINDOWS=no - HAVE_X11=no - USE_X_TOOLKIT=none - ;; -esac - -if test "$window_system" = none && test "X$with_x" != "Xno"; then - # Extract the first word of "X", so it can be a program name with args. -set dummy X; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$HAVE_XSERVER"; then - ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_HAVE_XSERVER="true" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false" -fi -fi -HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER -if test -n "$HAVE_XSERVER"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5 -$as_echo "$HAVE_XSERVER" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "$HAVE_XSERVER" = true || - test -n "$DISPLAY" || - test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then - as_fn_error "You seem to be running X, but no X development libraries -were found. You should install the relevant development files for X -and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make -sure you have development files for image handling, i.e. -tiff, gif, jpeg, png and xpm. -If you are sure you want Emacs compiled without X window support, pass - --without-x -to configure." "$LINENO" 5 - fi -fi - -### If we're using X11, we should use the X menu package. -HAVE_MENUS=no -case ${HAVE_X11} in - yes ) HAVE_MENUS=yes ;; -esac - -# Does the opsystem file prohibit the use of the GNU malloc? -# Assume not, until told otherwise. -GNU_MALLOC=yes - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5 -$as_echo_n "checking whether malloc is Doug Lea style... " >&6; } -if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - static void hook (void) {} -int -main () -{ -malloc_set_state (malloc_get_state ()); - __after_morecore_hook = hook; - __malloc_initialize_hook = hook; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_cv_var_doug_lea_malloc=yes -else - emacs_cv_var_doug_lea_malloc=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5 -$as_echo "$emacs_cv_var_doug_lea_malloc" >&6; } -doug_lea_malloc=$emacs_cv_var_doug_lea_malloc - - -system_malloc=no -case "$opsys" in - ## darwin ld insists on the use of malloc routines in the System framework. - darwin|sol2-10) system_malloc=yes ;; -esac - -if test "${system_malloc}" = "yes"; then - -$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h - - GNU_MALLOC=no - GNU_MALLOC_reason=" - (The GNU allocators don't work with this system configuration.)" - GMALLOC_OBJ= - VMLIMIT_OBJ= -else - test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o - VMLIMIT_OBJ=vm-limit.o -fi - - - -if test "$doug_lea_malloc" = "yes" ; then - if test "$GNU_MALLOC" = yes ; then - GNU_MALLOC_reason=" - (Using Doug Lea's new malloc from the GNU C Library.)" - fi - -$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h - - - ## Use mmap directly for allocating larger buffers. - ## FIXME this comes from src/s/{gnu,gnu-linux}.h: - ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif - ## Does the AC_FUNC_MMAP test below make this check unnecessary? - case "$opsys" in - gnu*) REL_ALLOC=no ;; - esac -fi - -if test x"${REL_ALLOC}" = x; then - REL_ALLOC=${GNU_MALLOC} -fi - -use_mmap_for_buffers=no -case "$opsys" in - cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;; -esac - - - - -for ac_func in getpagesize -do : - ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" -if test "x$ac_cv_func_getpagesize" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETPAGESIZE 1 -_ACEOF - -fi -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 -$as_echo_n "checking for working mmap... " >&6; } -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_mmap_fixed_mapped=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -/* malloc might have been renamed as rpl_malloc. */ -#undef malloc - -/* Thanks to Mike Haertel and Jim Avera for this test. - Here is a matrix of mmap possibilities: - mmap private not fixed - mmap private fixed at somewhere currently unmapped - mmap private fixed at somewhere already mapped - mmap shared not fixed - mmap shared fixed at somewhere currently unmapped - mmap shared fixed at somewhere already mapped - For private mappings, we should verify that changes cannot be read() - back from the file, nor mmap's back from the file at a different - address. (There have been systems where private was not correctly - implemented like the infamous i386 svr4.0, and systems where the - VM page cache was not coherent with the file system buffer cache - like early versions of FreeBSD and possibly contemporary NetBSD.) - For shared mappings, we should conversely verify that changes get - propagated back to all the places they're supposed to be. - - Grep wants private fixed already mapped. - The main things grep needs to know about mmap are: - * does it exist and is it safe to write into the mmap'd area - * how to use it (BSD variants) */ - -#include -#include - -#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H -char *malloc (); -#endif - -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ - -int -main () -{ - char *data, *data2, *data3; - const char *cdata2; - int i, pagesize; - int fd, fd2; - - pagesize = getpagesize (); - - /* First, make a file with some known garbage in it. */ - data = (char *) malloc (pagesize); - if (!data) - return 1; - for (i = 0; i < pagesize; ++i) - *(data + i) = rand (); - umask (0); - fd = creat ("conftest.mmap", 0600); - if (fd < 0) - return 2; - if (write (fd, data, pagesize) != pagesize) - return 3; - close (fd); - - /* Next, check that the tail of a page is zero-filled. File must have - non-zero length, otherwise we risk SIGBUS for entire page. */ - fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); - if (fd2 < 0) - return 4; - cdata2 = ""; - if (write (fd2, cdata2, 1) != 1) - return 5; - data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); - if (data2 == MAP_FAILED) - return 6; - for (i = 0; i < pagesize; ++i) - if (*(data2 + i)) - return 7; - close (fd2); - if (munmap (data2, pagesize)) - return 8; - - /* Next, try to mmap the file at a fixed address which already has - something else allocated at it. If we can, also make sure that - we see the same garbage. */ - fd = open ("conftest.mmap", O_RDWR); - if (fd < 0) - return 9; - if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - return 10; - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - return 11; - - /* Finally, make sure that changes to the mapped area do not - percolate back to the file as seen by read(). (This is a bug on - some variants of i386 svr4.0.) */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = (char *) malloc (pagesize); - if (!data3) - return 12; - if (read (fd, data3, pagesize) != pagesize) - return 13; - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - return 14; - close (fd); - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_mmap_fixed_mapped=yes -else - ac_cv_func_mmap_fixed_mapped=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 -$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } -if test $ac_cv_func_mmap_fixed_mapped = yes; then - -$as_echo "#define HAVE_MMAP 1" >>confdefs.h - -fi -rm -f conftest.mmap conftest.txt - -if test $use_mmap_for_buffers = yes; then - -$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h - - REL_ALLOC=no -fi - -LIBS="$LIBS_SYSTEM $LIBS" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 -$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } -if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldnet $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dnet_ntoa (); -int -main () -{ -return dnet_ntoa (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dnet_dnet_ntoa=yes -else - ac_cv_lib_dnet_dnet_ntoa=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 -$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBDNET 1 -_ACEOF - - LIBS="-ldnet $LIBS" - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5 -$as_echo_n "checking for main in -lXbsd... " >&6; } -if test "${ac_cv_lib_Xbsd_main+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXbsd $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Xbsd_main=yes -else - ac_cv_lib_Xbsd_main=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5 -$as_echo "$ac_cv_lib_Xbsd_main" >&6; } -if test "x$ac_cv_lib_Xbsd_main" = x""yes; then : - LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd" -fi - - -LIB_PTHREAD= - - - -if test "$ac_cv_header_pthread_h"; then - if test "$GMALLOC_OBJ" = gmalloc.o; then - emacs_pthread_function=pthread_atfork - else - emacs_pthread_function=pthread_self - fi - as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5 -$as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $emacs_pthread_function (); -int -main () -{ -return $emacs_pthread_function (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$as_ac_Lib=yes" -else - eval "$as_ac_Lib=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Lib - if test "x$as_val" = x""yes; then : - HAVE_PTHREAD=yes -fi - -fi -if test "$HAVE_PTHREAD" = yes; then - case "${canonical}" in - *-hpux*) ;; - *) LIB_PTHREAD="-lpthread" - LIBS="$LIB_PTHREAD $LIBS" ;; - esac - -$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5 -$as_echo_n "checking for cma_open in -lpthreads... " >&6; } -if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthreads $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char cma_open (); -int -main () -{ -return cma_open (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pthreads_cma_open=yes -else - ac_cv_lib_pthreads_cma_open=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5 -$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; } -if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPTHREADS 1 -_ACEOF - - LIBS="-lpthreads $LIBS" - -fi - - -## Note: when using cpp in s/aix4.2.h, this definition depended on -## HAVE_LIBPTHREADS. That was not defined earlier in configure when -## the system file was sourced. Hence the value of LIBS_SYSTEM -## added to LIBS in configure would never contain the pthreads part, -## but the value used in Makefiles might. FIXME? -## -## -lpthreads seems to be necessary for Xlib in X11R6, and should -## be harmless on older versions of X where it happens to exist. -test "$opsys" = "aix4-2" && \ - test $ac_cv_lib_pthreads_cma_open = yes && \ - LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads" - - -case ${host_os} in -aix*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 -$as_echo_n "checking for -bbigtoc option... " >&6; } -if test "${gdb_cv_bigtoc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - case $GCC in - yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; - *) gdb_cv_bigtoc=-bbigtoc ;; - esac - - LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -int i; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -else - gdb_cv_bigtoc= -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 -$as_echo "$gdb_cv_bigtoc" >&6; } - ;; -esac - -# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets -# used for the tests that follow. We set them back to REAL_CFLAGS and -# REAL_CPPFLAGS later on. - -REAL_CFLAGS="$CFLAGS" -REAL_CPPFLAGS="$CPPFLAGS" - -if test "${HAVE_X11}" = "yes"; then - DEFS="$C_SWITCH_X_SITE $DEFS" - LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE" - LIBS="-lX11 $LIBS" - CFLAGS="$C_SWITCH_X_SITE $CFLAGS" - CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS" - - # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. - # This is handled by LD_SWITCH_X_SITE_RPATH during the real build, - # but it's more convenient here to set LD_RUN_PATH since this - # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH. - if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then - LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH - export LD_RUN_PATH - fi - - if test "${opsys}" = "gnu-linux"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5 -$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -XOpenDisplay ("foo"); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - xgnu_linux_first_failure=no -else - xgnu_linux_first_failure=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test "${xgnu_linux_first_failure}" = "yes"; then - OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE" - OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE" - OLD_CPPFLAGS="$CPPFLAGS" - OLD_LIBS="$LIBS" - LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout" - C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout" - CPPFLAGS="$CPPFLAGS -b i486-linuxaout" - LIBS="$LIBS -b i486-linuxaout" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -XOpenDisplay ("foo"); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - xgnu_linux_second_failure=no -else - xgnu_linux_second_failure=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test "${xgnu_linux_second_failure}" = "yes"; then - # If we get the same failure with -b, there is no use adding -b. - # So take it out. This plays safe. - LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE" - C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE" - CPPFLAGS="$OLD_CPPFLAGS" - LIBS="$OLD_LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - fi - - # Reportedly, some broken Solaris systems have XKBlib.h but are missing - # header files included from there. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5 -$as_echo_n "checking for Xkb... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -int -main () -{ -XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_xkb=yes -else - emacs_xkb=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5 -$as_echo "$emacs_xkb" >&6; } - if test $emacs_xkb = yes; then - -$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h - - fi - - for ac_func in XrmSetDatabase XScreenResourceString \ -XScreenNumberOfScreen -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -fi - -if test "${window_system}" = "x11"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5 -$as_echo_n "checking X11 version 6... " >&6; } - if test "${emacs_cv_x11_version_6+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -#if XlibSpecificationRelease < 6 -fail; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_cv_x11_version_6=yes -else - emacs_cv_x11_version_6=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - - if test $emacs_cv_x11_version_6 = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 -$as_echo "6 or newer" >&6; } - -$as_echo "#define HAVE_X11R6 1" >>confdefs.h - - -$as_echo "#define HAVE_X_I18N 1" >>confdefs.h - - ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style - ## XIM support. - case "$opsys" in - sol2-*) : ;; - *) -$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h - - ;; - esac - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 -$as_echo "before 6" >&6; } - fi -fi - - -### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified. -HAVE_RSVG=no -if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then - if test "${with_rsvg}" != "no"; then - RSVG_REQUIRED=2.11.0 - RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED" - - - succeeded=no - - if test "$PKG_CONFIG" = "no" ; then - : - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5 -$as_echo_n "checking for $RSVG_MODULE... " >&6; } - - if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5 && - RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE" 2>&5` && - RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE" 2>&5`; then - edit_cflags=" - s,///*,/,g - s/^/ / - s/ -I/ $isystem/g - s/^ // - " - RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"` - RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5 -$as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; } - succeeded=yes - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - RSVG_CFLAGS="" - RSVG_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_RSVG=yes - else - : - fi - - - - - if test $HAVE_RSVG = yes; then - -$as_echo "#define HAVE_RSVG 1" >>confdefs.h - - CFLAGS="$CFLAGS $RSVG_CFLAGS" - LIBS="$RSVG_LIBS $LIBS" - fi - fi -fi - -HAVE_IMAGEMAGICK=no -if test "${HAVE_X11}" = "yes"; then - if test "${with_imagemagick}" != "no"; then - ## 6.2.8 is the earliest version known to work, but earlier versions - ## might work - let us know if you find one. - ## 6.0.7 does not work. See bug#7955. - IMAGEMAGICK_MODULE="Wand >= 6.2.8" - - succeeded=no - - if test "$PKG_CONFIG" = "no" ; then - : - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5 -$as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; } - - if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5 && - IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE" 2>&5` && - IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE" 2>&5`; then - edit_cflags=" - s,///*,/,g - s/^/ / - s/ -I/ $isystem/g - s/^ // - " - IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"` - IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5 -$as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; } - succeeded=yes - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - IMAGEMAGICK_CFLAGS="" - IMAGEMAGICK_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_IMAGEMAGICK=yes - else - : - fi - - - - - if test $HAVE_IMAGEMAGICK = yes; then - -$as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h - - CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS" - LIBS="$IMAGEMAGICK_LIBS $LIBS" - for ac_func in MagickExportImagePixels MagickMergeImageLayers -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - fi - fi -fi - - -HAVE_GTK=no -GTK_OBJ= -if test "${with_gtk3}" = "yes"; then - GLIB_REQUIRED=2.28 - GTK_REQUIRED=3.0 - GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" - - - succeeded=no - - if test "$PKG_CONFIG" = "no" ; then - pkg_check_gtk=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 -$as_echo_n "checking for $GTK_MODULES... " >&6; } - - if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 && - GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` && - GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then - edit_cflags=" - s,///*,/,g - s/^/ / - s/ -I/ $isystem/g - s/^ // - " - GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"` - GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5 -$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; } - succeeded=yes - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - GTK_CFLAGS="" - GTK_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - pkg_check_gtk=yes - else - pkg_check_gtk=no - fi - - if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then - as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 - fi - -$as_echo "#define HAVE_GTK3 1" >>confdefs.h - - GTK_OBJ=emacsgtkfixed.o -fi - -if test "$pkg_check_gtk" != "yes"; then - HAVE_GTK=no -if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then - GLIB_REQUIRED=2.10 - GTK_REQUIRED=2.10 - GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" - - - succeeded=no - - if test "$PKG_CONFIG" = "no" ; then - pkg_check_gtk=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5 -$as_echo_n "checking for $GTK_MODULES... " >&6; } - - if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 && - GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` && - GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then - edit_cflags=" - s,///*,/,g - s/^/ / - s/ -I/ $isystem/g - s/^ // - " - GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"` - GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5 -$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; } - succeeded=yes - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - GTK_CFLAGS="" - GTK_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - pkg_check_gtk=yes - else - pkg_check_gtk=no - fi - - if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then - as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 - fi -fi -fi - -if test x"$pkg_check_gtk" = xyes; then - - - - C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" - CFLAGS="$CFLAGS $GTK_CFLAGS" - LIBS="$GTK_LIBS $LIBS" - GTK_COMPILES=no - for ac_func in gtk_main -do : - ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main" -if test "x$ac_cv_func_gtk_main" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GTK_MAIN 1 -_ACEOF - GTK_COMPILES=yes -fi -done - - if test "${GTK_COMPILES}" != "yes"; then - if test "$USE_X_TOOLKIT" != "maybe"; then - as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5; - fi - else - HAVE_GTK=yes - -$as_echo "#define USE_GTK 1" >>confdefs.h - - GTK_OBJ="gtkutil.o $GTK_OBJ" - USE_X_TOOLKIT=none - if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then - : - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with - closing open displays. This is no problem if you just use - one display, but if you use more than one and close one of them - Emacs may crash." >&5 -$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with - closing open displays. This is no problem if you just use - one display, but if you use more than one and close one of them - Emacs may crash." >&2;} - sleep 3 - fi - fi - -fi - - - -if test "${HAVE_GTK}" = "yes"; then - - if test "$with_toolkit_scroll_bars" != no; then - with_toolkit_scroll_bars=yes - fi - - HAVE_GTK_FILE_SELECTION=no - ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default -#include -" -if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then : - HAVE_GTK_FILE_SELECTION=yes -else - HAVE_GTK_FILE_SELECTION=no -fi - - if test "$HAVE_GTK_FILE_SELECTION" = yes; then - for ac_func in gtk_file_selection_new -do : - ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new" -if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GTK_FILE_SELECTION_NEW 1 -_ACEOF - -fi -done - - fi - - - for ac_func in gtk_widget_get_window gtk_widget_set_has_window \ - gtk_dialog_get_action_area gtk_widget_get_sensitive \ - gtk_widget_get_mapped gtk_adjustment_get_page_size \ - gtk_orientable_set_orientation \ - gtk_window_set_has_resize_grip -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -fi - -HAVE_DBUS=no -DBUS_OBJ= -if test "${with_dbus}" = "yes"; then - - succeeded=no - - if test "$PKG_CONFIG" = "no" ; then - HAVE_DBUS=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5 -$as_echo_n "checking for dbus-1 >= 1.0... " >&6; } - - if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5 && - DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0" 2>&5` && - DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0" 2>&5`; then - edit_cflags=" - s,///*,/,g - s/^/ / - s/ -I/ $isystem/g - s/^ // - " - DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"` - DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5 -$as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; } - succeeded=yes - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - DBUS_CFLAGS="" - DBUS_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_DBUS=yes - else - HAVE_DBUS=no - fi - - if test "$HAVE_DBUS" = yes; then - LIBS="$LIBS $DBUS_LIBS" - -$as_echo "#define HAVE_DBUS 1" >>confdefs.h - - for ac_func in dbus_watch_get_unix_fd \ - dbus_type_is_valid \ - dbus_validate_bus_name \ - dbus_validate_path \ - dbus_validate_interface \ - dbus_validate_member -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - DBUS_OBJ=dbusbind.o - fi -fi - - -HAVE_GSETTINGS=no -if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then - - succeeded=no - - if test "$PKG_CONFIG" = "no" ; then - HAVE_GSETTINGS=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5 -$as_echo_n "checking for gio-2.0 >= 2.26... " >&6; } - - if $PKG_CONFIG --exists "gio-2.0 >= 2.26" 2>&5 && - GSETTINGS_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.26" 2>&5` && - GSETTINGS_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.26" 2>&5`; then - edit_cflags=" - s,///*,/,g - s/^/ / - s/ -I/ $isystem/g - s/^ // - " - GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"` - GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5 -$as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; } - succeeded=yes - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - GSETTINGS_CFLAGS="" - GSETTINGS_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GSETTINGS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 >= 2.26"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_GSETTINGS=yes - else - HAVE_GSETTINGS=no - fi - - if test "$HAVE_GSETTINGS" = "yes"; then - -$as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h - - SETTINGS_CFLAGS="$GSETTINGS_CFLAGS" - SETTINGS_LIBS="$GSETTINGS_LIBS" - fi -fi - -HAVE_GCONF=no -if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then - - succeeded=no - - if test "$PKG_CONFIG" = "no" ; then - HAVE_GCONF=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5 -$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; } - - if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5 && - GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13" 2>&5` && - GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13" 2>&5`; then - edit_cflags=" - s,///*,/,g - s/^/ / - s/ -I/ $isystem/g - s/^ // - " - GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"` - GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5 -$as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; } - succeeded=yes - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - GCONF_CFLAGS="" - GCONF_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_GCONF=yes - else - HAVE_GCONF=no - fi - - if test "$HAVE_GCONF" = yes; then - -$as_echo "#define HAVE_GCONF 1" >>confdefs.h - - SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS" - SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS" - fi -fi - -if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then - SAVE_CFLAGS="$CFLAGS" - SAVE_LIBS="$LIBS" - CFLAGS="$SETTINGS_CFLAGS $CFLAGS" - LIBS="$SETTINGS_LIBS $LIBS" - for ac_func in g_type_init -do : - ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init" -if test "x$ac_cv_func_g_type_init" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_G_TYPE_INIT 1 -_ACEOF - -fi -done - - CFLAGS="$SAVE_CFLAGS" - LIBS="$SAVE_LIBS" -fi - - - - -HAVE_LIBSELINUX=no -LIBSELINUX_LIBS= -if test "${with_selinux}" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5 -$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; } -if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lselinux $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char lgetfilecon (); -int -main () -{ -return lgetfilecon (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_selinux_lgetfilecon=yes -else - ac_cv_lib_selinux_lgetfilecon=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5 -$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; } -if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then : - HAVE_LIBSELINUX=yes -else - HAVE_LIBSELINUX=no -fi - - if test "$HAVE_LIBSELINUX" = yes; then - -$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h - - LIBSELINUX_LIBS=-lselinux - fi -fi - - -HAVE_GNUTLS=no -HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no -if test "${with_gnutls}" = "yes" ; then - - succeeded=no - - if test "$PKG_CONFIG" = "no" ; then - HAVE_GNUTLS=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5 -$as_echo_n "checking for gnutls >= 2.6.6... " >&6; } - - if $PKG_CONFIG --exists "gnutls >= 2.6.6" 2>&5 && - LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.6.6" 2>&5` && - LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.6.6" 2>&5`; then - edit_cflags=" - s,///*,/,g - s/^/ / - s/ -I/ $isystem/g - s/^ // - " - LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"` - LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5 -$as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; } - succeeded=yes - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - LIBGNUTLS_CFLAGS="" - LIBGNUTLS_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.6.6"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_GNUTLS=yes - else - HAVE_GNUTLS=no - fi - - if test "${HAVE_GNUTLS}" = "yes"; then - -$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h - - fi - - CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" - LIBS="$LIBGNUTLS_LIBS $LIBS" - for ac_func in gnutls_certificate_set_verify_function -do : - ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function" -if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1 -_ACEOF - HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes -fi -done - - - if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then - -$as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h - - fi -fi - - - - -HAVE_XAW3D=no -LUCID_LIBW= -if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then - if test "$with_xaw3d" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 -$as_echo_n "checking for xaw3d... " >&6; } - if test "${emacs_cv_xaw3d+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5 -$as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; } -if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXaw3d $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XawScrollbarSetThumb (); -int -main () -{ -return XawScrollbarSetThumb (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes -else - ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5 -$as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; } -if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then : - emacs_cv_xaw3d=yes -else - emacs_cv_xaw3d=no -fi - -else - emacs_cv_xaw3d=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - - else - emacs_cv_xaw3d=no - fi - if test $emacs_cv_xaw3d = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 -$as_echo "yes; using Lucid toolkit" >&6; } - USE_X_TOOLKIT=LUCID - HAVE_XAW3D=yes - LUCID_LIBW=-lXaw3d - -$as_echo "#define HAVE_XAW3D 1" >>confdefs.h - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5 -$as_echo_n "checking for libXaw... " >&6; } - if test "${emacs_cv_xaw+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_cv_xaw=yes -else - emacs_cv_xaw=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - - if test $emacs_cv_xaw = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5 -$as_echo "yes; using Lucid toolkit" >&6; } - USE_X_TOOLKIT=LUCID - LUCID_LIBW=-lXaw - elif test x"${USE_X_TOOLKIT}" = xLUCID; then - as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5 - else - as_fn_error "No X toolkit could be found. -If you are sure you want Emacs compiled without an X toolkit, pass - --with-x-toolkit=no -to configure. Otherwise, install the development libraries for the toolkit -that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5 - fi - fi -fi - -X_TOOLKIT_TYPE=$USE_X_TOOLKIT - -LIBXTR6= -if test "${USE_X_TOOLKIT}" != "none"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5 -$as_echo_n "checking X11 toolkit version... " >&6; } - if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -#if XtSpecificationRelease < 6 -fail; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_cv_x11_toolkit_version_6=yes -else - emacs_cv_x11_toolkit_version_6=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - - HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6 - if test $emacs_cv_x11_toolkit_version_6 = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5 -$as_echo "6 or newer" >&6; } - -$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h - - LIBXTR6="-lSM -lICE" - case "$opsys" in - ## Use libw.a along with X11R6 Xt. - unixware) LIBXTR6="$LIBXTR6 -lw" ;; - esac - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5 -$as_echo "before 6" >&6; } - fi - - OLDLIBS="$LIBS" - if test x$HAVE_X11XTR6 = xyes; then - LIBS="-lXt -lSM -lICE $LIBS" - else - LIBS="-lXt $LIBS" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5 -$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; } -if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXmu $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XmuConvertStandardSelection (); -int -main () -{ -return XmuConvertStandardSelection (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Xmu_XmuConvertStandardSelection=yes -else - ac_cv_lib_Xmu_XmuConvertStandardSelection=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5 -$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; } -if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBXMU 1 -_ACEOF - - LIBS="-lXmu $LIBS" - -fi - - test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS" - fi - - -LIBXMU=-lXmu -case $opsys in - ## These systems don't supply Xmu. - hpux* | aix4-2 ) - test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU= - ;; -esac - - -# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D. -if test "${HAVE_X11}" = "yes"; then - if test "${USE_X_TOOLKIT}" != "none"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5 -$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; } -if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXext $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XShapeQueryExtension (); -int -main () -{ -return XShapeQueryExtension (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Xext_XShapeQueryExtension=yes -else - ac_cv_lib_Xext_XShapeQueryExtension=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5 -$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; } -if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBXEXT 1 -_ACEOF - - LIBS="-lXext $LIBS" - -fi - - fi -fi - -LIBXP= -if test "${USE_X_TOOLKIT}" = "MOTIF"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5 -$as_echo_n "checking for Motif version 2.1... " >&6; } -if test "${emacs_cv_motif_version_2_1+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) -int x = 5; -#else -Motif version prior to 2.1. -#endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_motif_version_2_1=yes -else - emacs_cv_motif_version_2_1=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5 -$as_echo "$emacs_cv_motif_version_2_1" >&6; } - if test $emacs_cv_motif_version_2_1 = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5 -$as_echo_n "checking for XpCreateContext in -lXp... " >&6; } -if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXp $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XpCreateContext (); -int -main () -{ -return XpCreateContext (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Xp_XpCreateContext=yes -else - ac_cv_lib_Xp_XpCreateContext=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5 -$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; } -if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then : - LIBXP=-lXp -fi - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5 -$as_echo_n "checking for LessTif where some systems put it... " >&6; } -if test "${emacs_cv_lesstif+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # We put this in CFLAGS temporarily to precede other -I options - # that might be in CFLAGS temporarily. - # We put this in CPPFLAGS where it precedes the other -I options. - OLD_CPPFLAGS=$CPPFLAGS - OLD_CFLAGS=$CFLAGS - CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS" - CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int x = 5; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_lesstif=yes -else - emacs_cv_lesstif=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5 -$as_echo "$emacs_cv_lesstif" >&6; } - if test $emacs_cv_lesstif = yes; then - # Make sure this -I option remains in CPPFLAGS after it is set - # back to REAL_CPPFLAGS. - # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not - # have those other -I options anyway. Ultimately, having this - # directory ultimately in CPPFLAGS will be enough. - REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS" - LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS" - else - CFLAGS=$OLD_CFLAGS - CPPFLAGS=$OLD_CPPFLAGS - fi - fi - ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default" -if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then : - -else - as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5 -fi - - -fi - - -USE_TOOLKIT_SCROLL_BARS=no -if test "${with_toolkit_scroll_bars}" != "no"; then - if test "${USE_X_TOOLKIT}" != "none"; then - if test "${USE_X_TOOLKIT}" = "MOTIF"; then - $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h - - HAVE_XAW3D=no - USE_TOOLKIT_SCROLL_BARS=yes - elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then - $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h - - USE_TOOLKIT_SCROLL_BARS=yes - fi - elif test "${HAVE_GTK}" = "yes"; then - $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h - - USE_TOOLKIT_SCROLL_BARS=yes - elif test "${HAVE_NS}" = "yes"; then - $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h - - USE_TOOLKIT_SCROLL_BARS=yes - fi -fi - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #include -int -main () -{ -XIMProc callback; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - HAVE_XIM=yes - -$as_echo "#define HAVE_XIM 1" >>confdefs.h - -else - HAVE_XIM=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -if test "${with_xim}" != "no"; then - -$as_echo "#define USE_XIM 1" >>confdefs.h - -fi - - -if test "${HAVE_XIM}" != "no"; then - late_CFLAGS=$CFLAGS - if test "$GCC" = yes; then - CFLAGS="$CFLAGS --pedantic-errors" - fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -int -main () -{ -Display *display; -XrmDatabase db; -char *res_name; -char *res_class; -XIMProc callback; -XPointer *client_data; -#ifndef __GNUC__ -/* If we're not using GCC, it's probably not XFree86, and this is - probably right, but we can't use something like --pedantic-errors. */ -extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*, - char*, XIMProc, XPointer*); -#endif -(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback, - client_data); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_arg6_star=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "$emacs_cv_arg6_star" = yes; then - $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h - - else - $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h - - fi - CFLAGS=$late_CFLAGS -fi - -### Start of font-backend (under any platform) section. -# (nothing here yet -- this is a placeholder) -### End of font-backend (under any platform) section. - -### Start of font-backend (under X11) section. -if test "${HAVE_X11}" = "yes"; then - - succeeded=no - - if test "$PKG_CONFIG" = "no" ; then - HAVE_FC=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5 -$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; } - - if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5 && - FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0" 2>&5` && - FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0" 2>&5`; then - edit_cflags=" - s,///*,/,g - s/^/ / - s/ -I/ $isystem/g - s/^ // - " - FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"` - FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5 -$as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; } - succeeded=yes - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - FONTCONFIG_CFLAGS="" - FONTCONFIG_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_FC=yes - else - HAVE_FC=no - fi - - - ## Use -lXft if available, unless `--with-xft=no'. - HAVE_XFT=maybe - if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then - with_xft="no"; - fi - if test "x${with_xft}" != "xno"; then - - - succeeded=no - - if test "$PKG_CONFIG" = "no" ; then - HAVE_XFT=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5 -$as_echo_n "checking for xft >= 0.13.0... " >&6; } - - if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5 && - XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0" 2>&5` && - XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0" 2>&5`; then - edit_cflags=" - s,///*,/,g - s/^/ / - s/ -I/ $isystem/g - s/^ // - " - XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"` - XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5 -$as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; } - succeeded=yes - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - XFT_CFLAGS="" - XFT_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - : - else - HAVE_XFT=no - fi - - ## Because xftfont.c uses XRenderQueryExtension, we also - ## need to link to -lXrender. - HAVE_XRENDER=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5 -$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; } -if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXrender $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XRenderQueryExtension (); -int -main () -{ -return XRenderQueryExtension (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Xrender_XRenderQueryExtension=yes -else - ac_cv_lib_Xrender_XRenderQueryExtension=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5 -$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; } -if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then : - HAVE_XRENDER=yes -fi - - if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then - OLD_CPPFLAGS="$CPPFLAGS" - OLD_CFLAGS="$CFLAGS" - OLD_LIBS="$LIBS" - CPPFLAGS="$CPPFLAGS $XFT_CFLAGS" - CFLAGS="$CFLAGS $XFT_CFLAGS" - XFT_LIBS="-lXrender $XFT_LIBS" - LIBS="$XFT_LIBS $LIBS" - ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5 -$as_echo_n "checking for XftFontOpen in -lXft... " >&6; } -if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXft $XFT_LIBS $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XftFontOpen (); -int -main () -{ -return XftFontOpen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Xft_XftFontOpen=yes -else - ac_cv_lib_Xft_XftFontOpen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5 -$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; } -if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then : - HAVE_XFT=yes -fi - -fi - - - - if test "${HAVE_XFT}" = "yes"; then - -$as_echo "#define HAVE_XFT 1" >>confdefs.h - - - C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS" - else - CPPFLAGS="$OLD_CPPFLAGS" - CFLAGS="$OLD_CFLAGS" - LIBS="$OLD_LIBS" - fi # "${HAVE_XFT}" = "yes" - fi # "$HAVE_XFT" != no - fi # "x${with_xft}" != "xno" - - ## We used to allow building with FreeType and without Xft. - ## However, the ftx font backend driver is not in good shape. - if test "$HAVE_XFT" != "yes"; then - HAVE_XFT=no - HAVE_FREETYPE=no - else - - succeeded=no - - if test "$PKG_CONFIG" = "no" ; then - HAVE_FREETYPE=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5 -$as_echo_n "checking for freetype2... " >&6; } - - if $PKG_CONFIG --exists "freetype2" 2>&5 && - FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>&5` && - FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>&5`; then - edit_cflags=" - s,///*,/,g - s/^/ / - s/ -I/ $isystem/g - s/^ // - " - FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"` - FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5 -$as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; } - succeeded=yes - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - FREETYPE_CFLAGS="" - FREETYPE_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_FREETYPE=yes - else - HAVE_FREETYPE=no - fi - - - test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5 - fi - - HAVE_LIBOTF=no - if test "${HAVE_FREETYPE}" = "yes"; then - -$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h - - if test "${with_libotf}" != "no"; then - - succeeded=no - - if test "$PKG_CONFIG" = "no" ; then - HAVE_LIBOTF=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5 -$as_echo_n "checking for libotf... " >&6; } - - if $PKG_CONFIG --exists "libotf" 2>&5 && - LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf" 2>&5` && - LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf" 2>&5`; then - edit_cflags=" - s,///*,/,g - s/^/ / - s/ -I/ $isystem/g - s/^ // - " - LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"` - LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5 -$as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; } - succeeded=yes - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - LIBOTF_CFLAGS="" - LIBOTF_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_LIBOTF=yes - else - HAVE_LIBOTF=no - fi - - if test "$HAVE_LIBOTF" = "yes"; then - -$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5 -$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; } -if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lotf $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char OTF_get_variation_glyphs (); -int -main () -{ -return OTF_get_variation_glyphs (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_otf_OTF_get_variation_glyphs=yes -else - ac_cv_lib_otf_OTF_get_variation_glyphs=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5 -$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; } -if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then : - HAVE_OTF_GET_VARIATION_GLYPHS=yes -else - HAVE_OTF_GET_VARIATION_GLYPHS=no -fi - - if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then - -$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h - - fi - fi - fi - fi - - HAVE_M17N_FLT=no - if test "${HAVE_LIBOTF}" = yes; then - if test "${with_m17n_flt}" != "no"; then - - succeeded=no - - if test "$PKG_CONFIG" = "no" ; then - HAVE_M17N_FLT=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5 -$as_echo_n "checking for m17n-flt... " >&6; } - - if $PKG_CONFIG --exists "m17n-flt" 2>&5 && - M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt" 2>&5` && - M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt" 2>&5`; then - edit_cflags=" - s,///*,/,g - s/^/ / - s/ -I/ $isystem/g - s/^ // - " - M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"` - M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5 -$as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; } - succeeded=yes - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - M17N_FLT_CFLAGS="" - M17N_FLT_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_M17N_FLT=yes - else - HAVE_M17N_FLT=no - fi - - if test "$HAVE_M17N_FLT" = "yes"; then - -$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h - - fi - fi - fi -else - HAVE_XFT=no - HAVE_FREETYPE=no - HAVE_LIBOTF=no - HAVE_M17N_FLT=no -fi - -### End of font-backend (under X11) section. - - - - - - - - - - -### Use -lXpm if available, unless `--with-xpm=no'. -HAVE_XPM=no -LIBXPM= -if test "${HAVE_X11}" = "yes"; then - if test "${with_xpm}" != "no"; then - ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_xpm_h" = x""yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5 -$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; } -if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lXpm -lX11 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XpmReadFileToPixmap (); -int -main () -{ -return XpmReadFileToPixmap (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_Xpm_XpmReadFileToPixmap=yes -else - ac_cv_lib_Xpm_XpmReadFileToPixmap=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5 -$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; } -if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then : - HAVE_XPM=yes -fi - -fi - - - if test "${HAVE_XPM}" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5 -$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include "X11/xpm.h" -#ifndef XpmReturnAllocPixels -no_return_alloc_pixels -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then : - HAVE_XPM=no -else - HAVE_XPM=yes -fi -rm -f conftest* - - - if test "${HAVE_XPM}" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - fi - fi - - if test "${HAVE_XPM}" = "yes"; then - -$as_echo "#define HAVE_XPM 1" >>confdefs.h - - LIBXPM=-lXpm - fi -fi - - -### Use -ljpeg if available, unless `--with-jpeg=no'. -HAVE_JPEG=no -LIBJPEG= -if test "${HAVE_X11}" = "yes"; then - if test "${with_jpeg}" != "no"; then - ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default" -if test "x$ac_cv_header_jerror_h" = x""yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5 -$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; } -if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ljpeg $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char jpeg_destroy_compress (); -int -main () -{ -return jpeg_destroy_compress (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_jpeg_jpeg_destroy_compress=yes -else - ac_cv_lib_jpeg_jpeg_destroy_compress=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5 -$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; } -if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then : - HAVE_JPEG=yes -fi - -fi - - - fi - - if test "${HAVE_JPEG}" = "yes"; then - $as_echo "#define HAVE_JPEG 1" >>confdefs.h - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - version=JPEG_LIB_VERSION - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then : - $as_echo "#define HAVE_JPEG 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5 -$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;} - HAVE_JPEG=no -fi -rm -f conftest* - - fi - if test "${HAVE_JPEG}" = "yes"; then - LIBJPEG=-ljpeg - fi -fi - - -### Use -lpng if available, unless `--with-png=no'. -HAVE_PNG=no -LIBPNG= -if test "${HAVE_X11}" = "yes"; then - if test "${with_png}" != "no"; then - # Debian unstable as of July 2003 has multiple libpngs, and puts png.h - # in /usr/include/libpng. - for ac_header in png.h libpng/png.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - break -fi - -done - - if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5 -$as_echo_n "checking for png_get_channels in -lpng... " >&6; } -if test "${ac_cv_lib_png_png_get_channels+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpng -lz -lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char png_get_channels (); -int -main () -{ -return png_get_channels (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_png_png_get_channels=yes -else - ac_cv_lib_png_png_get_channels=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5 -$as_echo "$ac_cv_lib_png_png_get_channels" >&6; } -if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then : - HAVE_PNG=yes -fi - - fi - fi - - if test "${HAVE_PNG}" = "yes"; then - -$as_echo "#define HAVE_PNG 1" >>confdefs.h - - LIBPNG="-lpng -lz -lm" - - ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H - # include - #else - # include - #endif - -" -if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then : - -else - -$as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h - -fi - - fi -fi - - -### Use -ltiff if available, unless `--with-tiff=no'. -HAVE_TIFF=no -LIBTIFF= -if test "${HAVE_X11}" = "yes"; then - if test "${with_tiff}" != "no"; then - ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" -if test "x$ac_cv_header_tiffio_h" = x""yes; then : - tifflibs="-lz -lm" - # At least one tiff package requires the jpeg library. - if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5 -$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; } -if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ltiff $tifflibs $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char TIFFGetVersion (); -int -main () -{ -return TIFFGetVersion (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_tiff_TIFFGetVersion=yes -else - ac_cv_lib_tiff_TIFFGetVersion=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5 -$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; } -if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then : - HAVE_TIFF=yes -fi - -fi - - - fi - - if test "${HAVE_TIFF}" = "yes"; then - -$as_echo "#define HAVE_TIFF 1" >>confdefs.h - - LIBTIFF=-ltiff - fi -fi - - -### Use -lgif or -lungif if available, unless `--with-gif=no'. -HAVE_GIF=no -LIBGIF= -if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then - ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" -if test "x$ac_cv_header_gif_lib_h" = x""yes; then : - # EGifPutExtensionLast only exists from version libungif-4.1.0b1. -# Earlier versions can crash Emacs. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5 -$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; } -if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgif $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char EGifPutExtensionLast (); -int -main () -{ -return EGifPutExtensionLast (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_gif_EGifPutExtensionLast=yes -else - ac_cv_lib_gif_EGifPutExtensionLast=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5 -$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; } -if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then : - HAVE_GIF=yes -else - HAVE_GIF=maybe -fi - -fi - - - - if test "$HAVE_GIF" = yes; then - LIBGIF=-lgif - elif test "$HAVE_GIF" = maybe; then -# If gif_lib.h but no libgif, try libungif. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5 -$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; } -if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lungif $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char EGifPutExtensionLast (); -int -main () -{ -return EGifPutExtensionLast (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ungif_EGifPutExtensionLast=yes -else - ac_cv_lib_ungif_EGifPutExtensionLast=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5 -$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; } -if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then : - HAVE_GIF=yes -else - HAVE_GIF=no -fi - - test "$HAVE_GIF" = yes && LIBGIF=-lungif - fi - - if test "${HAVE_GIF}" = "yes"; then - -$as_echo "#define HAVE_GIF 1" >>confdefs.h - - fi -fi - - -if test "${HAVE_X11}" = "yes"; then - MISSING="" - WITH_NO="" - test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" && - MISSING="libXpm" && WITH_NO="--with-xpm=no" - test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" && - MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no" - test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" && - MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no" - test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" && - MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no" - test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" && - MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no" - - if test "X${MISSING}" != X; then - as_fn_error "The following required libraries were not found: - $MISSING -Maybe some development libraries/packages are missing? -If you don't want to link with them give - $WITH_NO -as options to configure" "$LINENO" 5 - fi -fi - -### Use -lgpm if available, unless `--with-gpm=no'. -HAVE_GPM=no -LIBGPM= -if test "${with_gpm}" != "no"; then - ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default" -if test "x$ac_cv_header_gpm_h" = x""yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5 -$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; } -if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgpm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char Gpm_Open (); -int -main () -{ -return Gpm_Open (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_gpm_Gpm_Open=yes -else - ac_cv_lib_gpm_Gpm_Open=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5 -$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; } -if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then : - HAVE_GPM=yes -fi - -fi - - - - if test "${HAVE_GPM}" = "yes"; then - -$as_echo "#define HAVE_GPM 1" >>confdefs.h - - LIBGPM=-lgpm - fi -fi - - - - - - -GNUSTEP_CFLAGS= -### Use NeXTstep API to implement GUI. -if test "${HAVE_NS}" = "yes"; then - -$as_echo "#define HAVE_NS 1" >>confdefs.h - - if test "${NS_IMPL_COCOA}" = "yes"; then - -$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h - - fi - if test "${NS_IMPL_GNUSTEP}" = "yes"; then - -$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h - - # See also .m.o rule in Makefile.in */ - # FIXME: are all these flags really needed? Document here why. */ - GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" - ## Extra CFLAGS applied to src/*.m files. - GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" - fi - # We also have mouse menus. - HAVE_MENUS=yes - OTHER_FILES=ns-app -fi - - -### Use session management (-lSM -lICE) if available -HAVE_X_SM=no -LIBXSM= -if test "${HAVE_X11}" = "yes"; then - ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5 -$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; } -if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lSM -lICE $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char SmcOpenConnection (); -int -main () -{ -return SmcOpenConnection (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_SM_SmcOpenConnection=yes -else - ac_cv_lib_SM_SmcOpenConnection=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5 -$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; } -if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then : - HAVE_X_SM=yes -fi - -fi - - - - if test "${HAVE_X_SM}" = "yes"; then - -$as_echo "#define HAVE_X_SM 1" >>confdefs.h - - LIBXSM="-lSM -lICE" - case "$LIBS" in - *-lSM*) ;; - *) LIBS="$LIBXSM $LIBS" ;; - esac - fi -fi - - -### Use libxml (-lxml2) if available -HAVE_LIBXML2=no -if test "${with_xml2}" != "no"; then - ### I'm not sure what the version number should be, so I just guessed. - - succeeded=no - - if test "$PKG_CONFIG" = "no" ; then - HAVE_LIBXML2=no - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5 -$as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; } - - if $PKG_CONFIG --exists "libxml-2.0 > 2.6.17" 2>&5 && - LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.6.17" 2>&5` && - LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.6.17" 2>&5`; then - edit_cflags=" - s,///*,/,g - s/^/ / - s/ -I/ $isystem/g - s/^ // - " - LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"` - LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5 -$as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; } - succeeded=yes - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - LIBXML2_CFLAGS="" - LIBXML2_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 > 2.6.17"` - - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - HAVE_LIBXML2=yes - else - HAVE_LIBXML2=no - fi - - if test "${HAVE_LIBXML2}" = "yes"; then - LIBS="$LIBXML2_LIBS $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5 -$as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; } -if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lxml2 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char htmlReadMemory (); -int -main () -{ -return htmlReadMemory (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_xml2_htmlReadMemory=yes -else - ac_cv_lib_xml2_htmlReadMemory=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5 -$as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; } -if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then : - HAVE_LIBXML2=yes -else - HAVE_LIBXML2=no -fi - - if test "${HAVE_LIBXML2}" = "yes"; then - -$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h - - else - LIBXML2_LIBS="" - LIBXML2_CFLAGS="" - fi - fi -fi - - - -# If netdb.h doesn't declare h_errno, we must declare it by hand. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5 -$as_echo_n "checking whether netdb declares h_errno... " >&6; } -if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -return h_errno; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_cv_netdb_declares_h_errno=yes -else - emacs_cv_netdb_declares_h_errno=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5 -$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; } -if test $emacs_cv_netdb_declares_h_errno = yes; then - -$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h - -fi - -# fmod, logb, and frexp are found in -lm on most systems. -# On HPUX 9.01, -lm does not contain logb, so check for sqrt. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 -$as_echo_n "checking for sqrt in -lm... " >&6; } -if test "${ac_cv_lib_m_sqrt+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char sqrt (); -int -main () -{ -return sqrt (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_sqrt=yes -else - ac_cv_lib_m_sqrt=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 -$as_echo "$ac_cv_lib_m_sqrt" >&6; } -if test "x$ac_cv_lib_m_sqrt" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF - - LIBS="-lm $LIBS" - -fi - - -# Check for mail-locking functions in a "mail" library. Probably this should -# have the same check as for liblockfile below. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5 -$as_echo_n "checking for maillock in -lmail... " >&6; } -if test "${ac_cv_lib_mail_maillock+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmail $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char maillock (); -int -main () -{ -return maillock (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_mail_maillock=yes -else - ac_cv_lib_mail_maillock=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5 -$as_echo "$ac_cv_lib_mail_maillock" >&6; } -if test "x$ac_cv_lib_mail_maillock" = x""yes; then : - have_mail=yes -else - have_mail=no -fi - -if test $have_mail = yes; then - LIBS_MAIL=-lmail - LIBS="$LIBS_MAIL $LIBS" - -$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h - -else - LIBS_MAIL= -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5 -$as_echo_n "checking for maillock in -llockfile... " >&6; } -if test "${ac_cv_lib_lockfile_maillock+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-llockfile $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char maillock (); -int -main () -{ -return maillock (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lockfile_maillock=yes -else - ac_cv_lib_lockfile_maillock=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5 -$as_echo "$ac_cv_lib_lockfile_maillock" >&6; } -if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then : - have_lockfile=yes -else - have_lockfile=no -fi - -if test $have_lockfile = yes; then - LIBS_MAIL=-llockfile - LIBS="$LIBS_MAIL $LIBS" - -$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h - -else -# If we have the shared liblockfile, assume we must use it for mail -# locking (e.g. Debian). If we couldn't link against liblockfile -# (no liblockfile.a installed), ensure that we don't need to. - # Extract the first word of "liblockfile.so", so it can be a program name with args. -set dummy liblockfile.so; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_liblockfile+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$liblockfile"; then - ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH" -for as_dir in $as_dummy -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_liblockfile="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no" -fi -fi -liblockfile=$ac_cv_prog_liblockfile -if test -n "$liblockfile"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5 -$as_echo "$liblockfile" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test $ac_cv_prog_liblockfile = yes; then - as_fn_error "Shared liblockfile found but can't link against it. -This probably means that movemail could lose mail. -There may be a \`development' package to install containing liblockfile." "$LINENO" 5 - fi -fi - - - - - -## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to -## interlock access to the mail spool. The alternative is a lock file named -## /usr/spool/mail/$USER.lock. -mail_lock=no -case "$opsys" in - aix4-2) mail_lock="lockf" ;; - - gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;; - - ## On GNU/Linux systems, both methods are used by various mail programs. - ## I assume most people are using newer mailers that have heard of flock. - ## Change this if you need to. - ## Debian contains a patch which says: ``On Debian/GNU/Linux systems, - ## configure gets the right answers, and that means *NOT* using flock. - ## Using flock is guaranteed to be the wrong thing. See Debian Policy - ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the - ## Debian maintainer hasn't provided a clean fix for Emacs. - ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and - ## HAVE_MAILLOCK_H are defined, so the following appears to be the - ## correct logic. -- fx - ## We must check for HAVE_LIBLOCKFILE too, as movemail does. - ## liblockfile is a Free Software replacement for libmail, used on - ## Debian systems and elsewhere. -rfr. - gnu-*) - mail_lock="flock" - if test $have_mail = yes || test $have_lockfile = yes; then - test $ac_cv_header_maillock_h = yes && mail_lock=no - fi - ;; -esac - -BLESSMAIL_TARGET= -case "$mail_lock" in - flock) -$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h - ;; - - lockf) -$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h - ;; - - *) BLESSMAIL_TARGET="need-blessmail" ;; -esac - - - -for ac_func in gethostname \ -closedir getrusage get_current_dir_name \ -lrand48 logb frexp fmod cbrt setsid \ -fpathconf select euidaccess getpagesize setlocale \ -utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \ -__fpending strsignal setitimer \ -sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \ -gai_strerror mkstemp getline getdelim fsync sync \ -difftime posix_memalign \ -getpwent endpwent getgrent endgrent \ -touchlock \ -cfmakeraw cfsetspeed copysign __executable_start -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -if test $opsys != unixware; then - for ac_func in getwd -do : - ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd" -if test "x$ac_cv_func_getwd" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETWD 1 -_ACEOF - -fi -done - -fi - -## Eric Backus says, HP-UX 9.x on HP 700 machines -## has a broken `rint' in some library versions including math library -## version number A.09.05. -## You can fix the math library by installing patch number PHSS_4630. -## But we can fix it more reliably for Emacs by just not using rint. -## We also skip HAVE_RANDOM - see comments in src/s/hpux10-20.h. -case $opsys in - hpux*) : ;; - *) for ac_func in random rint -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5 -$as_echo_n "checking for __builtin_unwind_init... " >&6; } -if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -__builtin_unwind_init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_cv_func___builtin_unwind_init=yes -else - emacs_cv_func___builtin_unwind_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5 -$as_echo "$emacs_cv_func___builtin_unwind_init" >&6; } -if test $emacs_cv_func___builtin_unwind_init = yes; then - -$as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h - -fi - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 -$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_source+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include /* for off_t */ - #include -int -main () -{ -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_sys_largefile_source=no; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGEFILE_SOURCE 1 -#include /* for off_t */ - #include -int -main () -{ -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_sys_largefile_source=1; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_cv_sys_largefile_source=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 -$as_echo "$ac_cv_sys_largefile_source" >&6; } -case $ac_cv_sys_largefile_source in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source -_ACEOF -;; -esac -rm -rf conftest* - -# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug -# in glibc 2.1.3, but that breaks too many other things. -# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. -if test $ac_cv_sys_largefile_source != unknown; then - -$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 -$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } -if test "${ac_cv_func_getpgrp_void+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Use it with a single arg. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -getpgrp (0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_func_getpgrp_void=no -else - ac_cv_func_getpgrp_void=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5 -$as_echo "$ac_cv_func_getpgrp_void" >&6; } -if test $ac_cv_func_getpgrp_void = yes; then - -$as_echo "#define GETPGRP_VOID 1" >>confdefs.h - -fi - - -# UNIX98 PTYs. -for ac_func in grantpt -do : - ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt" -if test "x$ac_cv_func_grantpt" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GRANTPT 1 -_ACEOF - -fi -done - - -# PTY-related GNU extensions. -for ac_func in getpt -do : - ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt" -if test "x$ac_cv_func_getpt" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETPT 1 -_ACEOF - -fi -done - - -# Check this now, so that we will NOT find the above functions in ncurses. -# That is because we have not set up to link ncurses in lib-src. -# It's better to believe a function is not available -# than to expect to find it in ncurses. -# Also we need tputs and friends to be able to build at all. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 -$as_echo_n "checking for library containing tputs... " >&6; } -# Run a test program that contains a call to tputs, a call that is -# never executed. This tests whether a pre-'main' dynamic linker -# works with the library. It's too much trouble to actually call -# tputs in the test program, due to portability hassles. When -# cross-compiling, assume the test program will run if it links. - -# Maybe curses should be tried earlier? -# See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35 -for tputs_library in '' tinfo ncurses terminfo termcap curses; do - OLIBS=$LIBS - if test -z "$tputs_library"; then - LIBS_TERMCAP= - msg='none required' - else - LIBS_TERMCAP=-l$tputs_library - msg=$LIBS_TERMCAP - LIBS="$LIBS_TERMCAP $LIBS" - fi - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern void tputs (const char *, int, int (*)(int)); - int main (int argc, char **argv) - { - if (argc == 10000) - tputs (argv[0], 0, 0); - return 0; - } - -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -else - msg=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - extern void tputs (const char *, int, int (*)(int)); - int main (int argc, char **argv) - { - if (argc == 10000) - tputs (argv[0], 0, 0); - return 0; - } - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - msg=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - LIBS=$OLIBS - if test "X$msg" != Xno; then - break - fi -done -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 -$as_echo "$msg" >&6; } -if test "X$msg" = Xno; then - as_fn_error "The required function \`tputs' was not found in any library. -The following libraries were tried (in order): - libtinfo, libncurses, libterminfo, libtermcap, libcurses -Please try installing whichever of these libraries is most appropriate -for your system, together with its header files. -For example, a libncurses-dev(el) or similar package." "$LINENO" 5 -fi - -## Use termcap instead of terminfo? -## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500. -TERMINFO=yes -## FIXME? In the cases below where we unconditionally set -## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo, -## if that was found above to have tputs. -## Should we use the gnu* logic everywhere? -case "$opsys" in - ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. - ## The ncurses library has been moved out of the System framework in - ## Mac OS X 10.2. So if configure detects it, set the command-line - ## option to use it. - darwin) LIBS_TERMCAP="-lncurses" ;; - - gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;; - - freebsd) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5 -$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; } - if test "${emacs_cv_freebsd_terminfo+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -#if __FreeBSD_version < 400000 -fail; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_cv_freebsd_terminfo=yes -else - emacs_cv_freebsd_terminfo=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5 -$as_echo "$emacs_cv_freebsd_terminfo" >&6; } - - if test $emacs_cv_freebsd_terminfo = yes; then - LIBS_TERMCAP="-lncurses" - else - TERMINFO=no - LIBS_TERMCAP="-ltermcap" - fi - ;; - - netbsd) - if test "x$LIBS_TERMCAP" != "x-lterminfo"; then - TERMINFO=no - LIBS_TERMCAP="-ltermcap" - fi - ;; - - openbsd) LIBS_TERMCAP="-lncurses" ;; - - ## hpux: Make sure we get select from libc rather than from libcurses - ## because libcurses on HPUX 10.10 has a broken version of select. - ## We used to use -lc -lcurses, but this may be cleaner. - ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly - # set that way, now it uses the default). Isn't this a contradiction? - hpux*) LIBS_TERMCAP="-ltermcap" ;; - -esac - -TERMCAP_OBJ=tparam.o -if test $TERMINFO = yes; then - -$as_echo "#define TERMINFO 1" >>confdefs.h - - TERMCAP_OBJ=terminfo.o -fi - - - - -# Do we have res_init, for detecting changes in /etc/resolv.conf? -# On Darwin, res_init appears not to be useful: see bug#562 and -# http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html -resolv=no - -if test $opsys != darwin; then - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -int -main () -{ -return res_init(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - have_res_init=yes -else - have_res_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test "$have_res_init" = no; then - OLIBS="$LIBS" - LIBS="$LIBS -lresolv" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5 -$as_echo_n "checking for res_init with -lresolv... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -int -main () -{ -return res_init(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - have_res_init=yes -else - have_res_init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5 -$as_echo "$have_res_init" >&6; } - if test "$have_res_init" = yes ; then - resolv=yes - fi - LIBS="$OLIBS" - fi - - if test "$have_res_init" = yes; then - -$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h - - fi -fi -# Do we need the Hesiod library to provide the support routines? -LIBHESIOD= -if test "$with_hesiod" != no ; then - # Don't set $LIBS here -- see comments above. FIXME which comments? - ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send" -if test "x$ac_cv_func_res_send" = x""yes; then : - -else - ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send" -if test "x$ac_cv_func___res_send" = x""yes; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5 -$as_echo_n "checking for res_send in -lresolv... " >&6; } -if test "${ac_cv_lib_resolv_res_send+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lresolv $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char res_send (); -int -main () -{ -return res_send (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_resolv_res_send=yes -else - ac_cv_lib_resolv_res_send=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5 -$as_echo "$ac_cv_lib_resolv_res_send" >&6; } -if test "x$ac_cv_lib_resolv_res_send" = x""yes; then : - resolv=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5 -$as_echo_n "checking for __res_send in -lresolv... " >&6; } -if test "${ac_cv_lib_resolv___res_send+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lresolv $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char __res_send (); -int -main () -{ -return __res_send (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_resolv___res_send=yes -else - ac_cv_lib_resolv___res_send=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5 -$as_echo "$ac_cv_lib_resolv___res_send" >&6; } -if test "x$ac_cv_lib_resolv___res_send" = x""yes; then : - resolv=yes -fi - -fi - -fi - -fi - - if test "$resolv" = yes ; then - RESOLVLIB=-lresolv - else - RESOLVLIB= - fi - ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost" -if test "x$ac_cv_func_hes_getmailhost" = x""yes; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5 -$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; } -if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lhesiod $RESOLVLIB $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char hes_getmailhost (); -int -main () -{ -return hes_getmailhost (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_hesiod_hes_getmailhost=yes -else - ac_cv_lib_hesiod_hes_getmailhost=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5 -$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; } -if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then : - hesiod=yes -else - : -fi - -fi - - - if test x"$hesiod" = xyes; then - -$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h - - LIBHESIOD=-lhesiod - fi -fi - - -# Do we need libresolv (due to res_init or Hesiod)? -if test "$resolv" = yes && test $opsys != darwin; then - -$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h - - LIBRESOLV=-lresolv -else - LIBRESOLV= -fi - - -# These tell us which Kerberos-related libraries to use. -COM_ERRLIB= -CRYPTOLIB= -KRB5LIB= -DESLIB= -KRB4LIB= - -if test "${with_kerberos}" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 -$as_echo_n "checking for com_err in -lcom_err... " >&6; } -if test "${ac_cv_lib_com_err_com_err+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcom_err $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char com_err (); -int -main () -{ -return com_err (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_com_err_com_err=yes -else - ac_cv_lib_com_err_com_err=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5 -$as_echo "$ac_cv_lib_com_err_com_err" >&6; } -if test "x$ac_cv_lib_com_err_com_err" = x""yes; then : - have_com_err=yes -else - have_com_err=no -fi - - if test $have_com_err = yes; then - COM_ERRLIB=-lcom_err - LIBS="$COM_ERRLIB $LIBS" - -$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5 -$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; } -if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcrypto $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char mit_des_cbc_encrypt (); -int -main () -{ -return mit_des_cbc_encrypt (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_crypto_mit_des_cbc_encrypt=yes -else - ac_cv_lib_crypto_mit_des_cbc_encrypt=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5 -$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then : - have_crypto=yes -else - have_crypto=no -fi - - if test $have_crypto = yes; then - CRYPTOLIB=-lcrypto - LIBS="$CRYPTOLIB $LIBS" - -$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5 -$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; } -if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lk5crypto $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char mit_des_cbc_encrypt (); -int -main () -{ -return mit_des_cbc_encrypt (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes -else - ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5 -$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then : - have_k5crypto=yes -else - have_k5crypto=no -fi - - if test $have_k5crypto = yes; then - CRYPTOLIB=-lk5crypto - LIBS="$CRYPTOLIB $LIBS" - -$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 -$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } -if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkrb5 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char krb5_init_context (); -int -main () -{ -return krb5_init_context (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_krb5_krb5_init_context=yes -else - ac_cv_lib_krb5_krb5_init_context=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 -$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; } -if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then : - have_krb5=yes -else - have_krb5=no -fi - - if test $have_krb5=yes; then - KRB5LIB=-lkrb5 - LIBS="$KRB5LIB $LIBS" - -$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h - - fi - if test "${with_kerberos5}" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5 -$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; } -if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldes425 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char des_cbc_encrypt (); -int -main () -{ -return des_cbc_encrypt (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_des425_des_cbc_encrypt=yes -else - ac_cv_lib_des425_des_cbc_encrypt=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 -$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then : - have_des425=yes -else - have_des425=no -fi - - if test $have_des425 = yes; then - DESLIB=-ldes425 - LIBS="$DESLIB $LIBS" - -$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5 -$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; } -if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldes $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char des_cbc_encrypt (); -int -main () -{ -return des_cbc_encrypt (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_des_des_cbc_encrypt=yes -else - ac_cv_lib_des_des_cbc_encrypt=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 -$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then : - have_des=yes -else - have_des=no -fi - - if test $have_des = yes; then - DESLIB=-ldes - LIBS="$DESLIB $LIBS" - -$as_echo "#define HAVE_LIBDES 1" >>confdefs.h - - fi - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5 -$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; } -if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkrb4 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char krb_get_cred (); -int -main () -{ -return krb_get_cred (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_krb4_krb_get_cred=yes -else - ac_cv_lib_krb4_krb_get_cred=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5 -$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; } -if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then : - have_krb4=yes -else - have_krb4=no -fi - - if test $have_krb4 = yes; then - KRB4LIB=-lkrb4 - LIBS="$KRB4LIB $LIBS" - -$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5 -$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; } -if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkrb $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char krb_get_cred (); -int -main () -{ -return krb_get_cred (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_krb_krb_get_cred=yes -else - ac_cv_lib_krb_krb_get_cred=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5 -$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; } -if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then : - have_krb=yes -else - have_krb=no -fi - - if test $have_krb = yes; then - KRB4LIB=-lkrb - LIBS="$KRB4LIB $LIBS" - -$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h - - fi - fi - fi - - if test "${with_kerberos5}" != no; then - for ac_header in krb5.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default" -if test "x$ac_cv_header_krb5_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_H 1 -_ACEOF - ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include -" -if test "x$ac_cv_member_krb5_error_text" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_ERROR_TEXT 1 -_ACEOF - - -fi -ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include -" -if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_ERROR_E_TEXT 1 -_ACEOF - - -fi - -fi - -done - - else - for ac_header in des.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default" -if test "x$ac_cv_header_des_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DES_H 1 -_ACEOF - -else - for ac_header in kerberosIV/des.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KERBEROSIV_DES_H 1 -_ACEOF - -else - for ac_header in kerberos/des.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberos_des_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KERBEROS_DES_H 1 -_ACEOF - -fi - -done - -fi - -done - -fi - -done - - for ac_header in krb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default" -if test "x$ac_cv_header_krb_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KRB_H 1 -_ACEOF - -else - for ac_header in kerberosIV/krb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KERBEROSIV_KRB_H 1 -_ACEOF - -else - for ac_header in kerberos/krb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KERBEROS_KRB_H 1 -_ACEOF - -fi - -done - -fi - -done - -fi - -done - - fi - for ac_header in com_err.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" -if test "x$ac_cv_header_com_err_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_COM_ERR_H 1 -_ACEOF - -fi - -done - -fi - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5 -$as_echo_n "checking whether localtime caches TZ... " >&6; } -if test "${emacs_cv_localtime_cache+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test x$ac_cv_func_tzset = xyes; then -if test "$cross_compiling" = yes; then : - # If we have tzset, assume the worst when cross-compiling. -emacs_cv_localtime_cache=yes -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -char TZ_GMT0[] = "TZ=GMT0"; -char TZ_PST8[] = "TZ=PST8"; -main() -{ - time_t now = time ((time_t *) 0); - int hour_GMT0, hour_unset; - if (putenv (TZ_GMT0) != 0) - exit (1); - hour_GMT0 = localtime (&now)->tm_hour; - unsetenv("TZ"); - hour_unset = localtime (&now)->tm_hour; - if (putenv (TZ_PST8) != 0) - exit (1); - if (localtime (&now)->tm_hour == hour_GMT0) - exit (1); - unsetenv("TZ"); - if (localtime (&now)->tm_hour != hour_unset) - exit (1); - exit (0); -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - emacs_cv_localtime_cache=no -else - emacs_cv_localtime_cache=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -else - # If we lack tzset, report that localtime does not cache TZ, - # since we can't invalidate the cache if we don't have tzset. - emacs_cv_localtime_cache=no -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5 -$as_echo "$emacs_cv_localtime_cache" >&6; } -if test $emacs_cv_localtime_cache = yes; then - -$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h - -fi - -ok_so_far=yes -ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" -if test "x$ac_cv_func_socket" = x""yes; then : - -else - ok_so_far=no -fi - -if test $ok_so_far = yes; then - ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" -if test "x$ac_cv_header_netinet_in_h" = x""yes; then : - -else - ok_so_far=no -fi - - -fi -if test $ok_so_far = yes; then - ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" -if test "x$ac_cv_header_arpa_inet_h" = x""yes; then : - -else - ok_so_far=no -fi - - -fi -if test $ok_so_far = yes; then - -$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h - -fi - -if test -f /usr/lpp/X11/bin/smt.exp; then - -$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5 -$as_echo_n "checking whether system supports dynamic ptys... " >&6; } -if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - -for ac_header in vfork.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" -if test "x$ac_cv_header_vfork_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_VFORK_H 1 -_ACEOF - -fi - -done - -for ac_func in fork vfork -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -if test "x$ac_cv_func_fork" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 -$as_echo_n "checking for working fork... " >&6; } -if test "${ac_cv_func_fork_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_fork_works=cross -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* By Ruediger Kuhlmann. */ - return fork () < 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_fork_works=yes -else - ac_cv_func_fork_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 -$as_echo "$ac_cv_func_fork_works" >&6; } - -else - ac_cv_func_fork_works=$ac_cv_func_fork -fi -if test "x$ac_cv_func_fork_works" = xcross; then - case $host in - *-*-amigaos* | *-*-msdosdjgpp*) - # Override, as these systems have only a dummy fork() stub - ac_cv_func_fork_works=no - ;; - *) - ac_cv_func_fork_works=yes - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 -$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} -fi -ac_cv_func_vfork_works=$ac_cv_func_vfork -if test "x$ac_cv_func_vfork" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 -$as_echo_n "checking for working vfork... " >&6; } -if test "${ac_cv_func_vfork_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_vfork_works=cross -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Thanks to Paul Eggert for this test. */ -$ac_includes_default -#include -#ifdef HAVE_VFORK_H -# include -#endif -/* On some sparc systems, changes by the child to local and incoming - argument registers are propagated back to the parent. The compiler - is told about this with #include , but some compilers - (e.g. gcc -O) don't grok . Test for this by using a - static variable whose address is put into a register that is - clobbered by the vfork. */ -static void -#ifdef __cplusplus -sparc_address_test (int arg) -# else -sparc_address_test (arg) int arg; -#endif -{ - static pid_t child; - if (!child) { - child = vfork (); - if (child < 0) { - perror ("vfork"); - _exit(2); - } - if (!child) { - arg = getpid(); - write(-1, "", 0); - _exit (arg); - } - } -} - -int -main () -{ - pid_t parent = getpid (); - pid_t child; - - sparc_address_test (0); - - child = vfork (); - - if (child == 0) { - /* Here is another test for sparc vfork register problems. This - test uses lots of local variables, at least as many local - variables as main has allocated so far including compiler - temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris - 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should - reuse the register of parent for one of the local variables, - since it will think that parent can't possibly be used any more - in this routine. Assigning to the local variable will thus - munge parent in the parent process. */ - pid_t - p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), - p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); - /* Convince the compiler that p..p7 are live; otherwise, it might - use the same hardware register for all 8 local variables. */ - if (p != p1 || p != p2 || p != p3 || p != p4 - || p != p5 || p != p6 || p != p7) - _exit(1); - - /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent - from child file descriptors. If the child closes a descriptor - before it execs or exits, this munges the parent's descriptor - as well. Test for this by closing stdout in the child. */ - _exit(close(fileno(stdout)) != 0); - } else { - int status; - struct stat st; - - while (wait(&status) != child) - ; - return ( - /* Was there some problem with vforking? */ - child < 0 - - /* Did the child fail? (This shouldn't happen.) */ - || status - - /* Did the vfork/compiler bug occur? */ - || parent != getpid() - - /* Did the file descriptor bug occur? */ - || fstat(fileno(stdout), &st) != 0 - ); - } -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_vfork_works=yes -else - ac_cv_func_vfork_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 -$as_echo "$ac_cv_func_vfork_works" >&6; } - -fi; -if test "x$ac_cv_func_fork_works" = xcross; then - ac_cv_func_vfork_works=$ac_cv_func_vfork - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 -$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} -fi - -if test "x$ac_cv_func_vfork_works" = xyes; then - -$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h - -else - -$as_echo "#define vfork fork" >>confdefs.h - -fi -if test "x$ac_cv_func_fork_works" = xyes; then - -$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h - -fi - - -for ac_func in snprintf -do : - ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" -if test "x$ac_cv_func_snprintf" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SNPRINTF 1 -_ACEOF - -fi -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 -$as_echo_n "checking for nl_langinfo and CODESET... " >&6; } -if test "${emacs_cv_langinfo_codeset+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -char* cs = nl_langinfo(CODESET); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_cv_langinfo_codeset=yes -else - emacs_cv_langinfo_codeset=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5 -$as_echo "$emacs_cv_langinfo_codeset" >&6; } -if test $emacs_cv_langinfo_codeset = yes; then - -$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 -$as_echo_n "checking for mbstate_t... " >&6; } -if test "${ac_cv_type_mbstate_t+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -# include -int -main () -{ -mbstate_t x; return sizeof x; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_mbstate_t=yes -else - ac_cv_type_mbstate_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 -$as_echo "$ac_cv_type_mbstate_t" >&6; } - if test $ac_cv_type_mbstate_t = yes; then - -$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h - - else - -$as_echo "#define mbstate_t int" >>confdefs.h - - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5 -$as_echo_n "checking for C restricted array declarations... " >&6; } -if test "${emacs_cv_c_restrict_arr+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void fred (int x[__restrict]); -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - emacs_cv_c_restrict_arr=yes -else - emacs_cv_c_restrict_arr=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5 -$as_echo "$emacs_cv_c_restrict_arr" >&6; } -if test "$emacs_cv_c_restrict_arr" = yes; then - -$as_echo "#define __restrict_arr __restrict" >>confdefs.h - -fi - - - -$as_echo "#define CLASH_DETECTION 1" >>confdefs.h - - -## Note: PTYs are broken on darwin <6. Use at your own risk. - -$as_echo "#define HAVE_PTYS 1" >>confdefs.h - - - -$as_echo "#define HAVE_SOCKETS 1" >>confdefs.h - - - - - -case $opsys in - aix4-2) - if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then - $as_echo "#define NO_EDITRES 1" >>confdefs.h - - fi - ;; - - hpux*) - $as_echo "#define NO_EDITRES 1" >>confdefs.h - - ;; -esac - - -case $opsys in - darwin | gnu | hpux* | *bsd ) - -$as_echo "#define NO_TERMIO 1" >>confdefs.h - - ;; - - irix6-5 | sol2* | unixware ) - -$as_echo "#define NSIG_MINIMUM 32" >>confdefs.h - - ;; -esac - - -case $opsys in - hpux* | irix6-5 | openbsd | sol2* | unixware ) - -$as_echo "#define BROKEN_SIGIO 1" >>confdefs.h - - ;; - - aix4-2) - -$as_echo "#define BROKEN_FIONREAD 1" >>confdefs.h - - -$as_echo "#define BROKEN_SIGAIO 1" >>confdefs.h - - -$as_echo "#define BROKEN_SIGPOLL 1" >>confdefs.h - - -$as_echo "#define BROKEN_SIGPTY 1" >>confdefs.h - - - -$as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h - - ;; - - freebsd) - -$as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h - - ;; - - darwin) - -$as_echo "#define NO_ABORT 1" >>confdefs.h - - ;; -esac - -case $opsys in - gnu-* | sol2-10 ) - -$as_echo "#define HAVE_PROCFS 1" >>confdefs.h - - ;; -esac - -case $opsys in - darwin | freebsd | netbsd | openbsd ) - -$as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h - - ;; -esac - -case $opsys in - netbsd | openbsd) sound_device="/dev/audio" ;; - *) sound_device="/dev/dsp" ;; -esac - - -cat >>confdefs.h <<_ACEOF -#define DEFAULT_SOUND_DEVICE "$sound_device" -_ACEOF - - - -case $opsys in - darwin | gnu-linux | gnu-kfreebsd ) - -$as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h - - ;; -esac - - -case $opsys in - cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd) - -$as_echo "#define NARROWPROTO 1" >>confdefs.h - - ;; -esac - - - - - - - - -case $opsys in - aix4-2 ) - $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++) " >>confdefs.h - - $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\"); " >>confdefs.h - - $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd)); " >>confdefs.h - - ;; - - cygwin ) - $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++) " >>confdefs.h - - $as_echo "#define PTY_OPEN do { int dummy; SIGMASKTYPE mask; mask = sigblock (sigmask (SIGCHLD)); if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) fd = -1; sigsetmask (mask); if (fd >= 0) emacs_close (dummy); } while (0) " >>confdefs.h - - $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h - - $as_echo "#define PTY_TTY_NAME_SPRINTF " >>confdefs.h - - ;; - - darwin ) - $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++) " >>confdefs.h - - $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h - - $as_echo "#define PTY_OPEN do { int slave; if (openpty (&fd, &slave, pty_name, NULL, NULL) == -1) fd = -1; else emacs_close (slave); } while (0) " >>confdefs.h - - $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h - - $as_echo "#define PTY_TTY_NAME_SPRINTF " >>confdefs.h - - ;; - - gnu | freebsd | netbsd | openbsd ) - $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h - - ;; - - gnu-linux | gnu-kfreebsd ) - if test "x$ac_cv_func_grantpt" = xyes; then - -$as_echo "#define UNIX98_PTYS 1" >>confdefs.h - - $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++) " >>confdefs.h - - $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname; sigblock (sigmask (SIGCHLD)); if (grantpt (fd) == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname(fd))) { sigunblock (sigmask (SIGCHLD)); close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); sigunblock (sigmask (SIGCHLD)); } " >>confdefs.h - - if test "x$ac_cv_func_getpt" = xyes; then - $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h - - $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h - - else - $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\"); " >>confdefs.h - - fi - else - $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h - - fi - ;; - - hpux*) - $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h - - $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i); " >>confdefs.h - - $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i); " >>confdefs.h - - ;; - - irix6-5 ) - $as_echo "#define PTY_ITERATION /**/" >>confdefs.h - - $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h - - $as_echo "#define PTY_OPEN { struct sigaction ocstat, cstat; struct stat stb; char * name; sigemptyset(&cstat.sa_mask); cstat.sa_handler = SIG_DFL; cstat.sa_flags = 0; sigaction(SIGCLD, &cstat, &ocstat); name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); sigaction(SIGCLD, &ocstat, (struct sigaction *)0); if (name == 0) return -1; if (fd < 0) return -1; if (fstat (fd, &stb) < 0) return -1; strcpy (pty_name, name); } " >>confdefs.h - - $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h - - $as_echo "#define PTY_TTY_NAME_SPRINTF " >>confdefs.h - - ;; - - sol2* ) - $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock (sigmask (SIGCLD)); if (grantpt (fd) == -1) { emacs_close (fd); return -1; } sigunblock (sigmask (SIGCLD)); if (unlockpt (fd) == -1) { emacs_close (fd); return -1; } if (!(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); } " >>confdefs.h - - ;; - - unixware ) - $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock(sigmask(SIGCLD)); if (grantpt(fd) == -1) fatal(\"could not grant slave pty\"); sigunblock(sigmask(SIGCLD)); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); } " >>confdefs.h - - ;; -esac - - -case $opsys in - sol2* | unixware ) - $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h - - $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\"); " >>confdefs.h - - -$as_echo "#define SETUP_SLAVE_PTY if (ioctl (xforkin, I_PUSH, \"ptem\") == -1) fatal (\"ioctl I_PUSH ptem\"); if (ioctl (xforkin, I_PUSH, \"ldterm\") == -1) fatal (\"ioctl I_PUSH ldterm\"); if (ioctl (xforkin, I_PUSH, \"ttcompat\") == -1) fatal (\"ioctl I_PUSH ttcompat\");" >>confdefs.h - - ;; -esac - - - - -case $opsys in - aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd ) - $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h - - ;; - - gnu-linux | gnu-kfreebsd ) - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5 -$as_echo_n "checking for signals via characters... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#if LINUX_VERSION_CODE < 0x20400 -# error "Linux version too old" -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - emacs_signals_via_chars=yes -else - emacs_signals_via_chars=no -fi -rm -f conftest.err conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5 -$as_echo "$emacs_signals_via_chars" >&6; } - test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h - - ;; -esac - - - - - - -case $opsys in - cygwin | darwin | freebsd | netbsd | openbsd ) - $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)" >>confdefs.h - - ;; - - unixware) - $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__ptr - (FILE)->__base)" >>confdefs.h - - ;; - - gnu | gnu-linux | gnu-kfreebsd ) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of pending output formalism" >&5 -$as_echo_n "checking for style of pending output formalism... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#if !defined (_IO_STDIO_H) && !defined (_STDIO_USES_IOSTREAM) -# error "stdio definitions not found" -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - emacs_pending_output=new -else - emacs_pending_output=unknown -fi -rm -f conftest.err conftest.$ac_ext - - if test $emacs_pending_output = unknown; then - case $opsys in - gnu-linux | gnu-kfreebsd) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifndef __UCLIBC__ -# error "not using uclibc" -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - emacs_pending_output=uclibc -else - emacs_pending_output=old -fi -rm -f conftest.err conftest.$ac_ext - ;; - esac - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_pending_output" >&5 -$as_echo "$emacs_pending_output" >&6; } - - case $emacs_pending_output in - new) - $as_echo "#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)" >>confdefs.h - - ;; - uclibc) - $as_echo "#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufpos - (FILE)->__bufstart)" >>confdefs.h - - ;; - old) - $as_echo "#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) ((FILE)->_pptr - (FILE)->_pbase)" >>confdefs.h - - ;; - esac - ;; -esac - - - - - -case $opsys in - gnu) - $as_echo "#define DATA_START ({ extern int data_start; (char *) &data_start; })" >>confdefs.h - - ;; - - hpux*) - $as_echo "#define DATA_START 0x40000000" >>confdefs.h - - $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h - - ;; - irix6-5) - $as_echo "#define DATA_START 0x10000000" >>confdefs.h - - $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h - - ;; -esac - - - - - -case $opsys in - darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h - ;; - - gnu | freebsd | netbsd | openbsd ) - -$as_echo "#define TABDLY OXTABS" >>confdefs.h - - $as_echo "#define TAB3 OXTABS" >>confdefs.h - - ;; - - gnu-linux | gnu-kfreebsd ) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifndef __i386__ -# error "not i386" -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - $as_echo "#define ULIMIT_BREAK_VALUE (32*1024*1024)" >>confdefs.h - -fi -rm -f conftest.err conftest.$ac_ext - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifndef __ia64__ -# error "not ia64" -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -$as_echo "#define GC_MARK_SECONDARY_STACK() do { extern void *__libc_ia64_register_backing_store_base; __builtin_ia64_flushrs (); mark_memory (__libc_ia64_register_backing_store_base, __builtin_ia64_bsp ());} while (0)" >>confdefs.h - -fi -rm -f conftest.err conftest.$ac_ext - ;; - - hpux*) - -$as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h - - ;; - - irix6-5) - $as_echo "#define ULIMIT_BREAK_VALUE 0x14000000" >>confdefs.h - - ;; -esac - - - - - - - -case $opsys in - aix4-2 | hpux* | unixware) - $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h - - ;; - - gnu-linux | gnu-kfreebsd ) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#if defined __i386__ || defined __sparc__ || defined __mc68000__ \ - || defined __alpha__ || defined __mips__ || defined __s390__ \ - || defined __arm__ || defined __powerpc__ || defined __amd64__ \ - || defined __ia64__ || defined __sh__ -/* ok */ -#else -# error "setjmp not known to work on this arch" -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h - -else - $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h - -fi -rm -f conftest.err conftest.$ac_ext - ;; -esac - - -if test x$GCC = xyes; then - $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h - -else - case $opsys in - freebsd | netbsd | openbsd | irix6-5 | sol2* ) - $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h - - ;; - esac -fi - -case $opsys in - hpux* | sol2* ) - -$as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h - - ;; -esac - - - - - - - -case $opsys in - aix4-2) - $as_echo "#define USG /**/" >>confdefs.h - - $as_echo "#define USG5 /**/" >>confdefs.h - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifndef _AIX -# error "_AIX not defined" -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - -$as_echo "#define _AIX /**/" >>confdefs.h - -fi -rm -f conftest.err conftest.$ac_ext - ;; - - cygwin) - opsysfile= - -$as_echo "#define CYGWIN 1" >>confdefs.h - - ;; - - darwin) - $as_echo "#define BSD4_2 /**/" >>confdefs.h - - $as_echo "#define BSD_SYSTEM /**/" >>confdefs.h - - -$as_echo "#define DARWIN_OS /**/" >>confdefs.h - - ;; - - freebsd) - $as_echo "#define BSD4_2 /**/" >>confdefs.h - - -$as_echo "#define BSD_SYSTEM_AHB 1" >>confdefs.h - - ;; - - gnu | netbsd | openbsd ) - $as_echo "#define BSD4_2 /**/" >>confdefs.h - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifndef BSD_SYSTEM -# error "BSD_SYSTEM not defined" -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - $as_echo "#define BSD_SYSTEM 43" >>confdefs.h - -fi -rm -f conftest.err conftest.$ac_ext - ;; - - gnu-linux | gnu-kfreebsd ) - $as_echo "#define USG /**/" >>confdefs.h - - -$as_echo "#define GNU_LINUX /**/" >>confdefs.h - - ;; - - hpux*) - $as_echo "#define USG /**/" >>confdefs.h - - $as_echo "#define USG5 /**/" >>confdefs.h - - -$as_echo "#define HPUX /**/" >>confdefs.h - - ;; - - irix6-5) - $as_echo "#define USG /**/" >>confdefs.h - - $as_echo "#define USG5 /**/" >>confdefs.h - - -$as_echo "#define IRIX6_5 /**/" >>confdefs.h - - ;; - - sol2*) - $as_echo "#define USG /**/" >>confdefs.h - - $as_echo "#define USG5 /**/" >>confdefs.h - - -$as_echo "#define SOLARIS2 /**/" >>confdefs.h - - ;; - - unixware) - $as_echo "#define USG /**/" >>confdefs.h - - $as_echo "#define USG5 /**/" >>confdefs.h - - ;; -esac - - -case $opsys in - cygwin) - -$as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h - - ;; - - gnu) opsysfile= ;; - - gnu-kfreebsd) opsysfile="s/gnu-linux.h" ;; - - hpux11) - -$as_echo "#define BROKEN_SA_RESTART 1" >>confdefs.h - - -$as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h - - - opsysfile="s/hpux10-20.h" - ;; - - irix6-5) - -$as_echo "#define PREFER_VSUSP 1" >>confdefs.h - - -$as_echo "#define SETPGRP_RELEASES_CTTY 1" >>confdefs.h - - ;; - - openbsd) opsysfile="s/netbsd.h" ;; - - sol2-10) - -$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h - - opsysfile="s/sol2-6.h" - ;; -esac - -# Set up the CFLAGS for real compilation, so we can substitute it. -CFLAGS="$REAL_CFLAGS" -CPPFLAGS="$REAL_CPPFLAGS" - -## Hack to detect a buggy GCC version. -if test "x$GCC" = xyes \ - && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \ - && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \ - && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then - as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 -fi - -version=$PACKAGE_VERSION - -### Specify what sort of things we'll be editing into Makefile and config.h. -### Use configuration here uncanonicalized to avoid exceeding size limits. - - -## Unused? - - - - - - - - - - - - - - - - - - - - - - -## FIXME? Nothing uses @LD_SWITCH_X_SITE@. -## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the -## end of LIBX_BASE, but nothing ever set it. - - - - -## Used in lwlib/Makefile.in. - -if test -n "${opsysfile}"; then - S_FILE="\$(srcdir)/${opsysfile}" -else - S_FILE= -fi - - - - - - - - - -cat >>confdefs.h <<_ACEOF -#define EMACS_CONFIGURATION "${canonical}" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define EMACS_CONFIG_OPTIONS "${ac_configure_args}" -_ACEOF - -if test -n "$opsysfile"; then - -cat >>confdefs.h <<_ACEOF -#define config_opsysfile "${opsysfile}" -_ACEOF - -fi - -XMENU_OBJ= -XOBJ= -FONT_OBJ= -if test "${HAVE_X_WINDOWS}" = "yes" ; then - -$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h - - XMENU_OBJ=xmenu.o - XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o" - FONT_OBJ=xfont.o - if test "$HAVE_XFT" = "yes"; then - FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" - elif test "$HAVE_FREETYPE" = "yes"; then - FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o" - fi - -fi - - - - -WIDGET_OBJ= -MOTIF_LIBW= -if test "${USE_X_TOOLKIT}" != "none" ; then - WIDGET_OBJ=widget.o - -$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h - - if test "${USE_X_TOOLKIT}" = "LUCID"; then - -$as_echo "#define USE_LUCID 1" >>confdefs.h - - elif test "${USE_X_TOOLKIT}" = "MOTIF"; then - -$as_echo "#define USE_MOTIF 1" >>confdefs.h - - MOTIF_LIBW=-lXm - case "$opsys" in - gnu-linux) - ## Paul Abrahams says this is needed. - MOTIF_LIBW="$MOTIF_LIBW -lXpm" - ;; - - unixware) - ## Richard Anthony Ryan - ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2. - MOTIF_LIBW="MOTIF_LIBW -lXimp" - ;; - - aix4-2) - ## olson@mcs.anl.gov says -li18n is needed by -lXm. - MOTIF_LIBW="$MOTIF_LIBW -li18n" - ;; - esac - MOTIF_LIBW="$MOTIF_LIBW $LIBXP" - fi -fi - - -TOOLKIT_LIBW= -case "$USE_X_TOOLKIT" in - MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; - LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; - none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;; -esac - - -if test "$USE_X_TOOLKIT" = "none"; then - LIBXT_OTHER="\$(LIBXSM)" - OLDXMENU_TARGET="really-oldXMenu" -else - LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" - OLDXMENU_TARGET="really-lwlib" -fi - - -## The X Menu stuff is present in the X10 distribution, but missing -## from X11. If we have X10, just use the installed library; -## otherwise, use our own copy. -if test "${HAVE_X11}" = "yes" ; then - -$as_echo "#define HAVE_X11 1" >>confdefs.h - - - if test "$USE_X_TOOLKIT" = "none"; then - OLDXMENU="\${oldXMenudir}/libXMenu11.a" - else - OLDXMENU="\${lwlibdir}/liblw.a" - fi - LIBXMENU="\$(OLDXMENU)" - LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" - OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}" -else - ## For a syntactically valid Makefile; not actually used for anything. - ## See comments in src/Makefile.in. - OLDXMENU=nothing - ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?). - if test "${HAVE_X_WINDOWS}" = "yes"; then - LIBXMENU="-lXMenu" - else - LIBXMENU= - fi - LIBX_OTHER= - OLDXMENU_DEPS= -fi - -if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then - OLDXMENU_TARGET= - OLDXMENU=nothing - LIBXMENU= - OLDXMENU_DEPS= -fi - - - - - - - -if test "${HAVE_MENUS}" = "yes" ; then - -$as_echo "#define HAVE_MENUS 1" >>confdefs.h - -fi - -if test "${GNU_MALLOC}" = "yes" ; then - -$as_echo "#define GNU_MALLOC 1" >>confdefs.h - -fi - -RALLOC_OBJ= -if test "${REL_ALLOC}" = "yes" ; then - -$as_echo "#define REL_ALLOC 1" >>confdefs.h - - - test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o -fi - - -if test "$opsys" = "cygwin"; then - CYGWIN_OBJ="sheap.o" - ## Cygwin differs because of its unexec(). - PRE_ALLOC_OBJ= - POST_ALLOC_OBJ=lastfile.o -else - CYGWIN_OBJ= - PRE_ALLOC_OBJ=lastfile.o - POST_ALLOC_OBJ= -fi - - - +CFLAGS=$SAVE_CFLAGS +LIBS=$SAVE_LIBS case "$opsys" in aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;; @@ -23726,7 +23740,11 @@ #### It makes printing result more understandable as using GTK sets #### toolkit_scroll_bars to yes by default. if test "${HAVE_GTK}" = "yes"; then - USE_X_TOOLKIT=GTK + if test "${with_gtk3}" = "yes"; then + USE_X_TOOLKIT=GTK3 + else + USE_X_TOOLKIT=GTK + fi fi echo " ------------------------------------------------------------ revno: 109118 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2012-07-17 13:12:24 +0400 message: Cleanup and convert miscellaneous checks to eassert. * alloc.c (mark_interval): Fix comment, partially rephrase old comment from intervals.h (see below). * intervals.c (find_interval, adjust_intervals_for_insertion) (delete_interval, adjust_intervals_for_deletion) (graft_intervals_into_buffer, temp_set_point_both, copy_intervals): Convert to eassert. (adjust_intervals_for_insertion, make_new_interval): Remove obsolete and unused code. * intervals.h (struct interval): Remove obsolete comment. * textprotp.c (erase_properties): Remove unused code. (Fadd_text_properties, set_text_properties_1, Fremove_text_properties) (Fremove_list_of_text_properties): Convert to eassert. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-17 07:43:01 +0000 +++ src/ChangeLog 2012-07-17 09:12:24 +0000 @@ -1,3 +1,19 @@ +2012-07-17 Dmitry Antipov + + Cleanup and convert miscellaneous checks to eassert. + * alloc.c (mark_interval): Fix comment, partially rephrase + old comment from intervals.h (see below). + * intervals.c (find_interval, adjust_intervals_for_insertion) + (delete_interval, adjust_intervals_for_deletion) + (graft_intervals_into_buffer, temp_set_point_both, copy_intervals): + Convert to eassert. + (adjust_intervals_for_insertion, make_new_interval): + Remove obsolete and unused code. + * intervals.h (struct interval): Remove obsolete comment. + * textprotp.c (erase_properties): Remove unused code. + (Fadd_text_properties, set_text_properties_1, Fremove_text_properties) + (Fremove_list_of_text_properties): Convert to eassert. + 2012-07-17 Chong Yidong * editfns.c (Finsert_char): Doc fix. === modified file 'src/alloc.c' --- src/alloc.c 2012-07-17 07:15:50 +0000 +++ src/alloc.c 2012-07-17 09:12:24 +0000 @@ -1533,7 +1533,9 @@ static void mark_interval (register INTERVAL i, Lisp_Object dummy) { - eassert (!i->gcmarkbit); /* Intervals are never shared. */ + /* Intervals should never be shared. So, if extra internal checking is + enabled, GC aborts if it seems to have visited an interval twice. */ + eassert (!i->gcmarkbit); i->gcmarkbit = 1; mark_object (i->plist); } === modified file 'src/intervals.c' --- src/intervals.c 2012-06-16 12:24:15 +0000 +++ src/intervals.c 2012-07-17 09:12:24 +0000 @@ -629,8 +629,7 @@ relative_position -= BUF_BEG (XBUFFER (parent)); } - if (relative_position > TOTAL_LENGTH (tree)) - abort (); /* Paranoia */ + eassert (relative_position <= TOTAL_LENGTH (tree)); if (!handling_signal) tree = balance_possible_root_interval (tree); @@ -785,68 +784,6 @@ } } - -#if 0 -/* Traverse a path down the interval tree TREE to the interval - containing POSITION, adjusting all nodes on the path for - an addition of LENGTH characters. Insertion between two intervals - (i.e., point == i->position, where i is second interval) means - text goes into second interval. - - Modifications are needed to handle the hungry bits -- after simply - finding the interval at position (don't add length going down), - if it's the beginning of the interval, get the previous interval - and check the hungry bits of both. Then add the length going back up - to the root. */ - -static INTERVAL -adjust_intervals_for_insertion (INTERVAL tree, ptrdiff_t position, - ptrdiff_t length) -{ - register ptrdiff_t relative_position; - register INTERVAL this; - - if (TOTAL_LENGTH (tree) == 0) /* Paranoia */ - abort (); - - /* If inserting at point-max of a buffer, that position - will be out of range */ - if (position > TOTAL_LENGTH (tree)) - position = TOTAL_LENGTH (tree); - relative_position = position; - this = tree; - - while (1) - { - if (relative_position <= LEFT_TOTAL_LENGTH (this)) - { - this->total_length += length; - CHECK_TOTAL_LENGTH (this); - this = this->left; - } - else if (relative_position > (TOTAL_LENGTH (this) - - RIGHT_TOTAL_LENGTH (this))) - { - relative_position -= (TOTAL_LENGTH (this) - - RIGHT_TOTAL_LENGTH (this)); - this->total_length += length; - CHECK_TOTAL_LENGTH (this); - this = this->right; - } - else - { - /* If we are to use zero-length intervals as buffer pointers, - then this code will have to change. */ - this->total_length += length; - CHECK_TOTAL_LENGTH (this); - this->position = LEFT_TOTAL_LENGTH (this) - + position - relative_position + 1; - return tree; - } - } -} -#endif - /* Effect an adjustment corresponding to the addition of LENGTH characters of text. Do this by finding the interval containing POSITION in the interval tree TREE, and then adjusting all of its ancestors by adding @@ -870,8 +807,7 @@ Lisp_Object parent; ptrdiff_t offset; - if (TOTAL_LENGTH (tree) == 0) /* Paranoia */ - abort (); + eassert (TOTAL_LENGTH (tree) > 0); GET_INTERVAL_OBJECT (parent, tree); offset = (BUFFERP (parent) ? BUF_BEG (XBUFFER (parent)) : 0); @@ -1262,8 +1198,7 @@ register INTERVAL parent; ptrdiff_t amt = LENGTH (i); - if (amt > 0) /* Only used on zero-length intervals now. */ - abort (); + eassert (amt == 0); /* Only used on zero-length intervals now. */ if (ROOT_INTERVAL_P (i)) { @@ -1386,9 +1321,8 @@ if (NULL_INTERVAL_P (tree)) return; - if (start > offset + TOTAL_LENGTH (tree) - || start + length > offset + TOTAL_LENGTH (tree)) - abort (); + eassert (start <= offset + TOTAL_LENGTH (tree) + && start + length <= offset + TOTAL_LENGTH (tree)); if (length == TOTAL_LENGTH (tree)) { @@ -1592,49 +1526,6 @@ return t; } - -#if 0 -/* Nobody calls this. Perhaps it's a vestige of an earlier design. */ - -/* Make a new interval of length LENGTH starting at START in the - group of intervals INTERVALS, which is actually an interval tree. - Returns the new interval. - - Generate an error if the new positions would overlap an existing - interval. */ - -static INTERVAL -make_new_interval (INTERVAL intervals, ptrdiff_t start, ptrdiff_t length) -{ - INTERVAL slot; - - slot = find_interval (intervals, start); - if (start + length > slot->position + LENGTH (slot)) - error ("Interval would overlap"); - - if (start == slot->position && length == LENGTH (slot)) - return slot; - - if (slot->position == start) - { - /* New right node. */ - split_interval_right (slot, length); - return slot; - } - - if (slot->position + LENGTH (slot) == start + length) - { - /* New left node. */ - split_interval_left (slot, LENGTH (slot) - length); - return slot; - } - - /* Convert interval SLOT into three intervals. */ - split_interval_left (slot, start - slot->position); - split_interval_right (slot, length); - return slot; -} -#endif /* Insert the intervals of SOURCE into BUFFER at POSITION. LENGTH is the length of the text in SOURCE. @@ -1725,14 +1616,12 @@ XSETBUFFER (buf, buffer); tree = create_root_interval (buf); } - /* Paranoia -- the text has already been added, so this buffer - should be of non-zero length. */ - else if (TOTAL_LENGTH (tree) == 0) - abort (); + /* Paranoia -- the text has already been added, so + this buffer should be of non-zero length. */ + eassert (TOTAL_LENGTH (tree) > 0); this = under = find_interval (tree, position); - if (NULL_INTERVAL_P (under)) /* Paranoia. */ - abort (); + eassert (!NULL_INTERVAL_P (under)); over = find_interval (source, interval_start_pos (source)); /* Here for insertion in the middle of an interval. @@ -1867,15 +1756,11 @@ ptrdiff_t charpos, ptrdiff_t bytepos) { /* In a single-byte buffer, the two positions must be equal. */ - if (BUF_ZV (buffer) == BUF_ZV_BYTE (buffer) - && charpos != bytepos) - abort (); - - if (charpos > bytepos) - abort (); - - if (charpos > BUF_ZV (buffer) || charpos < BUF_BEGV (buffer)) - abort (); + if (BUF_ZV (buffer) == BUF_ZV_BYTE (buffer)) + eassert (charpos == bytepos); + + eassert (charpos <= bytepos); + eassert (charpos <= BUF_ZV (buffer) || BUF_BEGV (buffer) <= charpos); SET_BUF_PT_BOTH (buffer, charpos, bytepos); } @@ -2340,8 +2225,7 @@ return NULL_INTERVAL; i = find_interval (tree, start); - if (NULL_INTERVAL_P (i) || LENGTH (i) == 0) - abort (); + eassert (!NULL_INTERVAL_P (i) && LENGTH (i) > 0); /* If there is only one interval and it's the default, return nil. */ if ((start - i->position + 1 + length) < LENGTH (i) === modified file 'src/intervals.h' --- src/intervals.h 2012-07-03 18:24:42 +0000 +++ src/intervals.h 2012-07-17 09:12:24 +0000 @@ -56,12 +56,7 @@ unsigned int front_sticky : 1; /* Non-zero means text inserted just before this interval goes into it. */ unsigned int rear_sticky : 1; /* Likewise for just after it. */ - - /* Properties of this interval. - The mark bit on this field says whether this particular interval - tree node has been visited. Since intervals should never be - shared, GC aborts if it seems to have visited an interval twice. */ - Lisp_Object plist; + Lisp_Object plist; /* Other properties. */ }; /* These are macros for dealing with the interval tree. */ === modified file 'src/textprop.c' --- src/textprop.c 2012-07-10 16:53:26 +0000 +++ src/textprop.c 2012-07-17 09:12:24 +0000 @@ -487,21 +487,6 @@ i->plist = current_plist; return changed; } - -#if 0 -/* Remove all properties from interval I. Return non-zero - if this changes the interval. */ - -static inline int -erase_properties (INTERVAL i) -{ - if (NILP (i->plist)) - return 0; - - i->plist = Qnil; - return 1; -} -#endif /* Returns the interval of POSITION in OBJECT. POSITION is BEG-based. */ @@ -1183,8 +1168,7 @@ /* We are at the beginning of interval I, with LEN chars to scan. */ for (;;) { - if (i == 0) - abort (); + eassert (i != 0); if (LENGTH (i) >= len) { @@ -1383,8 +1367,7 @@ /* We are starting at the beginning of an interval I. LEN is positive. */ do { - if (i == 0) - abort (); + eassert (i != 0); if (LENGTH (i) >= len) { @@ -1472,8 +1455,7 @@ /* We are at the beginning of an interval, with len to scan */ for (;;) { - if (i == 0) - abort (); + eassert (i != 0); if (LENGTH (i) >= len) { @@ -1562,8 +1544,7 @@ and we call signal_after_change before returning if modified != 0. */ for (;;) { - if (i == 0) - abort (); + eassert (i != 0); if (LENGTH (i) >= len) { ------------------------------------------------------------ revno: 109117 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11946 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-07-17 04:38:12 -0400 message: * lisp/progmodes/sh-script.el (sh-syntax-propertize-function): Mark "${#VAR" as not-a-comment. * test/indent/shell.sh: Add test case for ${#VAR}. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-17 08:15:06 +0000 +++ lisp/ChangeLog 2012-07-17 08:38:12 +0000 @@ -1,5 +1,8 @@ 2012-07-17 Stefan Monnier + * progmodes/sh-script.el (sh-syntax-propertize-function): Mark "${#VAR" + as not-a-comment (bug#11946). + * emacs-lisp/macroexp.el (macroexp-let2): Use more informative names for uninterned vars. === modified file 'lisp/emacs-lisp/trace.el' --- lisp/emacs-lisp/trace.el 2012-01-19 07:21:25 +0000 +++ lisp/emacs-lisp/trace.el 2012-07-17 08:38:12 +0000 @@ -285,7 +285,7 @@ activated only if the advice of FUNCTION is currently active. If FUNCTION was not traced this is a noop." (interactive - (list (ad-read-advised-function "Untrace function: " 'trace-is-traced))) + (list (ad-read-advised-function "Untrace function" 'trace-is-traced))) (when (trace-is-traced function) (ad-remove-advice function 'around trace-advice-name) (ad-update function))) === modified file 'lisp/progmodes/sh-script.el' --- lisp/progmodes/sh-script.el 2012-07-10 11:51:54 +0000 +++ lisp/progmodes/sh-script.el 2012-07-17 08:38:12 +0000 @@ -1087,7 +1087,7 @@ ;; metacharacters. The list of special chars is taken from ;; the single-unix spec of the shell command language (under ;; `quoting') but with `$' removed. - ("[^|&;<>()`\\\"' \t\n]\\(#+\\)" (1 "_")) + ("\\(?:[^|&;<>()`\\\"' \t\n]\\|\\${\\)\\(#+\\)" (1 "_")) ;; In a '...' the backslash is not escaping. ("\\(\\\\\\)'" (1 (sh-font-lock-backslash-quote))) ;; Make sure $@ and $? are correctly recognized as sexps. === modified file 'test/ChangeLog' --- test/ChangeLog 2012-07-17 08:11:31 +0000 +++ test/ChangeLog 2012-07-17 08:38:12 +0000 @@ -1,5 +1,7 @@ 2012-07-17 Stefan Monnier + * indent/shell.sh: Add test case for ${#VAR}. + * indent/latex-mode.tex: New file. 2012-07-11 Stefan Monnier === modified file 'test/indent/shell.sh' --- test/indent/shell.sh 2012-04-28 20:04:34 +0000 +++ test/indent/shell.sh 2012-07-17 08:38:12 +0000 @@ -1,9 +1,17 @@ #!/bin/sh +# -*- eval: (bug-reference-mode 1) -*- setlock -n /tmp/getmail.lock && echo getmail isn\'t running # adsgsdg +declare -a VERSION +for i in $(ls "$PREFIX/sbin") ; do + echo -e $N')' $i + VERSION[${#VERSION[*]}]=$i #bug#11946. + N=$(($N + 1)) +done + foo () { bar () { ------------------------------------------------------------ revno: 109116 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-07-17 04:15:06 -0400 message: Misc minor changes. * lisp/xt-mouse.el (xterm-mouse-translate-1, xterm-mouse-event-read): Use read-event since we don't really want to read chars but bytes. * lisp/emacs-lisp/macroexp.el (macroexp-let2): Use more informative names for uninterned vars. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-17 08:11:31 +0000 +++ lisp/ChangeLog 2012-07-17 08:15:06 +0000 @@ -1,5 +1,11 @@ 2012-07-17 Stefan Monnier + * emacs-lisp/macroexp.el (macroexp-let2): Use more informative names + for uninterned vars. + + * xt-mouse.el (xterm-mouse-translate-1, xterm-mouse-event-read): + Use read-event since we don't really want to read chars but bytes. + * textmodes/tex-mode.el (tex-font-lock-keywords-1): Highlight not only $$..$$ but also $..$ using regexps (bug#11953). Use tex-verbatim for \url and \path. === modified file 'lisp/emacs-lisp/macroexp.el' --- lisp/emacs-lisp/macroexp.el 2012-06-23 15:38:23 +0000 +++ lisp/emacs-lisp/macroexp.el 2012-07-17 08:15:06 +0000 @@ -274,7 +274,7 @@ (expsym (make-symbol "exp"))) `(let* ((,expsym ,exp) (,var (if (funcall #',(or test #'macroexp-const-p) ,expsym) - ,expsym (make-symbol "x"))) + ,expsym (make-symbol ,(symbol-name var)))) (,bodysym ,(macroexp-progn exps))) (if (eq ,var ,expsym) ,bodysym (macroexp-let* (list (list ,var ,expsym)) === modified file 'lisp/xt-mouse.el' --- lisp/xt-mouse.el 2012-07-14 15:40:12 +0000 +++ lisp/xt-mouse.el 2012-07-17 08:15:06 +0000 @@ -78,13 +78,13 @@ ;; Retrieve the expected preface for the up-event. (unless is-click (unless (cond ((null extension) - (and (eq (read-char) ?\e) - (eq (read-char) ?\[) - (eq (read-char) ?M))) + (and (eq (read-event) ?\e) + (eq (read-event) ?\[) + (eq (read-event) ?M))) ((eq extension 1006) - (and (eq (read-char) ?\e) - (eq (read-char) ?\[) - (eq (read-char) ?<)))) + (and (eq (read-event) ?\e) + (eq (read-event) ?\[) + (eq (read-event) ?<)))) (error "Unexpected escape sequence from XTerm"))) ;; Process the up-event. @@ -139,7 +139,7 @@ (defun xterm-mouse-event-read () ;; We get the characters decoded by the keyboard coding system. Try ;; to recover the raw character. - (let ((c (read-char))) + (let ((c (read-event))) (cond ;; If meta-flag is t we get a meta character ((>= c ?\M-\^@) (- c (- ?\M-\^@ 128))) ------------------------------------------------------------ revno: 109115 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11953 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-07-17 04:11:31 -0400 message: * lisp/textmodes/tex-mode.el (tex-font-lock-keywords-1): Highlight not only $$..$$ but also $..$ using regexps. Use tex-verbatim for \url and \path. (tex-font-lock-keywords): Define as defconst like the others. (tex-common-initialization): Don't use font-lock-syntax-table any more. * test/indent/latex-mode.tex: New file. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-07-17 04:17:23 +0000 +++ lisp/ChangeLog 2012-07-17 08:11:31 +0000 @@ -1,3 +1,11 @@ +2012-07-17 Stefan Monnier + + * textmodes/tex-mode.el (tex-font-lock-keywords-1): Highlight not only + $$..$$ but also $..$ using regexps (bug#11953). + Use tex-verbatim for \url and \path. + (tex-font-lock-keywords): Define as defconst like the others. + (tex-common-initialization): Don't use font-lock-syntax-table any more. + 2012-07-16 René Kyllingstad (tiny change) * international/mule-cmds.el (ucs-insert): Make it an obsolete @@ -14,8 +22,8 @@ Remove vars. (python-nav-list-defun-positions, python-nav-read-defun) (python-imenu-tree-assoc, python-imenu-make-element-tree) - (python-imenu-make-tree, python-imenu-create-index): Remove - functions. + (python-imenu-make-tree, python-imenu-create-index): + Remove functions. (python-mode): Update to interact with imenu by setting `imenu-extract-index-name-function' only. @@ -56,8 +64,8 @@ (xterm-mouse-event): New arg specifying mouse protocol. (turn-on-xterm-mouse-tracking-on-terminal) (turn-off-xterm-mouse-tracking-on-terminal): Send DEC 1006 - sequence to toggle extended coordinates on newer XTerms. This - appears to be harmless on terminals which do not support this. + sequence to toggle extended coordinates on newer XTerms. + This appears to be harmless on terminals which do not support this. 2012-07-14 Leo Liu @@ -81,8 +89,8 @@ 2012-07-14 Chong Yidong - * bindings.el: Consolidate ctl-x-r-map bindings. Bind - copy-rectangle-as-kill to C-x r w. + * bindings.el: Consolidate ctl-x-r-map bindings. + Bind copy-rectangle-as-kill to C-x r w. * rect.el, register.el: Move bindings to bindings.el. @@ -123,8 +131,8 @@ Remove toggle-read-only. * bs.el (bs-toggle-readonly): - * buff-menu.el (Buffer-menu-toggle-read-only): Remove - with-no-warnings around toggle-read-only. + * buff-menu.el (Buffer-menu-toggle-read-only): + Remove with-no-warnings around toggle-read-only. * ffap.el (ffap--toggle-read-only): Accept a list of buffers. Remove with-no-warnings around toggle-read-only. === modified file 'lisp/textmodes/tex-mode.el' --- lisp/textmodes/tex-mode.el 2012-07-11 23:13:41 +0000 +++ lisp/textmodes/tex-mode.el 2012-07-17 08:11:31 +0000 @@ -476,46 +476,51 @@ '("input" "include" "includeonly" "bibliography" "epsfig" "psfig" "epsf" "nofiles" "usepackage" "documentstyle" "documentclass" "verbatiminput" - "includegraphics" "includegraphics*" - "url" "nolinkurl") + "includegraphics" "includegraphics*") t)) + (verbish (regexp-opt '("url" "nolinkurl" "path") t)) ;; Miscellany. (slash "\\\\") (opt " *\\(\\[[^]]*\\] *\\)*") ;; This would allow highlighting \newcommand\CMD but requires ;; adapting subgroup numbers below. ;; (arg "\\(?:{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)\\|\\\\[a-z*]+\\)")) - (arg "{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)")) - (list - ;; display $$ math $$ - ;; We only mark the match between $$ and $$ because the $$ delimiters - ;; themselves have already been marked (along with $..$) by syntactic - ;; fontification. Also this is done at the very beginning so as to - ;; interact with the other keywords in the same way as $...$ does. - (list "\\$\\$\\([^$]+\\)\\$\\$" 1 'tex-math-face) - ;; Heading args. - (list (concat slash headings "\\*?" opt arg) - ;; If ARG ends up matching too much (if the {} don't match, e.g.) - ;; jit-lock will do funny things: when updating the buffer - ;; the re-highlighting is only done locally so it will just - ;; match the local line, but defer-contextually will - ;; match more lines at a time, so ARG will end up matching - ;; a lot more, which might suddenly include a comment - ;; so you get things highlighted bold when you type them - ;; but they get turned back to normal a little while later - ;; because "there's already a face there". - ;; Using `keep' works around this un-intuitive behavior as well - ;; as improves the behavior in the very rare case where you do - ;; have a comment in ARG. - 3 'font-lock-function-name-face 'keep) - (list (concat slash "\\(?:provide\\|\\(?:re\\)?new\\)command\\** *\\(\\\\[A-Za-z@]+\\)") - 1 'font-lock-function-name-face 'keep) - ;; Variable args. - (list (concat slash variables " *" arg) 2 'font-lock-variable-name-face) - ;; Include args. - (list (concat slash includes opt arg) 3 'font-lock-builtin-face) - ;; Definitions. I think. - '("^[ \t]*\\\\def *\\\\\\(\\(\\w\\|@\\)+\\)" + (inbraces-re (lambda (re) + (concat "\\(?:[^{}\\]\\|\\\\.\\|" re "\\)"))) + (arg (concat "{\\(" (funcall inbraces-re "{[^}]*}") "+\\)"))) + `( ;; Highlight $$math$$ and $math$. + ;; This is done at the very beginning so as to interact with the other + ;; keywords in the same way as comments and strings. + (,(concat "\\$\\$?\\(?:[^$\\{}]\\|\\\\.\\|{" + (funcall inbraces-re + (concat "{" (funcall inbraces-re "{[^}]*}") "*}")) + "*}\\)+\\$?\\$") + (0 tex-math-face)) + ;; Heading args. + (,(concat slash headings "\\*?" opt arg) + ;; If ARG ends up matching too much (if the {} don't match, e.g.) + ;; jit-lock will do funny things: when updating the buffer + ;; the re-highlighting is only done locally so it will just + ;; match the local line, but defer-contextually will + ;; match more lines at a time, so ARG will end up matching + ;; a lot more, which might suddenly include a comment + ;; so you get things highlighted bold when you type them + ;; but they get turned back to normal a little while later + ;; because "there's already a face there". + ;; Using `keep' works around this un-intuitive behavior as well + ;; as improves the behavior in the very rare case where you do + ;; have a comment in ARG. + 3 font-lock-function-name-face keep) + (,(concat slash "\\(?:provide\\|\\(?:re\\)?new\\)command\\** *\\(\\\\[A-Za-z@]+\\)") + 1 font-lock-function-name-face keep) + ;; Variable args. + (,(concat slash variables " *" arg) 2 font-lock-variable-name-face) + ;; Include args. + (,(concat slash includes opt arg) 3 font-lock-builtin-face) + ;; Verbatim-like args. + (,(concat slash verbish opt arg) 3 'tex-verbatim) + ;; Definitions. I think. + ("^[ \t]*\\\\def *\\\\\\(\\(\\w\\|@\\)+\\)" 1 font-lock-function-name-face)))) "Subdued expressions to highlight in TeX modes.") @@ -629,7 +634,7 @@ (1 (tex-font-lock-suscript (match-beginning 0)) append)))) "Experimental expressions to highlight in TeX modes.") -(defvar tex-font-lock-keywords tex-font-lock-keywords-1 +(defconst tex-font-lock-keywords tex-font-lock-keywords-1 "Default expressions to highlight in TeX modes.") (defvar tex-verbatim-environments @@ -1219,7 +1224,7 @@ (set (make-local-variable 'font-lock-defaults) '((tex-font-lock-keywords tex-font-lock-keywords-1 tex-font-lock-keywords-2 tex-font-lock-keywords-3) - nil nil ((?$ . "\"")) nil + nil nil nil nil ;; Who ever uses that anyway ??? (font-lock-mark-block-function . mark-paragraph) (font-lock-syntactic-face-function === modified file 'test/ChangeLog' --- test/ChangeLog 2012-07-11 23:13:41 +0000 +++ test/ChangeLog 2012-07-17 08:11:31 +0000 @@ -1,3 +1,7 @@ +2012-07-17 Stefan Monnier + + * indent/latex-mode.tex: New file. + 2012-07-11 Stefan Monnier * eshell.el: Use cl-lib. === added file 'test/indent/latex-mode.tex' --- test/indent/latex-mode.tex 1970-01-01 00:00:00 +0000 +++ test/indent/latex-mode.tex 2012-07-17 08:11:31 +0000 @@ -0,0 +1,11 @@ +\documentclass{article} % -*- eval: (bug-reference-mode 1) -*- + +\usepackage[utf8]{inputenc} + +\begin{document} + +To fix this, remove the \url{sn9c102.ko} from where it appears in +\url{/lib/modules/$(uname -r)}, %bug#11953. +and install the appropriate \url{gspca-modules} package. + +\end{document} ------------------------------------------------------------ revno: 109114 committer: Chong Yidong branch nick: trunk timestamp: Tue 2012-07-17 15:43:01 +0800 message: Document insert-char changes. * doc/emacs/basic.texi (Inserting Text): Replace ucs-insert with insert-char. Provide more details of input. * doc/lispref/mule.texi (International Chars, Input Methods): Likewise. * doc/lispref/text.texi (Insertion): Document insert-char changes. * src/editfns.c (Finsert_char): Doc fix. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2012-07-14 02:08:32 +0000 +++ doc/emacs/ChangeLog 2012-07-17 07:43:01 +0000 @@ -1,3 +1,10 @@ +2012-07-17 Chong Yidong + + * basic.texi (Inserting Text): Replace ucs-insert with + insert-char. Provide more details of input. + + * mule.texi (International Chars, Input Methods): Likewise. + 2012-07-13 Chong Yidong * custom.texi (Examining): Update C-h v message. === modified file 'doc/emacs/basic.texi' --- doc/emacs/basic.texi 2012-07-06 04:31:46 +0000 +++ doc/emacs/basic.texi 2012-07-17 07:43:01 +0000 @@ -97,28 +97,29 @@ the letters @kbd{a} to @kbd{f} serve as part of a character code, just like digits. Case is ignored. -@findex ucs-insert +@findex insert-char @kindex C-x 8 RET @cindex Unicode characters, inserting @cindex insert Unicode character @cindex characters, inserting by name or code-point - Instead of @kbd{C-q}, you can use the command @kbd{C-x 8 @key{RET}} -(@code{ucs-insert}). This prompts for the Unicode name or code-point + Alternatively, you can use the command @kbd{C-x 8 @key{RET}} +(@code{insert-char}). This prompts for the Unicode name or code-point of a character, using the minibuffer. If you enter a name, the command provides completion (@pxref{Completion}). If you enter a -code-point, it should be a hexadecimal number (which is the convention -for Unicode). The command then inserts the corresponding character -into the buffer. For example, both of the following insert the -infinity sign (Unicode code-point @code{U+221E}): +code-point, it should be as a hexadecimal number (the convention for +Unicode), or a number with a specified radix, e.g.@: @code{#o23072} +(octal); @xref{Integer Basics,,, elisp, The Emacs Lisp Reference +Manual}. The command then inserts the corresponding character into +the buffer. For example, both of the following insert the infinity +sign (Unicode code-point @code{U+221E}): @example @kbd{C-x 8 @key{RET} infinity @key{RET}} @kbd{C-x 8 @key{RET} 221e @key{RET}} @end example - A numeric argument to either @kbd{C-q} or @kbd{C-x 8 @key{RET}} -specifies how many copies of the character to insert -(@pxref{Arguments}). + A numeric argument to @kbd{C-q} or @kbd{C-x 8 @key{RET}} specifies +how many copies of the character to insert (@pxref{Arguments}). @node Moving Point @section Changing the Location of Point === modified file 'doc/emacs/mule.texi' --- doc/emacs/mule.texi 2012-06-17 05:13:40 +0000 +++ doc/emacs/mule.texi 2012-07-17 07:43:01 +0000 @@ -146,7 +146,7 @@ used, generally don't have keys for all the characters in them. You can insert characters that your keyboard does not support, using @kbd{C-q} (@code{quoted-insert}) or @kbd{C-x 8 @key{RET}} -(@code{ucs-insert}). @xref{Inserting Text}. Emacs also supports +(@code{insert-char}). @xref{Inserting Text}. Emacs also supports various @dfn{input methods}, typically one for each script or language, which make it easier to type characters in the script. @xref{Input Methods}. @@ -548,7 +548,7 @@ not when you are in the minibuffer). Another facility for typing characters not on your keyboard is by -using @kbd{C-x 8 @key{RET}} (@code{ucs-insert}) to insert a single +using @kbd{C-x 8 @key{RET}} (@code{insert-char}) to insert a single character based on its Unicode name or code-point; see @ref{Inserting Text}. === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-07-15 00:52:16 +0000 +++ doc/lispref/ChangeLog 2012-07-17 07:43:01 +0000 @@ -1,3 +1,7 @@ +2012-07-17 Chong Yidong + + * text.texi (Insertion): Document insert-char changes. + 2012-07-15 Leo Liu * display.texi (Fringe Bitmaps): Add exclamation-mark. === modified file 'doc/lispref/text.texi' --- doc/lispref/text.texi 2012-07-06 04:25:04 +0000 +++ doc/lispref/text.texi 2012-07-17 07:43:01 +0000 @@ -401,19 +401,23 @@ overlay. @end defun -@defun insert-char character count &optional inherit -This function inserts @var{count} instances of @var{character} into the -current buffer before point. The argument @var{count} should be an -integer, and @var{character} must be a character. The value is @code{nil}. +@deffn Command insert-char character &optional count inherit +This command inserts @var{count} instances of @var{character} into the +current buffer before point. The argument @var{count} must be an +integer, and @var{character} must be a character. + +If called interactively, this command prompts for @var{character} +using its Unicode name or its code point. @xref{Inserting Text,,, +emacs, The GNU Emacs Manual}. This function does not convert unibyte character codes 128 through 255 to multibyte characters, not even if the current buffer is a multibyte buffer. @xref{Converting Representations}. -If @var{inherit} is non-@code{nil}, then the inserted characters inherit +If @var{inherit} is non-@code{nil}, the inserted characters inherit sticky text properties from the two characters before and after the insertion point. @xref{Sticky Properties}. -@end defun +@end deffn @defun insert-buffer-substring from-buffer-or-name &optional start end This function inserts a portion of buffer @var{from-buffer-or-name} === modified file 'etc/NEWS' --- etc/NEWS 2012-07-17 04:17:23 +0000 +++ etc/NEWS 2012-07-17 07:43:01 +0000 @@ -140,6 +140,7 @@ ** Setting `enable-remote-dir-locals' to non-nil allows directory local variables on remote hosts. ++++ ** `insert-char' is now a command, and `ucs-insert' an obsolete alias for it. === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-17 07:15:50 +0000 +++ src/ChangeLog 2012-07-17 07:43:01 +0000 @@ -1,3 +1,7 @@ +2012-07-17 Chong Yidong + + * editfns.c (Finsert_char): Doc fix. + 2012-07-17 Dmitry Antipov Fix previous change to make Fmemory_free always accurate. === modified file 'src/editfns.c' --- src/editfns.c 2012-07-17 04:17:23 +0000 +++ src/editfns.c 2012-07-17 07:43:01 +0000 @@ -2369,27 +2369,34 @@ } DEFUN ("insert-char", Finsert_char, Sinsert_char, 1, 3, - "(list (read-char-by-name \"Unicode (name or hex): \")\ + "(list (read-char-by-name \"Insert character (Unicode name or hex): \")\ (prefix-numeric-value current-prefix-arg)\ t))", doc: /* Insert COUNT copies of CHARACTER. -Interactively, prompts for a Unicode character name or a hex number -using `read-char-by-name'. - -You can type a few of the first letters of the Unicode name and -use completion. If you type a substring of the Unicode name -preceded by an asterisk `*' and use completion, it will show all -the characters whose names include that substring, not necessarily -at the beginning of the name. - -This function also accepts a hexadecimal number of Unicode code -point or a number in hash notation, e.g. #o21430 for octal, -#x2318 for hex, or #10r8984 for decimal. - -Point, and before-insertion markers, are relocated as in the function `insert'. -The optional third arg INHERIT, if non-nil, says to inherit text properties -from adjoining text, if those properties are sticky. If called -interactively, INHERIT is t. */) +Interactively, prompt for CHARACTER. You can specify CHARACTER in one +of these ways: + + - As its Unicode character name, e.g. \"LATIN SMALL LETTER A\". + Completion is available; if you type a substring of the name + preceded by an asterisk `*', Emacs shows all names which include + that substring, not necessarily at the beginning of the name. + + - As a hexadecimal code point, e.g. 263A. Note that code points in + Emacs are equivalent to Unicode up to 10FFFF (which is the limit of + the Unicode code space). + + - As a code point with a radix specified with #, e.g. #o21430 + (octal), #x2318 (hex), or #10r8984 (decimal). + +If called interactively, COUNT is given by the prefix argument. If +omitted or nil, it defaults to 1. + +Inserting the character(s) relocates point and before-insertion +markers in the same ways as the function `insert'. + +The optional third argument INHERIT, if non-nil, says to inherit text +properties from adjoining text, if those properties are sticky. If +called interactively, INHERIT is t. */) (Lisp_Object character, Lisp_Object count, Lisp_Object inherit) { int i, stringlen; ------------------------------------------------------------ revno: 109113 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2012-07-17 11:30:25 +0400 message: Fix toolkit configuration report. * configure.ac (USE_X_TOOLKIT): Report toolkit as GTK3 if --with-x-toolkit=gtk3 is used. diff: === modified file 'ChangeLog' --- ChangeLog 2012-07-17 02:09:58 +0000 +++ ChangeLog 2012-07-17 07:30:25 +0000 @@ -1,3 +1,9 @@ +2012-07-17 Dmitry Antipov + + Fix toolkit configuration report. + * configure.ac (USE_X_TOOLKIT): Report toolkit as GTK3 if + --with-x-toolkit=gtk3 is used. + 2012-07-17 Paul Eggert Fix regression with pthread_sigmask on FreeBSD (Bug#11884). === modified file 'configure.ac' --- configure.ac 2012-07-17 02:09:58 +0000 +++ configure.ac 2012-07-17 07:30:25 +0000 @@ -4298,7 +4298,11 @@ #### It makes printing result more understandable as using GTK sets #### toolkit_scroll_bars to yes by default. if test "${HAVE_GTK}" = "yes"; then - USE_X_TOOLKIT=GTK + if test "${with_gtk3}" = "yes"; then + USE_X_TOOLKIT=GTK3 + else + USE_X_TOOLKIT=GTK + fi fi echo " ------------------------------------------------------------ revno: 109112 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2012-07-17 11:15:50 +0400 message: Fix previous change to make Fmemory_free always accurate. * alloc.c (make_interval): Update total_free_intervals. (make_float): Likewise for total_free_floats. (free_cons, Fcons): Likewise for total_free_conses. (SETUP_ON_FREE_LIST, allocate_vector_from_block): Likewise for total_free_vector_bytes. (Fmake_symbol): Likewise for total_free_symbols. (bytes_free): Remove. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-17 05:01:33 +0000 +++ src/ChangeLog 2012-07-17 07:15:50 +0000 @@ -1,5 +1,16 @@ 2012-07-17 Dmitry Antipov + Fix previous change to make Fmemory_free always accurate. + * alloc.c (make_interval): Update total_free_intervals. + (make_float): Likewise for total_free_floats. + (free_cons, Fcons): Likewise for total_free_conses. + (SETUP_ON_FREE_LIST, allocate_vector_from_block): + Likewise for total_free_vector_bytes. + (Fmake_symbol): Likewise for total_free_symbols. + (bytes_free): Remove. + +2012-07-17 Dmitry Antipov + Simple free memory accounting feature. * alloc.c (bytes_free, total_free_vector_bytes): New variable. (sweep_vectors): Accumulate size of free vectors. === modified file 'src/alloc.c' --- src/alloc.c 2012-07-17 05:01:33 +0000 +++ src/alloc.c 2012-07-17 07:15:50 +0000 @@ -84,10 +84,6 @@ #define MMAP_MAX_AREAS 100000000 -/* Value of mallinfo ().fordblks as seen at the end of last GC. */ - -static int bytes_free; - #else /* not DOUG_LEA_MALLOC */ /* The following come from gmalloc.c. */ @@ -1516,6 +1512,7 @@ newi->next = interval_block; interval_block = newi; interval_block_index = 0; + total_free_intervals += INTERVAL_BLOCK_SIZE; } val = &interval_block->intervals[interval_block_index++]; } @@ -1524,6 +1521,7 @@ consing_since_gc += sizeof (struct interval); intervals_consed++; + total_free_intervals--; RESET_INTERVAL (val); val->gcmarkbit = 0; return val; @@ -2607,6 +2605,7 @@ memset (new->gcmarkbits, 0, sizeof new->gcmarkbits); float_block = new; float_block_index = 0; + total_free_floats += FLOAT_BLOCK_SIZE; } XSETFLOAT (val, &float_block->floats[float_block_index]); float_block_index++; @@ -2618,6 +2617,7 @@ eassert (!FLOAT_MARKED_P (XFLOAT (val))); consing_since_gc += sizeof (struct Lisp_Float); floats_consed++; + total_free_floats--; return val; } @@ -2683,6 +2683,7 @@ ptr->car = Vdead; #endif cons_free_list = ptr; + total_free_conses++; } DEFUN ("cons", Fcons, Scons, 2, 2, 0, @@ -2712,6 +2713,7 @@ new->next = cons_block; cons_block = new; cons_block_index = 0; + total_free_conses += CONS_BLOCK_SIZE; } XSETCONS (val, &cons_block->conses[cons_block_index]); cons_block_index++; @@ -2723,6 +2725,7 @@ XSETCDR (val, cdr); eassert (!CONS_MARKED_P (XCONS (val))); consing_since_gc += sizeof (struct Lisp_Cons); + total_free_conses--; cons_cells_consed++; return val; } @@ -2909,6 +2912,7 @@ eassert ((index) < VECTOR_MAX_FREE_LIST_INDEX); \ (v)->header.next.vector = vector_free_lists[index]; \ vector_free_lists[index] = (v); \ + total_free_vector_bytes += (nbytes); \ } while (0) struct vector_block @@ -2979,6 +2983,7 @@ vector = vector_free_lists[index]; vector_free_lists[index] = vector->header.next.vector; vector->header.next.nbytes = nbytes; + total_free_vector_bytes -= nbytes; return vector; } @@ -2993,6 +2998,7 @@ vector = vector_free_lists[index]; vector_free_lists[index] = vector->header.next.vector; vector->header.next.nbytes = nbytes; + total_free_vector_bytes -= nbytes; /* Excess bytes are used for the smaller vector, which should be set on an appropriate free list. */ @@ -3099,7 +3105,6 @@ else { int tmp; - total_free_vector_bytes += total_bytes; SETUP_ON_FREE_LIST (vector, total_bytes, tmp); } } @@ -3447,6 +3452,7 @@ new->next = symbol_block; symbol_block = new; symbol_block_index = 0; + total_free_symbols += SYMBOL_BLOCK_SIZE; } XSETSYMBOL (val, &symbol_block->symbols[symbol_block_index].s); symbol_block_index++; @@ -3467,6 +3473,7 @@ p->declared_special = 0; consing_since_gc += sizeof (struct Lisp_Symbol); symbols_consed++; + total_free_symbols--; return val; } @@ -5610,10 +5617,6 @@ total[7] = Fcons (make_number (total_strings), make_number (total_free_strings)); -#ifdef DOUG_LEA_MALLOC - bytes_free = mallinfo ().fordblks; -#endif - #if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES { /* Compute average percentage of zombies. */ @@ -6565,9 +6568,7 @@ the Emacs itself. Second counter shows how much free memory is in the heap (freed by Emacs but not released back to the operating system). If the second counter is zero, heap statistics is not -available. Since both counters are updated after each garbage -collection, use (progn (garbage-collect) (memory-free)) to get -accurate numbers. */) +available. */) (void) { Lisp_Object data[2]; @@ -6582,7 +6583,8 @@ + total_free_strings * sizeof (struct Lisp_String) + total_free_vector_bytes) / 1024)); #ifdef DOUG_LEA_MALLOC - data[1] = make_number (min (MOST_POSITIVE_FIXNUM, bytes_free / 1024)); + data[1] = make_number + (min (MOST_POSITIVE_FIXNUM, mallinfo ().fordblks / 1024)); #else data[1] = make_number (0); #endif ------------------------------------------------------------ revno: 109111 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2012-07-17 09:01:33 +0400 message: Simple free memory accounting feature. * alloc.c (bytes_free, total_free_vector_bytes): New variable. (sweep_vectors): Accumulate size of free vectors. (Fgarbage_collect): Setup bytes_free. (Fmemory_free): New function. (syms_of_alloc): Register it. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-17 04:29:50 +0000 +++ src/ChangeLog 2012-07-17 05:01:33 +0000 @@ -1,5 +1,14 @@ 2012-07-17 Dmitry Antipov + Simple free memory accounting feature. + * alloc.c (bytes_free, total_free_vector_bytes): New variable. + (sweep_vectors): Accumulate size of free vectors. + (Fgarbage_collect): Setup bytes_free. + (Fmemory_free): New function. + (syms_of_alloc): Register it. + +2012-07-17 Dmitry Antipov + Cleanup overlays checking. * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP. * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to === modified file 'src/alloc.c' --- src/alloc.c 2012-07-15 11:17:09 +0000 +++ src/alloc.c 2012-07-17 05:01:33 +0000 @@ -84,6 +84,10 @@ #define MMAP_MAX_AREAS 100000000 +/* Value of mallinfo ().fordblks as seen at the end of last GC. */ + +static int bytes_free; + #else /* not DOUG_LEA_MALLOC */ /* The following come from gmalloc.c. */ @@ -191,7 +195,7 @@ static EMACS_INT total_conses, total_markers, total_symbols, total_vector_size; static EMACS_INT total_free_conses, total_free_markers, total_free_symbols; -static EMACS_INT total_free_floats, total_floats; +static EMACS_INT total_free_floats, total_floats, total_free_vector_bytes; /* Points to memory space allocated as "spare", to be freed if we run out of memory. We keep one large block, four cons-blocks, and @@ -3048,7 +3052,7 @@ struct vector_block *block = vector_blocks, **bprev = &vector_blocks; struct Lisp_Vector *vector, *next, **vprev = &large_vectors; - total_vector_size = 0; + total_free_vector_bytes = total_vector_size = 0; memset (vector_free_lists, 0, sizeof (vector_free_lists)); /* Looking through vector blocks. */ @@ -3095,6 +3099,7 @@ else { int tmp; + total_free_vector_bytes += total_bytes; SETUP_ON_FREE_LIST (vector, total_bytes, tmp); } } @@ -5605,6 +5610,10 @@ total[7] = Fcons (make_number (total_strings), make_number (total_free_strings)); +#ifdef DOUG_LEA_MALLOC + bytes_free = mallinfo ().fordblks; +#endif + #if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES { /* Compute average percentage of zombies. */ @@ -6549,6 +6558,37 @@ return end; } +DEFUN ("memory-free", Fmemory_free, Smemory_free, 0, 0, 0, + doc: /* Return a list of two counters that measure how much free memory +is hold by the Emacs process. Both counters are in KBytes. First +counter shows how much memory holds in a free lists maintained by +the Emacs itself. Second counter shows how much free memory is in +the heap (freed by Emacs but not released back to the operating +system). If the second counter is zero, heap statistics is not +available. Since both counters are updated after each garbage +collection, use (progn (garbage-collect) (memory-free)) to get +accurate numbers. */) + (void) +{ + Lisp_Object data[2]; + + data[0] = make_number + (min (MOST_POSITIVE_FIXNUM, + (total_free_conses * sizeof (struct Lisp_Cons) + + total_free_markers * sizeof (union Lisp_Misc) + + total_free_symbols * sizeof (struct Lisp_Symbol) + + total_free_floats * sizeof (struct Lisp_Float) + + total_free_intervals * sizeof (struct interval) + + total_free_strings * sizeof (struct Lisp_String) + + total_free_vector_bytes) / 1024)); +#ifdef DOUG_LEA_MALLOC + data[1] = make_number (min (MOST_POSITIVE_FIXNUM, bytes_free / 1024)); +#else + data[1] = make_number (0); +#endif + return Flist (2, data); +} + DEFUN ("memory-use-counts", Fmemory_use_counts, Smemory_use_counts, 0, 0, 0, doc: /* Return a list of counters that measure how much consing there has been. Each of these counters increments for a certain kind of object. @@ -6785,6 +6825,7 @@ defsubr (&Spurecopy); defsubr (&Sgarbage_collect); defsubr (&Smemory_limit); + defsubr (&Smemory_free); defsubr (&Smemory_use_counts); #if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.