From 8c73964939048d046c50ec0240d26d9c36a4e424 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Wed, 13 Jan 1999 10:51:43 +0000 Subject: [PATCH] wxMotif now works with wx-config and make install git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 39 ++++++++++++++++++++------------------- configure.in | 9 +++++---- src/Makefile.in | 40 ++++++++++++++++++++++++++++++---------- wx-config.in | 2 +- 4 files changed, 56 insertions(+), 34 deletions(-) diff --git a/configure b/configure index 7c5b786ad3..b5e5013887 100755 --- a/configure +++ b/configure @@ -6008,8 +6008,8 @@ for ac_dir in $SEARCH_LIB; { echo "configure: error: no" 1>&2; exit 1; } fi - GUI_TK_LINK="-lXm -lXmu -lXt -lXpm -lX11 -lm" - GUI_TK_LINK="$CHECK_LINK $GUI_TK_LINK" + GUI_TK_LINK="-lXm -lXpm -lXmu -lXt -lX11 -lm" + GUI_TK_LIBRARY="$CHECK_LIB $GUI_TK_LINK" TOOLKIT=MOTIF TOOLKIT_DEF="__WXMOTIF__ -D__LINUX__ -D__UNIX__" WX_LINK=-lwx_motif2 @@ -6032,6 +6032,8 @@ fi +EXTRA_LINK= + WXDEBUG= if test "$wxUSE_DEBUG_GDB" = 1 ; then wxUSE_DEBUG_INFO=1 @@ -6042,7 +6044,7 @@ else WXDEBUG="-g" wxUSE_OPTIMISE=0 else - WX_LINK="-s $WX_LINK" + EXTRA_LINK="-s $EXTRA_LINK" fi fi @@ -6070,7 +6072,6 @@ EOF fi -EXTRA_LINK= if test "$wxUSE_DMALLOC" = 1 ; then EXTRA_LINK="$EXTRA_LINK -ldmalloc" fi @@ -6299,7 +6300,7 @@ fi echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6 -echo "configure:6303: checking for main in -ldl" >&5 +echo "configure:6304: checking for main in -ldl" >&5 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6307,14 +6308,14 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6345,7 +6346,7 @@ if test "$wxUSE_THREADS" = "1"; then echo $ac_n "checking for pthread_create in -lpthread-0.7""... $ac_c" 1>&6 -echo "configure:6349: checking for pthread_create in -lpthread-0.7" >&5 +echo "configure:6350: checking for pthread_create in -lpthread-0.7" >&5 ac_lib_var=`echo pthread-0.7'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6353,7 +6354,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread-0.7 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6388,17 +6389,17 @@ else ac_safe=`echo "sys/prctl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/prctl.h""... $ac_c" 1>&6 -echo "configure:6392: checking for sys/prctl.h" >&5 +echo "configure:6393: checking for sys/prctl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -6424,7 +6425,7 @@ fi echo $ac_n "checking for pthread_setcanceltype in -lpthread""... $ac_c" 1>&6 -echo "configure:6428: checking for pthread_setcanceltype in -lpthread" >&5 +echo "configure:6429: checking for pthread_setcanceltype in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_setcanceltype | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6432,7 +6433,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6479,7 +6480,7 @@ EOF echo $ac_n "checking for printf in -lposix4""... $ac_c" 1>&6 -echo "configure:6483: checking for printf in -lposix4" >&5 +echo "configure:6484: checking for printf in -lposix4" >&5 ac_lib_var=`echo posix4'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6487,7 +6488,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else diff --git a/configure.in b/configure.in index 836dcafd69..d8a6b1a5e8 100644 --- a/configure.in +++ b/configure.in @@ -1006,8 +1006,8 @@ if test "$wxUSE_MOTIF" = 1; then AC_MSG_ERROR(no) fi - GUI_TK_LINK="-lXm -lXmu -lXt -lXpm -lX11 -lm" - GUI_TK_LINK="$CHECK_LINK $GUI_TK_LINK" + GUI_TK_LINK="-lXm -lXpm -lXmu -lXt -lX11 -lm" + GUI_TK_LIBRARY="$CHECK_LIB $GUI_TK_LINK" TOOLKIT=MOTIF TOOLKIT_DEF="__WXMOTIF__ -D__LINUX__ -D__UNIX__" WX_LINK=-lwx_motif2 @@ -1033,6 +1033,8 @@ dnl ---------------------------------------------------------------- dnl Register compile options for makefiles and setup.h dnl ---------------------------------------------------------------- +EXTRA_LINK= + WXDEBUG= if test "$wxUSE_DEBUG_GDB" = 1 ; then wxUSE_DEBUG_INFO=1 @@ -1043,7 +1045,7 @@ else WXDEBUG="-g" wxUSE_OPTIMISE=0 else - WX_LINK="-s $WX_LINK" + EXTRA_LINK="-s $EXTRA_LINK" fi fi AC_SUBST(WXDEBUG) @@ -1062,7 +1064,6 @@ if test "$wxUSE_MEM_TRACING" = 1 ; then AC_DEFINE_UNQUOTED(wxUSE_GLOBAL_MEMORY_OPERATORS,$wxUSE_MEM_TRACING) fi -EXTRA_LINK= if test "$wxUSE_DMALLOC" = 1 ; then EXTRA_LINK="$EXTRA_LINK -ldmalloc" fi diff --git a/src/Makefile.in b/src/Makefile.in index 77861472e7..8c6214edd4 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -103,6 +103,7 @@ install:: @$(WXBASEDIR)/mkinstalldirs \ $(includedir)/wx \ $(includedir)/wx/gtk \ + $(includedir)/wx/motif \ $(includedir)/wx/common \ $(includedir)/wx/generic \ $(includedir)/wx/protocol \ @@ -120,13 +121,24 @@ install:: rm -f $(includedir)/wx/$$f ; \ $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \ done - @echo " Copying headers from /include/wx/gtk" - @cd $(WXBASEDIR)/include/wx/gtk ; \ - $(INSTALL) -d $(includedir)/wx/gtk ; \ - for f in *.h ; do \ - rm -f $(includedir)/wx/gtk/$$f ; \ - $(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \ - done + @if test "@TOOLKIT@" = "GTK" ; then \ + echo " Copying headers from /include/wx/gtk" ; \ + cd $(WXBASEDIR)/include/wx/gtk ; \ + $(INSTALL) -d $(includedir)/wx/gtk ; \ + for f in *.h ; do \ + rm -f $(includedir)/wx/gtk/$$f ; \ + $(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \ + done ; \ + fi + @if test "@TOOLKIT@" = "MOTIF" ; then \ + echo " Copying headers from /include/wx/motif" ; \ + cd $(WXBASEDIR)/include/wx/motif ; \ + $(INSTALL) -d $(includedir)/wx/motif ; \ + for f in *.h ; do \ + rm -f $(includedir)/wx/motif/$$f ; \ + $(INSTALL_DATA) $$f $(includedir)/wx/motif/$$f ; \ + done ; \ + fi @echo " Copying headers from /include/wx/generic" @cd $(WXBASEDIR)/include/wx/generic ; \ $(INSTALL) -d $(includedir)/wx/generic ; \ @@ -141,9 +153,17 @@ install:: $(INSTALL_DATA) $$f $(includedir)/wx/protocol/$$f ; \ done @echo " Moving setup.h to library path" - @cd $(WXBASEDIR)/src ; \ - $(INSTALL) -d $(libdir)/wx/include/wx/gtk ;\ - mv $(includedir)/wx/gtk/setup.h $(libdir)/wx/include/wx/gtk/setup.h ; + @if test "@TOOLKIT@" = "GTK" ; then \ + cd $(WXBASEDIR)/src ; \ + $(INSTALL) -d $(libdir)/wx/include/wx/gtk ; \ + mv $(includedir)/wx/gtk/setup.h $(libdir)/wx/include/wx/gtk/setup.h ; \ + fi + @echo " Moving setup.h to library path" + @if test "@TOOLKIT@" = "MOTIF" ; then \ + cd $(WXBASEDIR)/src ; \ + $(INSTALL) -d $(libdir)/wx/include/wx/motif ; \ + mv $(includedir)/wx/motif/setup.h $(libdir)/wx/include/wx/motif/setup.h ; \ + fi @echo " Copying wx-config" @cd $(WXBASEDIR)/src ; \ $(INSTALL) -d $(bindir) ; \ diff --git a/wx-config.in b/wx-config.in index e7d8382549..2e2d4e3476 100755 --- a/wx-config.in +++ b/wx-config.in @@ -47,7 +47,7 @@ while test $# -gt 0; do ;; --libs) - echo -L@libdir@ @THREADS_LINK@ -lwx_gtk2 @DL_LIBRARY@ @GUI_TK_LIBRARY@ @EXTRA_LINK@ + echo -L@libdir@ @THREADS_LINK@ @WX_LINK@ @DL_LIBRARY@ @GUI_TK_LIBRARY@ @EXTRA_LINK@ ;; *) echo "${usage}" 1>&2