summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2008-04-06 19:41:43 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2008-04-06 19:41:43 +0100
commit40a1c7da2f5cfb6ed7210cbea192acd1b0231c41 (patch)
tree7ee720d1b7e6692ad26e277e5fa08f928642a533 /m4
parent039b044abf0830eebf90e54d575a179a4ac0f0e1 (diff)
parentb1c711f131520ce268b6403bb7e61595300c5b81 (diff)
downloadxine-lib-40a1c7da2f5cfb6ed7210cbea192acd1b0231c41.tar.gz
xine-lib-40a1c7da2f5cfb6ed7210cbea192acd1b0231c41.tar.bz2
Merge from 1.1; adapt xine-list for 1.2.
--HG-- rename : debian/libxine1.install => debian/libxine2.install rename : src/demuxers/demux_ogg.c => src/combined/xine_ogg_demuxer.c
Diffstat (limited to 'm4')
-rw-r--r--m4/getopt_long.m434
1 files changed, 34 insertions, 0 deletions
diff --git a/m4/getopt_long.m4 b/m4/getopt_long.m4
new file mode 100644
index 000000000..39f41ffc2
--- /dev/null
+++ b/m4/getopt_long.m4
@@ -0,0 +1,34 @@
+dnl ---------------------------------------------
+dnl Check for GNU getopt_long()
+dnl ---------------------------------------------
+
+AC_DEFUN([AC_GETOPT_LONG], [
+ AC_MSG_CHECKING(for GNU getopt_long)
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <stdlib.h>
+#include <getopt.h>
+
+static struct option long_options[] = {
+ {"help" , no_argument, 0, 1 },
+ {"version" , no_argument, 0, 2 },
+ {0 , no_argument, 0, 0 }
+};
+
+int main (int argc, char **argv) {
+ int option_index = 0;
+ int c;
+ opterr = 0;
+ while ((c = getopt_long (argc, argv, "?hv",
+ long_options, &option_index)) != EOF)
+ ;
+ return 0;
+}
+ ]])],
+ [AC_MSG_RESULT(yes);
+ ac_getopt_long=yes;
+ AC_DEFINE(HAVE_GETOPT_LONG,,[Define this if you have GNU getopt_long() implemented])],
+ [AC_MSG_RESULT(no); ac_getopt_long=no],
+ [AC_MSG_RESULT(no); ac_getopt_long=no])
+ AM_CONDITIONAL(HAVE_GETOPT_LONG, test x"$ac_getopt_long" = "xyes")
+])