From a07e20bf576f6bc29427b6a3c8b099c8c3589865 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Thu, 8 Aug 2002 18:53:23 +0000 Subject: [PATCH] more work git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4909 a592a061-630c-0410-9148-cb99ea01b6c8 --- config/ChangeLog | 4 + config/configure.ac | 10 +-- config/gtk--.m4 | 107 +++++++++++++-------------- config/libtool.m4 | 172 +++++++++++++++++++++---------------------- config/lyxinclude.m4 | 4 +- config/qt2.m4 | 98 ++++++++++++------------ config/sigc++.m4 | 172 ------------------------------------------- config/xforms.m4 | 23 +++--- 8 files changed, 210 insertions(+), 380 deletions(-) delete mode 100644 config/sigc++.m4 diff --git a/config/ChangeLog b/config/ChangeLog index 2429ffd297..b03d648bd2 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2002-08-08 Lars Gullik Bjønnes + + * further work on 2.53 stuff. + 2002-07-28 Lars Gullik Bjønnes * lyxinclude.m4 (LYX_PROG_CXX): remove the double -Winline diff --git a/config/configure.ac b/config/configure.ac index 3dccd95967..3eefd1d08b 100644 --- a/config/configure.ac +++ b/config/configure.ac @@ -66,7 +66,7 @@ LYX_USE_FRONTEND ### Check for a C++ compiler LYX_PROG_CXX ### Some checks on what the C++ compiler can(not) do -AC_LANG_CPLUSPLUS +AC_LANG(C++) dnl we do not need that currently (and probably all our supported dnl compiler allow that) dnl LYX_CXX_PARTIAL @@ -215,7 +215,7 @@ LYX_USE_XFORMS_IMAGE_LOADER ### Setup GNU gettext dnl GNU gettext is written in C -AC_LANG_C +AC_LANG(C) # Some tests that may be useful for gettext AC_C_CONST AC_C_INLINE @@ -228,7 +228,7 @@ esac AC_SUBST(LINGUAS) -AC_LANG_CPLUSPLUS +AC_LANG(C++) # some standard header files AC_HEADER_DIRENT @@ -256,9 +256,9 @@ dnl This is a slight hack: the tests generated by autoconf 2.52 do not dnl work correctly because of some conflict with stdlib.h with g++ 2.96 dnl We aim to remove this eventually, since we should test as much as dnl possible with the compiler which will use the functions (JMarc) -AC_LANG_C +AC_LANG(C) AC_CHECK_FUNCS(memmove memset strchr putenv setenv mkfifo mkstemp mktemp) -AC_LANG_CPLUSPLUS +AC_LANG(C++) dnl Until this is fixed in autoconf we provide our own version LYX_FUNC_SELECT_ARGTYPES diff --git a/config/gtk--.m4 b/config/gtk--.m4 index 16f4cf2d60..b6b2f8b58b 100644 --- a/config/gtk--.m4 +++ b/config/gtk--.m4 @@ -8,28 +8,28 @@ dnl to be used as follows: dnl AM_PATH_GTKMM([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl AC_DEFUN(AM_PATH_GTKMM, -[dnl +[dnl dnl Get the cflags and libraries from the gtkmm-config script dnl AC_ARG_WITH(gtkmm-prefix,[ --with-gtkmm-prefix=PREFIX - Prefix where GTK-- is installed (optional)], - gtkmm_config_prefix="$withval", gtkmm_config_prefix="") + Prefix where GTK-- is installed (optional)], + gtkmm_config_prefix="$withval", gtkmm_config_prefix="") AC_ARG_WITH(gtkmm-exec-prefix,[ --with-gtkmm-exec-prefix=PREFIX - Exec prefix where GTK-- is installed (optional)], - gtkmm_config_exec_prefix="$withval", gtkmm_config_exec_prefix="") + Exec prefix where GTK-- is installed (optional)], + gtkmm_config_exec_prefix="$withval", gtkmm_config_exec_prefix="") AC_ARG_ENABLE(gtkmmtest, [ --disable-gtkmmtest Do not try to compile and run a test GTK-- program], , enable_gtkmmtest=yes) if test x$gtkmm_config_exec_prefix != x ; then gtkmm_config_args="$gtkmm_config_args --exec-prefix=$gtkmm_config_exec_prefix" if test x${GTKMM_CONFIG+set} != xset ; then - GTKMM_CONFIG=$gtkmm_config_exec_prefix/bin/gtkmm-config + GTKMM_CONFIG=$gtkmm_config_exec_prefix/bin/gtkmm-config fi fi if test x$gtkmm_config_prefix != x ; then gtkmm_config_args="$gtkmm_config_args --prefix=$gtkmm_config_prefix" if test x${GTKMM_CONFIG+set} != xset ; then - GTKMM_CONFIG=$gtkmm_config_prefix/bin/gtkmm-config + GTKMM_CONFIG=$gtkmm_config_prefix/bin/gtkmm-config fi fi @@ -42,16 +42,16 @@ AC_ARG_ENABLE(gtkmmtest, [ --disable-gtkmmtest Do not try to compile and ru no_gtkmm=yes else AC_LANG_SAVE - AC_LANG_CPLUSPLUS + AC_LANG(C++) GTKMM_CFLAGS=`$GTKMM_CONFIG $gtkmm_config_args --cflags` GTKMM_LIBS=`$GTKMM_CONFIG $gtkmm_config_args --libs` gtkmm_config_major_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` gtkmm_config_minor_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` gtkmm_config_micro_version=`$GTKMM_CONFIG $gtkmm_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_gtkmmtest" = "xyes" ; then ac_save_CXXFLAGS="$CXXFLAGS" ac_save_LIBS="$LIBS" @@ -67,7 +67,7 @@ dnl #include #include -int +int main () { int major, minor, micro; @@ -86,9 +86,9 @@ main () (gtkmm_minor_version != $gtkmm_config_minor_version) || (gtkmm_micro_version != $gtkmm_config_micro_version)) { - printf("\n*** 'gtkmm-config --version' returned %d.%d.%d, but GTK-- (%d.%d.%d)\n", - $gtkmm_config_major_version, $gtkmm_config_minor_version, $gtkmm_config_micro_version, - gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version); + printf("\n*** 'gtkmm-config --version' returned %d.%d.%d, but GTK-- (%d.%d.%d)\n", + $gtkmm_config_major_version, $gtkmm_config_minor_version, $gtkmm_config_micro_version, + gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version); printf ("*** was found! If gtkmm-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK--. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); @@ -97,12 +97,12 @@ main () printf("*** If gtkmm-config was wrong, set the environment variable GTKMM_CONFIG\n"); printf("*** to point to the correct copy of gtkmm-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); - } + } /* GTK-- does not have the GTKMM_*_VERSION constants */ -/* +/* else if ((gtkmm_major_version != GTKMM_MAJOR_VERSION) || (gtkmm_minor_version != GTKMM_MINOR_VERSION) || - (gtkmm_micro_version != GTKMM_MICRO_VERSION)) + (gtkmm_micro_version != GTKMM_MICRO_VERSION)) { printf("*** GTK-- header files (version %d.%d.%d) do not match\n", GTKMM_MAJOR_VERSION, GTKMM_MINOR_VERSION, GTKMM_MICRO_VERSION); @@ -113,26 +113,26 @@ main () else { if ((gtkmm_major_version > major) || - ((gtkmm_major_version == major) && (gtkmm_minor_version > minor)) || - ((gtkmm_major_version == major) && (gtkmm_minor_version == minor) && (gtkmm_micro_version >= micro))) + ((gtkmm_major_version == major) && (gtkmm_minor_version > minor)) || + ((gtkmm_major_version == major) && (gtkmm_minor_version == minor) && (gtkmm_micro_version >= micro))) { - return 0; + return 0; } else { - printf("\n*** An old version of GTK-- (%d.%d.%d) was found.\n", - gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version); - printf("*** You need a version of GTK-- newer than %d.%d.%d. The latest version of\n", + printf("\n*** An old version of GTK-- (%d.%d.%d) was found.\n", + gtkmm_major_version, gtkmm_minor_version, gtkmm_micro_version); + printf("*** You need a version of GTK-- newer than %d.%d.%d. The latest version of\n", major, minor, micro); - printf("*** GTK-- is always available from ftp://ftp.gtk.org.\n"); - printf("***\n"); - printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the gtkmm-config shell script is\n"); - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of GTK--, but you can also set the GTKMM_CONFIG environment to point to the\n"); - printf("*** correct copy of gtkmm-config. (In this case, you will have to\n"); - printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); + printf("*** GTK-- is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the gtkmm-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GTK--, but you can also set the GTKMM_CONFIG environment to point to the\n"); + printf("*** correct copy of gtkmm-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; @@ -144,7 +144,7 @@ main () fi if test "x$no_gtkmm" = x ; then AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) + ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$GTKMM_CONFIG" = "no" ; then @@ -157,30 +157,30 @@ main () echo "*** version to 0.9.12 or later" else if test -f conf.gtkmmtest ; then - : + : else - echo "*** Could not run GTK-- test program, checking why..." - CXXFLAGS="$CXXFLAGS $GTKMM_CFLAGS" - LIBS="$LIBS $GTKMM_LIBS" - AC_TRY_LINK([ + echo "*** Could not run GTK-- test program, checking why..." + CXXFLAGS="$CXXFLAGS $GTKMM_CFLAGS" + LIBS="$LIBS $GTKMM_LIBS" + AC_TRY_LINK([ #include #include ], [ return ((gtkmm_major_version) || (gtkmm_minor_version) || (gtkmm_micro_version)); ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GTK-- or finding the wrong" - echo "*** version of GTK--. If it is not finding GTK--, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK-- or finding the wrong" + echo "*** version of GTK--. If it is not finding GTK--, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GTK-- was incorrectly installed" - echo "*** or that you have moved GTK-- since it was installed. In the latter case, you" - echo "*** may want to edit the gtkmm-config script: $GTKMM_CONFIG" ]) - CXXFLAGS="$ac_save_CXXFLAGS" - LIBS="$ac_save_LIBS" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GTK-- was incorrectly installed" + echo "*** or that you have moved GTK-- since it was installed. In the latter case, you" + echo "*** may want to edit the gtkmm-config script: $GTKMM_CONFIG" ]) + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" fi fi GTKMM_CFLAGS="" @@ -192,4 +192,3 @@ main () AC_SUBST(GTKMM_LIBS) rm -f conf.gtkmmtest ]) - diff --git a/config/libtool.m4 b/config/libtool.m4 index a79288c55a..59398c5432 100644 --- a/config/libtool.m4 +++ b/config/libtool.m4 @@ -103,7 +103,7 @@ case $host in CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_SAVE - AC_LANG_C + AC_LANG(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_RESTORE]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then @@ -218,7 +218,7 @@ fi for ac_symprfx in "" "_"; do # Write the raw and C identifiers. -[lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"] +[lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"] # Check to see that the pipe works correctly. pipe_works=no @@ -350,7 +350,7 @@ fi # will find an echo command which doesn;t interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) + [AC_DIVERT_PUSH(NOTICE)]) _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR # Check that we are running under the correct shell. @@ -416,7 +416,7 @@ else # # So, first we look for a working echo in the user's PATH. - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for dir in $PATH /usr/ucb; do if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && @@ -616,14 +616,14 @@ else *) AC_CHECK_LIB(dl, dlopen, [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_FUNC(dlopen, lt_cv_dlopen="dlopen", - [AC_CHECK_FUNC(shl_load, lt_cv_dlopen="shl_load", - [AC_CHECK_LIB(svld, dlopen, + [AC_CHECK_FUNC(shl_load, lt_cv_dlopen="shl_load", + [AC_CHECK_LIB(svld, dlopen, [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB(dld, shl_load, - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) + [AC_CHECK_LIB(dld, shl_load, + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) - ]) - ]) + ]) + ]) ]) ;; esac @@ -656,7 +656,7 @@ else if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl + lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) @@ -785,7 +785,7 @@ AC_MSG_RESULT($objdir) ## FIXME: this should be a separate macro ## -AC_ARG_WITH(pic, +AC_ARG_WITH(pic, [ --with-pic try to use only PIC/non-PIC objects [default=use both]], pic_mode="$withval", pic_mode=default) test -z "$pic_mode" && pic_mode=default @@ -850,11 +850,11 @@ AC_CACHE_VAL(lt_cv_prog_cc_pic, aix3* | aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_cv_prog_cc_static='-Bstatic' - lt_cv_prog_cc_wl='-Wl,' + # AIX 5 now supports IA64 processor + lt_cv_prog_cc_static='-Bstatic' + lt_cv_prog_cc_wl='-Wl,' else - lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' + lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' fi ;; @@ -910,9 +910,9 @@ AC_CACHE_VAL(lt_cv_prog_cc_pic, lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' if test "x$host_vendor" = xsni; then - lt_cv_prog_cc_wl='-LD' + lt_cv_prog_cc_wl='-LD' else - lt_cv_prog_cc_wl='-Wl,' + lt_cv_prog_cc_wl='-Wl,' fi ;; @@ -981,7 +981,7 @@ fi # Check for any special shared library compilation flags. if test -n "$lt_cv_prog_cc_shlib"; then AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries]) - if echo "$old_CC $old_CFLAGS " | [egrep -e "[ ]$lt_cv_prog_cc_shlib[ ]"] >/dev/null; then : + if echo "$old_CC $old_CFLAGS " | [egrep -e "[ ]$lt_cv_prog_cc_shlib[ ]"] >/dev/null; then : else AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure]) lt_cv_prog_cc_can_build_shared=no @@ -1294,18 +1294,18 @@ EOF # is EXPORTS), use it as is. # If DATA tags from a recent dlltool are present, honour them! archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname-def; + cp $export_symbols $output_objdir/$soname-def; else - echo EXPORTS > $output_objdir/$soname-def; - _lt_hint=1; - cat $export_symbols | while read symbol; do - set dummy \$symbol; - case \[$]# in - 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; - *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; - esac; - _lt_hint=`expr 1 + \$_lt_hint`; - done; + echo EXPORTS > $output_objdir/$soname-def; + _lt_hint=1; + cat $export_symbols | while read symbol; do + set dummy \$symbol; + case \[$]# in + 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; + *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; + esac; + _lt_hint=`expr 1 + \$_lt_hint`; + done; fi~ '"$ltdll_cmds"' $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ @@ -1416,21 +1416,21 @@ else # We have reworked collect2 hardcode_direct=yes else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= fi shared_flag='-shared' else if test "$host_cpu" = ia64; then - shared_flag='-G' + shared_flag='-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='${wl}-bM:SRE' fi hardcode_direct=yes fi @@ -1446,10 +1446,10 @@ else # If -brtl is somewhere in LDFLAGS, we need to do run time linking. aix_use_runtimelinking=no for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then - aix_use_runtimelinking=yes - break - fi + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then + aix_use_runtimelinking=yes + break + fi done exp_sym_flag='-bexport' no_entry_flag='-bnoentry' @@ -1463,17 +1463,17 @@ else archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-znodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else - hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' - # Warning - without using the other run time loading flags, -berok will - # link without error, but may produce a broken library. - allow_undefined_flag='${wl}-berok' - # This is a bit strange, but is similar to how AIX traditionally builds - # it's shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname' + hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' + # Warning - without using the other run time loading flags, -berok will + # link without error, but may produce a broken library. + allow_undefined_flag='${wl}-berok' + # This is a bit strange, but is similar to how AIX traditionally builds + # it's shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname' fi fi ;; @@ -1846,11 +1846,11 @@ aix4* | aix5*) case $host_os in [ aix4 | aix4.[01] | aix4.[01].*)] if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : else - can_build_shared=no + can_build_shared=no fi ;; esac @@ -2658,9 +2658,9 @@ EOF # return TRUE; # } # /* ltdll.c ends here */ - # This is a source program that is used to create import libraries - # on Windows for dlls which lack them. Don't remove nor modify the - # starting and closing comments + # This is a source program that is used to create import libraries + # on Windows for dlls which lack them. Don't remove nor modify the + # starting and closing comments # /* impgen.c starts here */ # /* Copyright (C) 1999-2000 Free Software Foundation, Inc. # @@ -2737,44 +2737,44 @@ EOF # # dll = open(filename, O_RDONLY|O_BINARY); # if (dll < 1) -# return 1; +# return 1; # # dll_name = filename; # # for (i=0; filename[i]; i++) -# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') -# dll_name = filename + i +1; +# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') +# dll_name = filename + i +1; # # pe_header_offset = pe_get32 (dll, 0x3c); # opthdr_ofs = pe_header_offset + 4 + 20; # num_entries = pe_get32 (dll, opthdr_ofs + 92); # # if (num_entries < 1) /* no exports */ -# return 1; +# return 1; # # export_rva = pe_get32 (dll, opthdr_ofs + 96); # export_size = pe_get32 (dll, opthdr_ofs + 100); # nsections = pe_get16 (dll, pe_header_offset + 4 +2); # secptr = (pe_header_offset + 4 + 20 + -# pe_get16 (dll, pe_header_offset + 4 + 16)); +# pe_get16 (dll, pe_header_offset + 4 + 16)); # # expptr = 0; # for (i = 0; i < nsections; i++) # { -# char sname[8]; -# unsigned long secptr1 = secptr + 40 * i; -# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); -# unsigned long vsize = pe_get32 (dll, secptr1 + 16); -# unsigned long fptr = pe_get32 (dll, secptr1 + 20); -# lseek(dll, secptr1, SEEK_SET); -# read(dll, sname, 8); -# if (vaddr <= export_rva && vaddr+vsize > export_rva) -# { -# expptr = fptr + (export_rva - vaddr); -# if (export_rva + export_size > vaddr + vsize) -# export_size = vsize - (export_rva - vaddr); -# break; -# } +# char sname[8]; +# unsigned long secptr1 = secptr + 40 * i; +# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); +# unsigned long vsize = pe_get32 (dll, secptr1 + 16); +# unsigned long fptr = pe_get32 (dll, secptr1 + 20); +# lseek(dll, secptr1, SEEK_SET); +# read(dll, sname, 8); +# if (vaddr <= export_rva && vaddr+vsize > export_rva) +# { +# expptr = fptr + (export_rva - vaddr); +# if (export_rva + export_size > vaddr + vsize) +# export_size = vsize - (export_rva - vaddr); +# break; +# } # } # # expdata = (unsigned char*)malloc(export_size); @@ -2788,8 +2788,8 @@ EOF # printf ("EXPORTS\n"); # for (i = 0; i&1 | sed -e '1q' | grep Qt"` @@ -125,7 +125,7 @@ AC_DEFUN(QT2_AC_PATH_MOC, AC_DEFUN(QT2_PRINT_PROGRAM, [ -AC_LANG_CPLUSPLUS +AC_LANG(C++) cat > conftest.$ac_ext < @@ -176,7 +176,7 @@ AC_MSG_CHECKING([for Qt]) ac_qt2_includes=NO ac_qt2_libraries=NO ac_qt2_bindir=NO qt2_libraries="" qt2_includes="" - + AC_ARG_WITH(qt-dir, [ --with-qt-dir where the root of Qt 2/3 is installed ], [ ac_qt2_includes=`eval echo "$withval"/include` @@ -186,10 +186,10 @@ AC_ARG_WITH(qt-dir, AC_ARG_WITH(qt-includes, [ --with-qt-includes where the Qt 2/3 includes are. ], - [ + [ ac_qt2_includes=`eval echo "$withval"` ]) - + qt2_libs_given=no AC_ARG_WITH(qt-libraries, @@ -223,9 +223,9 @@ for dir in $qt2_libdirs; do done ac_qt2_name="-lqt" - + AC_FIND_FILE(libqt.so.3 libqt.so.2.2.3 libqt.so.2.2 libqt.so.2 libqt2.so libqt.a libqt.sl, $qt2_libdirs, qt2_libdir) - + ac_qt2_libraries="$qt2_libdir" QT2_CHECK_LIB_NAME @@ -277,7 +277,7 @@ fi else dnl libs and headers supplied. Need to check lib name qt2_incdir="$ac_qt2_includes" - qt2_libdir="$ac_qt2_libraries" + qt2_libdir="$ac_qt2_libraries" ac_qt2_name="-lqt" QT2_CHECK_LIB_NAME have_qt2="yes" @@ -291,7 +291,7 @@ else ac_cv_have_qt2="have_qt2=yes ac_qt2_name=$ac_qt2_name \ ac_qt2_includes=$ac_qt2_includes ac_qt2_libraries=$ac_qt2_libraries" AC_MSG_RESULT([libraries $ac_qt2_name in $ac_qt2_libraries, headers $ac_qt2_includes]) - + qt2_libraries="$ac_qt2_libraries" qt2_includes="$ac_qt2_includes" fi @@ -301,7 +301,7 @@ dnl check it is Qt2 SAVE_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -I$qt2_includes -L$qt2_libraries" dnl specify we are definitely C++ compiling first -AC_LANG_CPLUSPLUS +AC_LANG(C++) AC_TRY_COMPILE([ #include ], @@ -334,7 +334,7 @@ else fi QT2_LIBS="$ac_qt2_name" - + AC_SUBST(QT2_INCLUDES) AC_SUBST(QT2_LDFLAGS) AC_SUBST(QT2_LIBS) diff --git a/config/sigc++.m4 b/config/sigc++.m4 deleted file mode 100644 index a51e2aeea2..0000000000 --- a/config/sigc++.m4 +++ /dev/null @@ -1,172 +0,0 @@ -# Configure paths for Libsigc++ -# Based on Gtk-- script by Erik Andersen and Tero Pulkkinen - -dnl Test for Libsigc++, and define SIGC_CFLAGS and SIGC_LIBS -dnl to be used as follows: -dnl AM_PATH_SIGC(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -dnl -AC_DEFUN(AM_PATH_SIGC, -[dnl -dnl Get the cflags and libraries from the sigc-config script -dnl - -dnl -dnl Prefix options -dnl -AC_ARG_WITH(sigc-prefix, -[ --with-sigc-prefix=PREFIX - Prefix where libsigc++ is installed (optional)] -, sigc_config_prefix="$withval", sigc_config_prefix="") - -AC_ARG_WITH(sigc-exec-prefix, -[ --with-sigc-exec-prefix=PREFIX - Exec prefix where libsigc++ is installed (optional)] -, sigc_config_exec_prefix="$withval", sigc_config_exec_prefix="") - -AC_ARG_ENABLE(sigctest, -[ --disable-sigctest Do not try to compile and run a test libsigc++ - program], -, enable_sigctest=yes) - -dnl -dnl Prefix handling -dnl - if test x$sigc_config_exec_prefix != x ; then - sigc_config_args="$sigc_config_args --exec-prefix=$sigc_config_exec_prefix" - if test x${SIGC_CONFIG+set} != xset ; then - SIGC_CONFIG=$sigc_config_exec_prefix/bin/sigc-config - fi - fi - if test x$sigc_config_prefix != x ; then - sigc_config_args="$sigc_config_args --prefix=$sigc_config_prefix" - if test x${SIGC_CONFIG+set} != xset ; then - SIGC_CONFIG=$sigc_config_prefix/bin/sigc-config - fi - fi - -dnl -dnl See if sigc-config is alive -dnl - AC_PATH_PROG(SIGC_CONFIG, sigc-config, no) - sigc_version_min=$1 - -dnl -dnl Version check -dnl - AC_MSG_CHECKING(for libsigc++ - version >= $sigc_version_min) - no_sigc="" - if test "$SIGC_CONFIG" = "no" ; then - no_sigc=yes - else - sigc_version=`$SIGC_CONFIG --version` - - SIGC_CFLAGS=`$SIGC_CONFIG $sigc_config_args --cflags` - SIGC_LIBS=`$SIGC_CONFIG $sigc_config_args --libs` - SIGC_MACROS=`$SIGC_CONFIG $sigc_config_args --macros` - - sigc_major_version=`echo $sigc_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - sigc_minor_version=`echo $sigc_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - sigc_micro_version=`echo $sigc_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - - sigc_major_min=`echo $sigc_version_min | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - sigc_minor_min=`echo $sigc_version_min | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - sigc_micro_min=`echo $sigc_version_min | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - - sigc_version_proper=`expr \ - $sigc_major_version \> $sigc_major_min \| \ - $sigc_major_version \= $sigc_major_min \& \ - $sigc_minor_version \> $sigc_minor_min \| \ - $sigc_major_version \= $sigc_major_min \& \ - $sigc_minor_version \= $sigc_minor_min \& \ - $sigc_micro_version \>= $sigc_micro_min ` - - if test "$sigc_version_proper" = "1" ; then - AC_MSG_RESULT([$sigc_major_version.$sigc_minor_version.$sigc_micro_version]) - else - AC_MSG_RESULT(no) - no_sigc=yes - fi - - if test "X$no_sigc" = "Xyes" ; then - enable_sigctest=no - fi - - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - -dnl -dnl -dnl - if test "x$enable_sigctest" = "xyes" ; then - AC_MSG_CHECKING(if libsigc++ sane) - ac_save_CXXFLAGS="$CXXFLAGS" - ac_save_LIBS="$LIBS" - CXXFLAGS="$CXXFLAGS $SIGC_CFLAGS" - LIBS="$LIBS $SIGC_LIBS" - - rm -f conf.sigctest - AC_TRY_RUN([ -#include -#include - -#ifdef SIGC_CXX_NAMESPACES -using namespace SigC; -#endif - -int foo1(int i) - { - return 1; - } - -int main(int argc,char **argv) - { - if (sigc_major_version!=$sigc_major_version || - sigc_minor_version!=$sigc_minor_version || - sigc_micro_version!=$sigc_micro_version) - { printf("(%d.%d.%d) ", - sigc_major_version,sigc_minor_version,sigc_micro_version); - return 1; - } - Signal1 sig1; - sig1.connect(slot(foo1)); - sig1(1); - return 0; - } - -],[ - AC_MSG_RESULT(yes) -],[ - AC_MSG_RESULT(no) - no_sigc=yes -] -,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - - CXXFLAGS="$ac_save_CXXFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - - dnl - dnl - if test "x$no_sigc" = x ; then - ifelse([$2], , :, [$2]) - else - SIGC_CFLAGS="" - SIGC_LIBS="" - SIGC_MACROS="" - ifelse([$3], , :, [$3]) - fi - - AC_LANG_RESTORE - - AC_SUBST(SIGC_CFLAGS) - AC_SUBST(SIGC_LIBS) - AC_SUBST(SIGC_MACROS) -]) - diff --git a/config/xforms.m4 b/config/xforms.m4 index 74153bcdfb..50cc37ad40 100644 --- a/config/xforms.m4 +++ b/config/xforms.m4 @@ -4,14 +4,14 @@ dnl Usage LYX_PATH_XFORMS: Checks for xforms library and flags dnl If it is found, the variable XFORMS_LIB is set to the relevant -l flags, dnl and FORMS_H_LOCATION / FLIMAGE_H_LOCATION is also set AC_DEFUN(LYX_PATH_XFORMS,[ - + LIBS="$XPM_LIB $LIBS" - + AC_CHECK_LIB(forms, fl_initialize, XFORMS_LIB="-lforms", [AC_CHECK_LIB(xforms, fl_initialize, XFORMS_LIB="-lxforms", [LYX_LIB_ERROR(libforms or libxforms,xforms)])]) AC_SUBST(XFORMS_LIB) - + ### Check for xforms headers lyx_cv_forms_h_location="" AC_CHECK_HEADER(X11/forms.h,[ @@ -19,7 +19,7 @@ AC_CHECK_HEADER(X11/forms.h,[ lyx_cv_forms_h_location=""],[ AC_CHECK_HEADER(forms.h,[],[ LYX_LIB_ERROR(forms.h,forms)])]) -AC_DEFINE_UNQUOTED(FORMS_H_LOCATION,$lyx_cv_forms_h_location, +AC_DEFINE_UNQUOTED(FORMS_H_LOCATION,$lyx_cv_forms_h_location, [define this to the location of forms.h to be used with #include, e.g. ]) if test $ac_cv_header_forms_h = yes; then @@ -39,7 +39,7 @@ lyx_cv_xfversion=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \ grep '^"%%%"' 2>/dev/null | \ sed -e 's/^"%%%"\(.*\)"%%%"/\1/' -e 's/ //g'` rm -f conftest*]) - + XFORMS_VERSION=$lyx_cv_xfversion case "$lyx_cv_xfversion" in "(unknown)"|0.8[1-7]*) @@ -62,7 +62,7 @@ fi ]) - + dnl Check whether the xforms library has a viable image loader AC_DEFUN(LYX_USE_XFORMS_IMAGE_LOADER, [ @@ -70,12 +70,12 @@ save_LIBS=$LIBS LIBS="$XFORMS_LIB $LIBS" lyx_use_xforms_image_loader=no AC_LANG_SAVE -AC_LANG_C +AC_LANG(C) -AC_CHECK_LIB(jpeg, jpeg_read_header, +AC_CHECK_LIB(jpeg, jpeg_read_header, [XFORMS_IMAGE_LIB=-ljpeg LIBS="$LIBS -ljpeg"]) -AC_SEARCH_LIBS(flimage_dup, flimage, +AC_SEARCH_LIBS(flimage_dup, flimage, [lyx_use_xforms_image_loader=yes if test "$ac_cv_search_flimage_dup" != "none required" ; then XFORMS_IMAGE_LIB="-lflimage $XFORMS_IMAGE_LIB" @@ -85,8 +85,8 @@ AC_SUBST(XFORMS_IMAGE_LIB) if test $lyx_use_xforms_image_loader = yes ; then lyx_flags="$lyx_flags xforms-image-loader" - AC_DEFINE(USE_XFORMS_IMAGE_LOADER, 1, - [Define if you want to use xforms built-in image loader]) + AC_DEFINE(USE_XFORMS_IMAGE_LOADER, 1, + [Define if you want to use xforms built-in image loader]) AC_CHECK_FUNCS(flimage_enable_ps flimage_enable_jpeg) AC_CHECK_HEADERS(flimage.h X11/flimage.h, break) fi @@ -97,4 +97,3 @@ AM_CONDITIONAL(USE_BASIC_IMAGE_LOADER, test $lyx_use_xforms_image_loader = no) AC_LANG_RESTORE LIBS=$save_LIBS]) - -- 2.39.5