2.99.2 xdvik does not detect multiple definition handling on IRIX
ezra peisach <[email protected]>
| Newsgroups | gmane.comp.tex.tetex.beta |
|---|---|
| Message-ID | <[email protected]> |
On Irix, using the native CC, xdvik tests for ld supporing
--allow-multiple-definition option. If this fails, it attempts to see if
the native library does this automatically...
There are three problems...
a) There is a a fault in the code for this test
b) The BUGS file which is cited - does not exist explaining the problem.
c) xdvi.h defines XDVI_XT_XDVI_XT_TIMER_HACK instead of XDVI_XT_TIMER_HACK...
and is not used then... Looks like a typo error.
The fault in (a) - which is not fixed in the cvs version is the following:
AC_TRY_LINK([
#include <X11/Intrinsic.h>
],[
XtIntervalId
XtAppAddTimeOut(XtAppContext app,
unsigned long interval,
XtTimerCallbackProc proc,
XtPointer closure)
{
(void)app; (void)interval; (void)proc; (void)closure;
return (XtIntervalId)0;
}
],
xdvi_linker_multiple_defns=yes, xdvi_linker_multiple_defns=no
)
This creates a test program that looks something like
#include "confdefs.h"
#include <X11/Intrinsic.h>
main{
XtIntervalId XtAppAddTimeOut(....)
{....}
}
i.e. the definition of the function is in the function main! This is
clealy not what is desired!!!
Here is the fix to aclocal.m4 in the texk/xdvik directory...
We create an empty main() - and declare the test function in the
include headers section.
*** aclocal.m4 2004/11/08 11:31:13 1.1
--- aclocal.m4 2004/11/08 11:31:52
***************
*** 88,94 ****
AC_TRY_LINK([
#include <X11/Intrinsic.h>
- ],[
XtIntervalId
XtAppAddTimeOut(XtAppContext app,
unsigned long interval,
--- 88,93 ----
***************
*** 98,103 ****
--- 97,103 ----
(void)app; (void)interval; (void)proc; (void)closure;
return (XtIntervalId)0;
}
+ ],[
],
xdvi_linker_multiple_defns=yes, xdvi_linker_multiple_defns=no
)
For (c) the patch is:
*** xdvi.h 2004/11/08 11:51:09 1.1
--- xdvi.h 2004/11/08 11:51:26
***************
*** 992,1000 ****
* See the comment in events.c for further explanations.
*/
#if LD_ALLOWS_MULTIPLE_DEFINITIONS
! # define XDVI_XT_XDVI_XT_TIMER_HACK 1
#else
! # define XDVI_XT_XDVI_XT_TIMER_HACK 0
#endif
/* globally used GUI stuff */
--- 992,1000 ----
* See the comment in events.c for further explanations.
*/
#if LD_ALLOWS_MULTIPLE_DEFINITIONS
! # define XDVI_XT_TIMER_HACK 1
#else
! # define XDVI_XT_TIMER_HACK 0
#endif
/* globally used GUI stuff */