modif autoconf pour pouvoir linker Motif statiquement

This commit is contained in:
Olivier Sirol 2001-01-24 17:43:06 +00:00
parent a4d7d55b6c
commit 579f19e1d5
3 changed files with 69 additions and 45 deletions

View File

@ -18,8 +18,8 @@ GNU_INCLUDE = @GNU_INC_LOC@
X11_LIB = . @X_LIBS@ @X_EXTRA_LIBS@ @X_PRE_LIBS@
X11_INCLUDE = . @X_CFLAGS@
MOTIF_LIB = @GUI_LIB_LOC@
MOTIF_INCLUDE = @GUI_INC_LOC@
MOTIF_LIB = @MOTIF_LIB_LOC@
MOTIF_INCLUDE = @MOTIF_INC_LOC@
XPM_LIB = @XPM_LIBS_LOC@
XPM_INCLUDE = @XPM_CFLAGS_LOC@

View File

@ -3461,6 +3461,18 @@ echo "configure:3446: checking for location of Motif GUI libs" >&5
fi
fi
MOTIF_INC_LOC="-I$GUI_INC_LOC"
MOTIF_LIB_LOC="-L$GUI_LIB_LOC -lXm"
# Try static link on Linux
# TODO: faire pareil pour Xpm, voir gvim???
if test -f "$GUI_LIB_LOC/libXm.a"; then
if test "$ALLIANCE_OS" = Linux; then
MOTIF_LIB_LOC="$GUI_LIB_LOC/libXm.a"
fi
fi
@ -3476,9 +3488,9 @@ OLD_CFLAGS=$CFLAGS
LIBS="$OLD_LIBS $X_LIBS $X_EXTRA_LIBS $X_PRE_LIBS -lXt -lX11"
CFLAGS="$OLD_CFLAGS $X_CFLAGS"
echo $ac_n "checking if you can link X11 app""... $ac_c" 1>&6
echo "configure:3480: checking if you can link X11 app" >&5
echo "configure:3492: checking if you can link X11 app" >&5
cat > conftest.$ac_ext <<EOF
#line 3482 "configure"
#line 3494 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <X11/Xlib.h>
@ -3486,7 +3498,7 @@ int main() {
XOpenDisplay (":0");
; return 0; }
EOF
if { (eval echo configure:3490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
@ -3508,11 +3520,11 @@ LIBS="$OLD_LIBS -L$GUI_LIB_LOC -lXm $X_LIBS $X_EXTRA_LIBS $X_PRE_LIBS -lXt -lX11
CFLAGS="$OLD_CFLAGS $X_CFLAGS -I$GUI_INC_LOC"
echo "checking if you can link Motif/LessTif app" 1>&6
echo "configure:3512: checking if you can link Motif/LessTif app" >&5
echo "configure:3524: checking if you can link Motif/LessTif app" >&5
echo $ac_n "checking without additional libs""... $ac_c" 1>&6
echo "configure:3514: checking without additional libs" >&5
echo "configure:3526: checking without additional libs" >&5
cat > conftest.$ac_ext <<EOF
#line 3516 "configure"
#line 3528 "configure"
#include "confdefs.h"
# include <Xm/Xm.h>
# include <Xm/FileSB.h>
@ -3531,7 +3543,7 @@ int main() {
XtAppMainLoop( app );
; return 0; }
EOF
if { (eval echo configure:3535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
@ -3542,12 +3554,12 @@ else
# try with Xintl
echo $ac_n "checking with Xintl""... $ac_c" 1>&6
echo "configure:3546: checking with Xintl" >&5
echo "configure:3558: checking with Xintl" >&5
LIBS="$OLD_LIBS -L$GUI_LIB_LOC -lXm $X_LIBS $X_EXTRA_LIBS $X_PRE_LIBS -lXintl -lXt -lX11"
CFLAGS="$OLD_CFLAGS $X_CFLAGS -I$GUI_INC_LOC"
cat > conftest.$ac_ext <<EOF
#line 3551 "configure"
#line 3563 "configure"
#include "confdefs.h"
# include <Xm/Xm.h>
# include <Xm/FileSB.h>
@ -3566,7 +3578,7 @@ int main() {
XtAppMainLoop( app );
; return 0; }
EOF
if { (eval echo configure:3570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6; X_PRE_LIBS="$X_PRE_LIBS -lXintl"
else
@ -3577,12 +3589,12 @@ else
# try with Xp
echo $ac_n "checking with Xext and Xp""... $ac_c" 1>&6
echo "configure:3581: checking with Xext and Xp" >&5
echo "configure:3593: checking with Xext and Xp" >&5
LIBS="$OLD_LIBS -L$GUI_LIB_LOC -lXm $X_LIBS $X_EXTRA_LIBS $X_PRE_LIBS -lXext -lXp -lXt -lX11"
CFLAGS="$OLD_CFLAGS $X_CFLAGS -I$GUI_INC_LOC"
cat > conftest.$ac_ext <<EOF
#line 3586 "configure"
#line 3598 "configure"
#include "confdefs.h"
# include <Xm/Xm.h>
# include <Xm/FileSB.h>
@ -3601,7 +3613,7 @@ int main() {
XtAppMainLoop( app );
; return 0; }
EOF
if { (eval echo configure:3605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6; X_PRE_LIBS="$X_PRE_LIBS -lXext -lXp"
else
@ -3630,9 +3642,9 @@ OLD_CFLAGS=$CFLAGS
LIBS="$OLD_LIBS $XPM_LIBS_LOC $X_LIBS $X_EXTRA_LIBS $X_PRE_LIBS -lXt -lX11"
CFLAGS="$OLD_CFLAGS $X_CFLAGS $XPM_CFLAGS_LOC"
echo $ac_n "checking for libXpm""... $ac_c" 1>&6
echo "configure:3634: checking for libXpm" >&5
echo "configure:3646: checking for libXpm" >&5
cat > conftest.$ac_ext <<EOF
#line 3636 "configure"
#line 3648 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <stdlib.h>
@ -3641,7 +3653,7 @@ int main() {
XpmWriteFileFromPixmap( NULL, NULL, NULL, NULL, NULL );
; return 0; }
EOF
if { (eval echo configure:3645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6; AUTO_HAS="$AUTO_HAS -DAUTO_HAS_XPM"
else
@ -3669,7 +3681,7 @@ SKIP_GNU=
if test -z "$SKIP_GNU"; then
gnu_includes="`echo $LD_LIBRARY_PATH | sed 's/:/ /g' | sed 's/lib/include/g'` /usr/local/include /usr/include $GNUHOME/include $GNU_INC_LOC"
echo $ac_n "checking for location of GNU readline include""... $ac_c" 1>&6
echo "configure:3673: checking for location of GNU readline include" >&5
echo "configure:3685: checking for location of GNU readline include" >&5
GNU_INC_LOC=
# echo $gnu_includes
for try in $gnu_includes; do
@ -3691,7 +3703,7 @@ fi
if test -z "$SKIP_GNU"; then
gnu_libs="`echo $LD_LIBRARY_PATH | sed 's/:/ /g'` `echo "$GNU_INC_LOC" | sed 's/include/lib/'` /usr/local/lib /usr/lib $GNUHOME/lib $GNU_LIB_LOC"
echo $ac_n "checking for location of GNU libs""... $ac_c" 1>&6
echo "configure:3695: checking for location of GNU libs" >&5
echo "configure:3707: checking for location of GNU libs" >&5
GNU_LIB_LOC=
# echo $gnu_libs
for try in $gnu_libs; do
@ -3713,12 +3725,12 @@ fi
################################################################### Headers...
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:3717: checking for ANSI C header files" >&5
echo "configure:3729: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3722 "configure"
#line 3734 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@ -3726,7 +3738,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -3743,7 +3755,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 3747 "configure"
#line 3759 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@ -3761,7 +3773,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 3765 "configure"
#line 3777 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@ -3782,7 +3794,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 3786 "configure"
#line 3798 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@ -3793,7 +3805,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:3797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@ -3826,9 +3838,9 @@ fi
################################################################### OS specific...
echo $ac_n "checking SA_RESTART""... $ac_c" 1>&6
echo "configure:3830: checking SA_RESTART" >&5
echo "configure:3842: checking SA_RESTART" >&5
cat > conftest.$ac_ext <<EOF
#line 3832 "configure"
#line 3844 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <stdlib.h>
@ -3839,7 +3851,7 @@ sgct.sa_flags = SA_RESTART;
sigaction( SIGCHLD, &sgct , NULL );
; return 0; }
EOF
if { (eval echo configure:3843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6; AUTO_HAS="$AUTO_HAS -DAUTO_HAS_SA_RESTART"
else
@ -3851,9 +3863,9 @@ fi
rm -f conftest*
echo $ac_n "checking DRAND48""... $ac_c" 1>&6
echo "configure:3855: checking DRAND48" >&5
echo "configure:3867: checking DRAND48" >&5
cat > conftest.$ac_ext <<EOF
#line 3857 "configure"
#line 3869 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <stdlib.h>
@ -3862,7 +3874,7 @@ int main() {
Proba = drand48();
; return 0; }
EOF
if { (eval echo configure:3866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6; AUTO_HAS="$AUTO_HAS -DAUTO_HAS_DRAND48"
else
@ -3874,9 +3886,9 @@ fi
rm -f conftest*
echo $ac_n "checking VALUES_H""... $ac_c" 1>&6
echo "configure:3878: checking VALUES_H" >&5
echo "configure:3890: checking VALUES_H" >&5
cat > conftest.$ac_ext <<EOF
#line 3880 "configure"
#line 3892 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <stdlib.h>
@ -3886,7 +3898,7 @@ int main() {
Proba = MAXFLOAT;
; return 0; }
EOF
if { (eval echo configure:3890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6; AUTO_HAS="$AUTO_HAS -DAUTO_HAS_VALUES_H"
else
@ -3903,7 +3915,7 @@ rm -f conftest*
################################################################### Alliance ALLIANCE_TOP
echo $ac_n "checking where the Alliance package was installed""... $ac_c" 1>&6
echo "configure:3907: checking where the Alliance package was installed" >&5
echo "configure:3919: checking where the Alliance package was installed" >&5
# Avoid problems with soft links and builtin pwd...
ALLIANCE_TOP=`$PWDBIN | sed 's§share/etc$§archi§'`
ALLIANCE_TOP=`echo $ALLIANCE_TOP | sed 's§archi/Cygwin/etc$§archi§'`
@ -4121,8 +4133,8 @@ s%@X_CFLAGS@%$X_CFLAGS%g
s%@X_PRE_LIBS@%$X_PRE_LIBS%g
s%@X_LIBS@%$X_LIBS%g
s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
s%@GUI_INC_LOC@%$GUI_INC_LOC%g
s%@GUI_LIB_LOC@%$GUI_LIB_LOC%g
s%@MOTIF_INC_LOC@%$MOTIF_INC_LOC%g
s%@MOTIF_LIB_LOC@%$MOTIF_LIB_LOC%g
s%@XPM_LIBS_LOC@%$XPM_LIBS_LOC%g
s%@XPM_CFLAGS_LOC@%$XPM_CFLAGS_LOC%g
s%@GNU_INC_LOC@%$GNU_INC_LOC%g

View File

@ -6,14 +6,14 @@
# Copyright (C) 1997, 2000 Czo <Olivier.Sirol@lip6.fr>
# License: GPL (http://www.gnu.org/copyleft/gpl.html)
# Started: Feb 1997
# Last Change: Tuesday 14 November 2000, 15:19
# Edit Time: 4:51:47
# Last Change: Wednesday 24 January 2001, 18:40
# Edit Time: 5:03:59
# Description: Alliance CAD system configure.in
#
# $Id: configure.in,v 1.22 2000/11/14 14:34:18 czo Exp $
# $Id: configure.in,v 1.23 2001/01/24 17:43:06 czo Exp $
#
AC_REVISION($Revision: 1.22 $)dnl
AC_REVISION($Revision: 1.23 $)dnl
AC_INIT(configure.in)
@ -304,8 +304,20 @@ if test -z "$SKIP_MOTIF"; then
fi
fi
AC_SUBST(GUI_INC_LOC)
AC_SUBST(GUI_LIB_LOC)
MOTIF_INC_LOC="-I$GUI_INC_LOC"
MOTIF_LIB_LOC="-L$GUI_LIB_LOC -lXm"
# Try static link on Linux
# TODO: faire pareil pour Xpm, voir gvim???
if test -f "$GUI_LIB_LOC/libXm.a"; then
if test "$ALLIANCE_OS" = Linux; then
MOTIF_LIB_LOC="$GUI_LIB_LOC/libXm.a"
fi
fi
AC_SUBST(MOTIF_INC_LOC)
AC_SUBST(MOTIF_LIB_LOC)
# Under Cygwin I had problems with the order of libs...
if test "$ALLIANCE_OS" = Cygwin ; then