Annotation of uae/aclocal.m4, revision 1.1.1.3

1.1.1.3 ! root        1: # generated automatically by aclocal 1.8.3 -*- Autoconf -*-
        !             2: 
        !             3: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
        !             4: # Free Software Foundation, Inc.
        !             5: # This file is free software; the Free Software Foundation
        !             6: # gives unlimited permission to copy and/or distribute it,
        !             7: # with or without modifications, as long as this notice is preserved.
        !             8: 
        !             9: # This program is distributed in the hope that it will be useful,
        !            10: # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
        !            11: # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
        !            12: # PARTICULAR PURPOSE.
        !            13: 
1.1       root       14: # Configure paths for GTK+
                     15: # Owen Taylor     97-11-3
                     16: 
1.1.1.3 ! root       17: dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
1.1       root       18: dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
                     19: dnl
1.1.1.3 ! root       20: AC_DEFUN([AM_PATH_GTK],
1.1       root       21: [dnl 
                     22: dnl Get the cflags and libraries from the gtk-config script
                     23: dnl
                     24: AC_ARG_WITH(gtk-prefix,[  --with-gtk-prefix=PFX   Prefix where GTK is installed (optional)],
                     25:             gtk_config_prefix="$withval", gtk_config_prefix="")
                     26: AC_ARG_WITH(gtk-exec-prefix,[  --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
                     27:             gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
                     28: AC_ARG_ENABLE(gtktest, [  --disable-gtktest       Do not try to compile and run a test GTK program],
                     29:                    , enable_gtktest=yes)
                     30: 
1.1.1.3 ! root       31:   for module in . $4
        !            32:   do
        !            33:       case "$module" in
        !            34:          gthread) 
        !            35:              gtk_config_args="$gtk_config_args gthread"
        !            36:          ;;
        !            37:       esac
        !            38:   done
        !            39: 
1.1       root       40:   if test x$gtk_config_exec_prefix != x ; then
                     41:      gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
                     42:      if test x${GTK_CONFIG+set} != xset ; then
                     43:         GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
                     44:      fi
                     45:   fi
                     46:   if test x$gtk_config_prefix != x ; then
                     47:      gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
                     48:      if test x${GTK_CONFIG+set} != xset ; then
                     49:         GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
                     50:      fi
                     51:   fi
                     52: 
                     53:   AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
                     54:   min_gtk_version=ifelse([$1], ,0.99.7,$1)
                     55:   AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
                     56:   no_gtk=""
                     57:   if test "$GTK_CONFIG" = "no" ; then
                     58:     no_gtk=yes
                     59:   else
                     60:     GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
                     61:     GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
                     62:     gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
                     63:            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
                     64:     gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
                     65:            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
                     66:     gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
                     67:            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
                     68:     if test "x$enable_gtktest" = "xyes" ; then
                     69:       ac_save_CFLAGS="$CFLAGS"
                     70:       ac_save_LIBS="$LIBS"
                     71:       CFLAGS="$CFLAGS $GTK_CFLAGS"
1.1.1.3 ! root       72:       LIBS="$GTK_LIBS $LIBS"
1.1       root       73: dnl
                     74: dnl Now check if the installed GTK is sufficiently new. (Also sanity
                     75: dnl checks the results of gtk-config to some extent
                     76: dnl
                     77:       rm -f conf.gtktest
                     78:       AC_TRY_RUN([
                     79: #include <gtk/gtk.h>
                     80: #include <stdio.h>
1.1.1.3 ! root       81: #include <stdlib.h>
1.1       root       82: 
                     83: int 
                     84: main ()
                     85: {
                     86:   int major, minor, micro;
1.1.1.3 ! root       87:   char *tmp_version;
1.1       root       88: 
                     89:   system ("touch conf.gtktest");
                     90: 
1.1.1.3 ! root       91:   /* HP/UX 9 (%@#!) writes to sscanf strings */
        !            92:   tmp_version = g_strdup("$min_gtk_version");
        !            93:   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
1.1       root       94:      printf("%s, bad version string\n", "$min_gtk_version");
                     95:      exit(1);
                     96:    }
                     97: 
                     98:   if ((gtk_major_version != $gtk_config_major_version) ||
                     99:       (gtk_minor_version != $gtk_config_minor_version) ||
                    100:       (gtk_micro_version != $gtk_config_micro_version))
                    101:     {
                    102:       printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", 
                    103:              $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
                    104:              gtk_major_version, gtk_minor_version, gtk_micro_version);
                    105:       printf ("*** was found! If gtk-config was correct, then it is best\n");
                    106:       printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
                    107:       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
                    108:       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
                    109:       printf("*** required on your system.\n");
                    110:       printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
                    111:       printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
                    112:       printf("*** before re-running configure\n");
                    113:     } 
1.1.1.3 ! root      114: #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
        !           115:   else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
        !           116:           (gtk_minor_version != GTK_MINOR_VERSION) ||
        !           117:            (gtk_micro_version != GTK_MICRO_VERSION))
        !           118:     {
        !           119:       printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
        !           120:             GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
        !           121:       printf("*** library (version %d.%d.%d)\n",
        !           122:             gtk_major_version, gtk_minor_version, gtk_micro_version);
        !           123:     }
        !           124: #endif /* defined (GTK_MAJOR_VERSION) ... */
1.1       root      125:   else
                    126:     {
                    127:       if ((gtk_major_version > major) ||
                    128:         ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
                    129:         ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
                    130:       {
                    131:         return 0;
                    132:        }
                    133:      else
                    134:       {
                    135:         printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
                    136:                gtk_major_version, gtk_minor_version, gtk_micro_version);
                    137:         printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
                    138:               major, minor, micro);
                    139:         printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
                    140:         printf("***\n");
                    141:         printf("*** If you have already installed a sufficiently new version, this error\n");
                    142:         printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
                    143:         printf("*** being found. The easiest way to fix this is to remove the old version\n");
                    144:         printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
                    145:         printf("*** correct copy of gtk-config. (In this case, you will have to\n");
                    146:         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
                    147:         printf("*** so that the correct libraries are found at run-time))\n");
                    148:       }
                    149:     }
                    150:   return 1;
                    151: }
                    152: ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
                    153:        CFLAGS="$ac_save_CFLAGS"
                    154:        LIBS="$ac_save_LIBS"
                    155:      fi
                    156:   fi
                    157:   if test "x$no_gtk" = x ; then
                    158:      AC_MSG_RESULT(yes)
                    159:      ifelse([$2], , :, [$2])     
                    160:   else
                    161:      AC_MSG_RESULT(no)
                    162:      if test "$GTK_CONFIG" = "no" ; then
                    163:        echo "*** The gtk-config script installed by GTK could not be found"
                    164:        echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
                    165:        echo "*** your path, or set the GTK_CONFIG environment variable to the"
                    166:        echo "*** full path to gtk-config."
                    167:      else
                    168:        if test -f conf.gtktest ; then
                    169:         :
                    170:        else
                    171:           echo "*** Could not run GTK test program, checking why..."
                    172:           CFLAGS="$CFLAGS $GTK_CFLAGS"
                    173:           LIBS="$LIBS $GTK_LIBS"
                    174:           AC_TRY_LINK([
                    175: #include <gtk/gtk.h>
                    176: #include <stdio.h>
                    177: ],      [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
                    178:         [ echo "*** The test program compiled, but did not run. This usually means"
                    179:           echo "*** that the run-time linker is not finding GTK or finding the wrong"
                    180:           echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
                    181:           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
                    182:           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
                    183:           echo "*** is required on your system"
                    184:          echo "***"
                    185:           echo "*** If you have an old version installed, it is best to remove it, although"
                    186:           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
                    187:           echo "***"
                    188:           echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
                    189:           echo "*** came with the system with the command"
                    190:           echo "***"
                    191:           echo "***    rpm --erase --nodeps gtk gtk-devel" ],
                    192:         [ echo "*** The test program failed to compile or link. See the file config.log for the"
                    193:           echo "*** exact error that occured. This usually means GTK was incorrectly installed"
                    194:           echo "*** or that you have moved GTK since it was installed. In the latter case, you"
                    195:           echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
                    196:           CFLAGS="$ac_save_CFLAGS"
                    197:           LIBS="$ac_save_LIBS"
                    198:        fi
                    199:      fi
                    200:      GTK_CFLAGS=""
                    201:      GTK_LIBS=""
                    202:      ifelse([$3], , :, [$3])
                    203:   fi
                    204:   AC_SUBST(GTK_CFLAGS)
                    205:   AC_SUBST(GTK_LIBS)
                    206:   rm -f conf.gtktest
                    207: ])
1.1.1.2   root      208: 
1.1.1.3 ! root      209: # Helper functions for option handling.                    -*- Autoconf -*-
1.1.1.2   root      210: 
1.1.1.3 ! root      211: # Copyright (C) 2002, 2003  Free Software Foundation, Inc.
1.1.1.2   root      212: 
1.1.1.3 ! root      213: # This program is free software; you can redistribute it and/or modify
        !           214: # it under the terms of the GNU General Public License as published by
        !           215: # the Free Software Foundation; either version 2, or (at your option)
        !           216: # any later version.
        !           217: 
        !           218: # This program is distributed in the hope that it will be useful,
        !           219: # but WITHOUT ANY WARRANTY; without even the implied warranty of
        !           220: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        !           221: # GNU General Public License for more details.
        !           222: 
        !           223: # You should have received a copy of the GNU General Public License
        !           224: # along with this program; if not, write to the Free Software
        !           225: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
        !           226: # 02111-1307, USA.
        !           227: 
        !           228: # serial 1
        !           229: 
        !           230: # Obsolete Automake macros.
        !           231: 
        !           232: # We put here only the macros whose substitution is not an Automake
        !           233: # macro; otherwise including this file would trigger dependencies for
        !           234: # all the substitutions.  Generally, obsolete Automake macros are
        !           235: # better AU_DEFUNed in the same file as their replacement, or alone in
        !           236: # a separate file (see obsol-gt.m4 or obsol-lt.m4 for instance).
        !           237: 
        !           238: AU_DEFUN([AC_FEATURE_CTYPE],     [AC_HEADER_STDC])
        !           239: AU_DEFUN([AC_FEATURE_ERRNO],     [AC_REPLACE_FUNCS([strerror])])
        !           240: AU_DEFUN([AM_CYGWIN32],                 [AC_CYGWIN])
        !           241: AU_DEFUN([AM_EXEEXT],            [AC_EXEEXT])
        !           242: AU_DEFUN([AM_FUNC_MKTIME],       [AC_FUNC_MKTIME])
        !           243: AU_DEFUN([AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL],
        !           244:                                 [AC_HEADER_TIOCGWINSZ])
        !           245: AU_DEFUN([AM_MINGW32],           [AC_MINGW32])
        !           246: AU_DEFUN([AM_PROG_INSTALL],      [AC_PROG_INSTALL])
        !           247: AU_DEFUN([AM_SANITY_CHECK_CC],   [AC_PROG_CC])
        !           248: AU_DEFUN([AM_SYS_POSIX_TERMIOS], [AC_SYS_POSIX_TERMIOS])
        !           249: AU_DEFUN([fp_FUNC_FNMATCH],      [AC_FUNC_FNMATCH])
        !           250: AU_DEFUN([fp_PROG_INSTALL],      [AC_PROG_INSTALL])
        !           251: AU_DEFUN([md_TYPE_PTRDIFF_T],    [AC_CHECK_TYPES([ptrdiff_t])])
        !           252: 
        !           253: # Don't know how to translate these.
        !           254: # If used, Autoconf will complain that they are possibly unexpended;
        !           255: # this seems a good enough error message.
        !           256: # AC_FEATURE_EXIT
        !           257: # AC_SYSTEM_HEADER
1.1.1.2   root      258: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.